You open Firefox on Ubuntu, type a search, and your keyboard layout, your timezone, your screen resolution, and about fifteen other signals leave the machine before the page even loads. Nothing in the default install stops that. The browser was tuned for convenience, and privacy is something you build afterward, by hand, on Linux specifically.
That's what this privacy-focused browser hardening guide for Linux is about: the actual choices, the actual files, and the parts most guides quietly skip — like the fact that your distro's package may ship without half the security features upstream compiled in.
Key Takeaways
- Your distro's Firefox build is not identical to Mozilla's. Compilation flags and update lag vary wildly between Debian, Snap, Flatpak and Arch.
- Fingerprinting defense matters more than tracker blocking for most Linux users — a distinctive setup is itself an identifier.
- Use a
user.jsyou can read, not a 900-line one you copy blindly from GitHub. - Sandboxing (Flatpak, Firejail, bubblewrap) closes gaps that no
about:configtoggle touches. - LibreWolf, Mullvad Browser and Tor Browser each solve a different problem. Picking one is a decision about your threat model, not a ranking.
Which browser should you harden first on Linux?
Start with Firefox or a Firefox derivative. Not because Chrome is evil — because you can actually audit and change a Firefox build, and on Linux you have four legitimate packaging routes that behave differently. That's the part worth getting right before touching a single setting.
The package matrix nobody publishes
Here's the comparison I wish existed when I started:
| Source | Update speed | Compilation notes | Sandbox |
|---|---|---|---|
| Mozilla tarball (manual) | Same day | Full upstream flags | None by default |
| Arch / Fedora | Days | Close to upstream, distro patches minimal | Some hardening flags on |
| Flatpak (Mozilla official) | Days | Full features, self-contained | bubblewrap |
| Snap (Ubuntu) | Days | Full features, confinement | AppArmor + snapd |
| Debian stable | Weeks to months | Built with reduced feature set in some releases | None by default |
That last row is the one that gets people. Debian stable is excellent for servers. For a browser, the delay between a disclosed vulnerability and your update can be measured in weeks. I ran Debian stable as my daily driver for a year and eventually moved to the Mozilla tarball — not because Debian did anything wrong, but because I wanted the patch the day it shipped.
Flatpak is my default recommendation for most people. You get upstream features, a real sandbox, and updates that arrive without waiting for a distro freeze.
How to harden Firefox without breaking half the web
Most hardening guides hand you a user.js with 400 entries. You drop it in, restart, and suddenly your bank's login page loops forever. Then you spend an evening bisecting which setting did it. I did exactly that twice before I learned to build the file myself, one block at a time.
The settings that actually matter
Four categories carry most of the weight:
- Telemetry and studies — turn off
toolkit.telemetry.enabled,app.shield.optoutstudies.enabled, and the Normandy remote-configuration channel. Cheap wins, zero breakage. - DNS-over-HTTPS — set
network.trr.modeto 3 if you already run your own resolver, or 2 with a trusted provider otherwise. - Fingerprinting resistance —
privacy.resistFingerprinting. Powerful, and it will make your browser report a generic window size and spoofed timezone. Expect some sites to look odd. - Storage and cookies — enable total cookie protection, and set
privacy.clearOnShutdownfor anything you don't need persisted.
What I'd skip: disabling JavaScript wholesale. Real talk — the modern web barely functions without it, and a broken browser is a browser you stop using.
The trade-off you cannot escape
Aggressive anti-fingerprinting makes you more unique in one specific way: your exact combination of hardened settings becomes a signature. Thousands of people run a stock Firefox. Far fewer run your particular user.js. The defense is to adopt a widely-used configuration rather than a bespoke one — which is precisely why the hardened builds below exist.
Hardened Firefox downloads and which build to pick
If you don't want to maintain a config, install a build someone else already maintains. Three names come up constantly, and they are not interchangeable.
LibreWolf — stock Firefox, debloated and pre-hardened
Telemetry stripped out, uBlock Origin shipped in, search engines cleaned up, and a sensible user.js already applied. It tracks Firefox releases closely. Downside: no built-in sandbox beyond what your package manager provides, and you're trusting the maintainers' choices. Available as a Flatpak, which pairs nicely with the sandbox question below.
Mullvad Browser — the anti-fingerprinting build
Built in collaboration with the Tor Project, designed to make every user look identical rather than to make each user anonymous. It does not route traffic through Tor. If your goal is blending in with a crowd of identical browsers, this is the strongest option on the list, full stop.
Tor Browser — anonymity, with real costs
Different job entirely. It hides your IP by routing through the network, and it is slower for it. Use it when anonymity is the requirement, not as a general daily browser unless you accept the latency.
And the question of Brave: it's Chromium-based, so it's fast and compatible, and its Shields do block a lot. But you cannot meaningfully audit the binary, and every Chromium build carries the same extension-manifest direction that limits how much control you retain. For Linux users who want to own their setup, Firefox derivatives remain the better bet. That's my opinion, and I'll defend it.
Sandboxing the browser on Linux: the step most guides skip
No about:config entry will contain a compromised renderer process. That requires kernel-level isolation, and Linux gives you several ways to get it.
- Flatpak — bubblewrap under the hood. Install Firefox or LibreWolf from Flathub and you inherit a sandbox with filesystem access limited to what you grant. Easiest path by a wide margin.
- Firejail — a profile-based wrapper for native installs. Powerful, occasionally fiddly with audio and portals. I broke sound twice before getting the profile right.
- bubblewrap directly — for the people who enjoy writing their own launch scripts. Maximum control, maximum maintenance.
One concrete failure from my own notes: I once ran a hardened Firefox inside a strict Firejail profile and spent forty minutes convinced the site was broken. It was the sandbox blocking the portal needed for file uploads. Lesson learned — test uploads, downloads, printing and video calls after any sandbox change, not just whether the homepage loads.
The network layer most people forget
A hardened browser still leaks at the DNS level unless you close that door. Two steps, both quick:
- Point your system resolver at an encrypted upstream — systemd-resolved with DNS-over-TLS, or a local stub resolver that forwards over DoH.
- Make sure the browser isn't bypassing your resolver with its own. Either align the two or deliberately disable the browser's internal DoH.
Mismatched DNS settings between system and browser are the single most common configuration error I see in other people's setups. The browser quietly wins, and you think you're using your Pi-hole when you aren't.
What actually matters
The temptation is to treat hardening as a checklist you complete once. It isn't. Browsers change, distros change their packaging, and a setting that protected you last year may now be redundant or actively harmful.
If you take one thing from this: pick your packaging source deliberately, then pick your build deliberately. Everything else is refinement. A Debian stable Firefox with a perfect user.js is still a browser running a month-old engine, and no configuration file fixes that.
The uncomfortable part? Every layer you add makes you slightly more identifiable and slightly more breakable. There is no final state where you're done and safe. There's only a setup you understand well enough to maintain — and that, honestly, is the whole point.