Firefox can use policies.json to customize it. This is especially useful for first-time setup where it can be tedious to go manually disable sponsored portions and install Ublock Origin.
This policy force the installation of Ublock Origin where it cannot be disabled (although uBO cannot be uninstalled, this does not prevent use from whitelisting sites; and it does not support adding custom filters). It also setup the homepage correctly, disable Pocket, sponsored stories and telemetry.
To use this, place the policies.json
file into the correct location.
Windows
C:\Program Files\Mozilla Firefox\distribution\
Linux (system-wide)
/etc/firefox/policies
Verify it's working, launch Firefox and go to
about:policies
- if it's working, it should give you the list of policies
- if it says
enterprise policies not active
or other errors, it's either the json file is not in the correct location or json formatting is wrong- make sure the encoding type of the json file is in
UTF-8
- make sure the encoding type of the json file is in
Bonus: run a docker container of temporary firefox WebUI that can be destroyed but still have the nessecary setup for web browsing
docker run -d --rm --name firefox-temp -v ./policies.json:/etc/firefox/policies/policies.json -p 5801:5800 -e WEB_AUDIO=1 -e DARK_MODE=1 jlesage/firefox
- run a ephemeral firefox container from jlesage, when it's stopped, it's removed and the same command can be used to run it as many times you want
- make sure the policies.json file exist in current path
- customize port and dark theme to your liking
- once the container is stopped or restarted, every browsing history/data/passwords will be gone; except for uBlock and ad-free related firefox configurations