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.
- Open Firefox.
- Type
about:profilesinto the address bar and press Enter. - Find the profile marked as "This is the profile in use".
- 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
- Open Firefox.
- Visit
about:profiles. - Click Open Directory next to the profile you want to modify.
- Close Firefox completely.
- Copy the downloaded
user.jsinto the profile directory. - 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.
- Open Firefox Settings.
- Go to Privacy & Security.
- Scroll down to DNS over HTTPS.
- 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:
- Better performance: Fewer background processes, optimized caching, and smoother scrolling.
- More privacy: Less telemetry, less data sent to Mozilla, and stricter privacy settings.
- A cleaner browser: No sponsored suggestions and fewer unnecessary Mozilla features.
- Better security: Improved HTTPS handling and more secure default settings.
Keeping Betterfox up to date
Betterfox is updated regularly.
To update it:
- Download the latest
user.js. - Close Firefox.
- Replace the old
user.jsin your profile directory. - 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