User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
services:firefox [2024/04/19 06:12] willyservices:firefox [2024/11/11 11:49] (current) willy
Line 3: Line 3:
 check [[https://github.com/jlesage/docker-firefox|this]] out... a containerized Firefox that you can self host and run in a browser! check [[https://github.com/jlesage/docker-firefox|this]] out... a containerized Firefox that you can self host and run in a browser!
  
-Why? to navigate from your server wherever you are.+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
  
-As the user you want to navigate with, create the **docker-compose.yml** file:+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. 
 + 
 +===== Installation ===== 
 + 
 +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:
 <file - docker-compose.yml> <file - docker-compose.yml>
 version: '3' version: '3'
Line 17: Line 29:
       - "5800:5800"       - "5800:5800"
     volumes:     volumes:
-      - "/user/appdata/firefox:/config:rw"+      - "/home/user/firefox:/config:rw"
 </file> </file>
  
-adapt your port (5800) and config path (/user/appdata/firefox).+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**.
  
-Now, setup a tunnel from your local PC to the server:+Then the usual:
 <code bash> <code bash>
-ssh external-server1 -L5800:127.0.0.1:5800+su user 
 +podman compose pull
 </code> </code>
- 
-and then fireup your browser to **http://127.0.0.1** and navigate with firefox-in-the-browser! 
-(this tunnel step is not needed if you setup the reverse proxy as indicated below) 
  
 ==== Reverse Proxy ==== ==== Reverse Proxy ====
Line 46: Line 56:
 ==== Autostart ==== ==== Autostart ====
  
-Autostarting at boot might be trickieri suggest you take a look at [[gentoo:locald|Custom User Services]] and follow these additional hits.+To start it, and set it up on boot, as usual follow my indications [[gentoo:containers|Using Containers on Gentoo]], so link the **user-containers** init script: 
 +<code> 
 +ln -s /etc/init.d/user-containers /etc/init.d/user-containers.firefox 
 +</code> 
 + 
 +and create the following config file: 
 +<file - /etc/conf.d/user-containers.firefox> 
 +USER=user 
 +DESCRIPTION="Firefox in a box" 
 +</file> 
 + 
 +Add the service to the default runlevel and start it now: 
 +<code bash> 
 +rc-update add user-containers.firefox default 
 +rc-service user-containers.firefox start 
 +</code> 
 + 
 +Of course, you will want to adapt for multiple users, maybe. 
 + 
 + 
  
  

This website uses technical cookies only. No information is shared with anybody or used in any way but provide the website in your browser.

More information