Harden Firefox with Betterfox: Better Performance and Privacy

Firefox already offers better privacy than Chrome out of the box. With a few additional tweaks, you can improve privacy and performance even further without making the browser harder to use. One of the easiest ways to do that is with Betterfox.

What is Betterfox?

Betterfox is a collection of about:config tweaks that make Firefox more private, more secure, and faster.

Betterfox consists of four configuration files:

File Description
user.js The complete recommended configuration in a single file.
Securefox.js Privacy and security improvements without breaking websites.
Peskyfox.js Removes unnecessary distractions and browser clutter.
Smoothfox.js Optional: Edge-like smooth scrolling.

Step 1: Back up your Firefox profile

Before making changes to your Firefox profile, it's a good idea to create a backup.

  1. Open Firefox.
  2. Type about:profiles into the address bar and press Enter.
  3. Find the profile marked as "This is the profile in use".
  4. Open the Root Directory and copy the entire profile folder.

Or simply close Firefox and back up the profile directory:

cp -r ~/.mozilla/firefox/ ~/.mozilla/firefox-backup/

Step 2: Download the user.js file

Download the latest user.js from the official Betterfox repository:

https://raw.githubusercontent.com/yokoffing/Betterfox/main/user.js

Right-click the link and choose "Save Link As...".

Step 3: Install user.js

  1. Open Firefox.
  2. Visit about:profiles.
  3. Click Open Directory next to the profile you want to modify.
  4. Close Firefox completely.
  5. Copy the downloaded user.js into the profile directory.
  6. Start Firefox again.

That's it. Firefox will now use the Betterfox configuration.

Step 4: Install uBlock Origin

Betterfox is not an ad blocker. You should still install uBlock Origin. Recommended filter lists are available in the Betterfox Filterlists.

Step 5: Enable DNS over HTTPS

For additional DNS privacy, configure a trusted DNS provider.

  1. Open Firefox Settings.
  2. Go to Privacy & Security.
  3. Scroll down to DNS over HTTPS.
  4. Enable it and choose a provider such as Mullvad, Quad9, or NextDNS.

Step 6: Choose a privacy-friendly search engine

Betterfox does not change your default search engine. If you want to reduce the amount of data shared while searching the web, consider using DuckDuckGo, MetaGer, Brave Search, 4get, or SearXNG.

I also provide a free public 4get instance at linuxnation.social.

To add it as a search engine, open the website, right-click the address bar, and select "Add Search Engine". You can then set it as your default search engine under Settings → Search.

What does Betterfox improve?

After installing Betterfox, you can expect:

Keeping Betterfox up to date

Betterfox is updated regularly.

To update it:

  1. Download the latest user.js.
  2. Close Firefox.
  3. Replace the old user.js in your profile directory.
  4. Start Firefox again.

Betterfox also provides a Python script that can automate the update process.

Conclusion

Betterfox is one of the easiest ways to harden Firefox without sacrificing usability. It only takes a few minutes to set up and gives you better performance, improved privacy, and more control over your browser. If you're using Firefox and haven't configured it yet, Betterfox is well worth installing.

Source and additional information: github.com/yokoffing/Betterfox