Self-hosted Firefox

check this out… a containerized Firefox that you can self host and run in a browser!

Why? to navigate from your server wherever you are:

  • Bypass local filters/censorship
  • Browse websites like you do from home
  • Levergae your home ad-block setup
  • Keep your browsing history totally private and secure

You will be able to acces your own firefox instance via any other web browser. Inside, it uses a VNC server/client, but toward outside it's just a plain webpage with firefox inside.


This is one of those use cases where a container is the perfect choice. The stack needed to achieve all this is not trivial and would be potentially not a good idea to set it up server-wide on your home server.

Now, if you plan to use firefox with multiple users you will need to replicate this setup for every user as you will need to spin up a separate container for each one. I will assume that user is the user you want your firefox to run as.

As user create the /home/user/docker-compose.yml file:

version: '3'
    image: jlesage/firefox
     - USER_ID=1000
     - GROUP_ID=1000
      - "5800:5800"
      - "/user/appdata/firefox:/config:rw"

Adapt your port (5800) and the USER_ID and GROUP_ID for user. You also need to specify a config folder, wihch must be existing and writable by user.

Then the usual:

su - user
podman compose pull

Reverse Proxy

Create the following NGINX config:

location /firefox/ {
        rewrite ^/firefox/(.*) /$1 break;
        proxy_ignore_client_abort on;
        proxy_redirect /firefox;
        proxy_cookie_path / /firefox/;

See The Reverse Proxy concept for more info.


Autostarting at boot might be trickier, i suggest you take a look at Custom User Services and create the links:

cd /etc/local.d
ln -s 80-firefox-user-podman.start
ln -s 80-firefox-user-podman.stop