A layered, reversible hardening stack for the real Mozilla Firefox, now verified on Zen Browser too.
firefox-debloat + Arkenfox + Betterfox + your own overrides, stacked in the right order.
Quick start Β· Zen Browser Β· The layers Β· Why this stack Β· Revert Β· Screenshots
Note
Status: personal toolkit, shared as-is. Read the warnings before applying.
| π¦ Real Firefox | Official Mozilla binary. This stack forks nothing and ships no third-party build. Full site and DRM support (Netflix, banking) and instant security updates. |
| π§ Zen Browser too | The full stack (policies, user.js, extensions) works on Zen, verified on Zen 1.23.3b / Windows 11. See the Zen guide. |
| π§Ή Debloated | Telemetry, studies, crash reports, sponsored content, Firefox Suggest, recommendations and AI features are switched off. |
| π‘οΈ Hardened | ETP Strict, HTTPS-only, referer trimming, containers, FPP, optional RFP, plus CanvasBlocker. |
| β‘ Fast | Betterfox network, cache and GFX tuning with speculative loading re-enabled. |
| β»οΈ Reversible | One command to roll back. Backups are created automatically. |
Firefox reads user.js on every start and the last value wins. Enterprise policies (policies.json) apply machine-wide and show up in about:policies.
flowchart LR
A["π‘οΈ Arkenfox<br/><sub>deep privacy</sub>"] --> B["β‘ Betterfox<br/><sub>speed + less annoyance</sub>"]
B --> C["π§Ή Debloat block<br/><sub>telemetry, ads, AI off</sub>"]
C --> D["ποΈ Your overrides<br/><sub>final say</sub>"]
P["π policies.json<br/><sub>machine-wide</sub>"] -.-> D
style A fill:#1e2327,stroke:#ff7139,color:#fff
style B fill:#1e2327,stroke:#ff7139,color:#fff
style C fill:#1e2327,stroke:#ff7139,color:#fff
style D fill:#ff7139,stroke:#ff7139,color:#000
style P fill:#1e2327,stroke:#888,color:#fff
Order matters: Arkenfox β Betterfox β debloat block β overrides. The more specific and personal a layer is, the later it loads, so it wins.
| Layer | Source | Scope | Reversible? |
|---|---|---|---|
| π Policies | config/policies.json (firefox-debloat) |
all profiles, all users | β
.debloat-orig backup |
| π§Ή Debloat prefs | managed block in user.js |
per profile | β
block removed on -Revert |
| π‘οΈ Arkenfox | full user.js template |
per profile | β restore backup |
| β‘ Betterfox | curated user.js |
per profile | β restore backup |
| ποΈ Overrides | appended prefs | per profile | β delete the block |
The debloat script is idempotent and leaves everything outside its managed block alone, so re-running it never wipes your Arkenfox, Betterfox or override layers.
Warning
Two things to know before you apply:
- Stay logged in. Arkenfox clears cookies and site data on close by default. This stack's overrides disable that so you stay signed in. Remove those override lines for the stricter default.
- Some sites may break. ETP Strict, RFP, CanvasBlocker and disabled prefetch can affect banking, captchas and some web apps. Use the shield icon in the address bar to add per-site exceptions, or turn RFP off in overrides.
| Windows | Linux | |
|---|---|---|
| Interpreter | Windows PowerShell 5.1+ (built in) or PowerShell 7+ | Bash 4+ |
| Dependencies | none | jq |
| Privileges | UAC prompt only for the policies step | sudo only for policies.json |
| Firefox | installed and opened once (so a profile exists) | same |
π‘ Recommended: Firefox 152+ (needed for the
AIControlsandDisableAccountspolicies).π§ͺ Tested on: Firefox 158 / Windows 11 (PowerShell 5.1 and 7). Zen Browser 1.23.3b also verified. Linux documented but merge step is newer; macOS is untested (policies path differs).
π§ Using Zen Browser instead? Same requirements, plus the manual paths in the Zen guide.
One-line install (downloads, verifies the SHA-256, runs, cleans up; applies the full stack: debloat + Arkenfox + Betterfox):
irm https://raw.githubusercontent.com/apauruseya-stack/firefox-debloat/main/install/install.ps1 | iexOr from the source (full control, easier to read first):
# 1. Clone
git clone https://github.com/apauruseya-stack/firefox-debloat.git
cd firefox-debloat
# 2. Install Firefox if you don't have it
winget install --id Mozilla.Firefox --silent --accept-package-agreements --accept-source-agreements
# 3. Open Firefox once, then close it (this creates your profile)
& "C:\Program Files\Mozilla Firefox\firefox.exe"
# 4. See what would change, without writing anything
powershell -ExecutionPolicy Bypass -File .\windows\firefox-debloat.ps1 -Preview
# 5. Apply the debloat layer (UAC prompt appears for the policies step)
powershell -ExecutionPolicy Bypass -File .\windows\firefox-debloat.ps1
# Want to keep Sync? add: -KeepSync
# Want a lighter profile? add: -Preset quick
# See the presets: -ListPresets
# 6. Layer Arkenfox + Betterfox on top
powershell -ExecutionPolicy Bypass -File .\scripts\merge-arkenfox-betterfox.ps1
# 7. (Optional) personal overrides, see "Customizing" below
# 8. Restart Firefox, then verify at about:policies and about:configπ¦ Downloaded as a ZIP? Unblock the files first
Get-ChildItem -Recurse | Unblock-Filegit clone https://github.com/apauruseya-stack/firefox-debloat.git
cd firefox-debloat
# See what would change, without writing anything
./linux/firefox-debloat.sh --preview
# Apply the debloat layer (asks for sudo when it writes policies.json)
./linux/firefox-debloat.sh
# --preset quick a lighter profile
# --list-presets what the presets do
# --keep-sync keep Firefox Account and Sync
# Layer Arkenfox + Betterfox on top
./scripts/merge-arkenfox-betterfox.shBoth scripts are idempotent and reversible (--revert).
macOS is not tested, but it should mostly work. Notes:
- Enterprise policies live in
/Library/Application Support/Mozilla/policies/policies.json(or the app bundle'sdistribution/folder), not/etc/firefox/policies. Use-PolicyDir/FIREFOX_POLICY_DIRto point at the right folder. - Profile location:
~/Library/Application Support/Firefox/Profiles/. - The Bash merge script works the same way; profile discovery covers the standard path above.
If you try it on a Mac, please open an issue with what worked and what didn't.
Zen Browser is a Gecko-based Firefox fork with vertical tabs and workspaces. The full stack works on Zen, verified on Zen 1.23.3b / Windows 11.
| Layer | Status | Details |
|---|---|---|
| π Policies | β | Zen reads policies.json from C:\Program Files\Zen Browser\distribution\ (created with admin rights). about:policies shows them as active. |
| π§± user.js | β | Zen reads user.js from %APPDATA%\zen\Profiles\<profile>\. The Arkenfox + Betterfox + overrides layers apply normally. |
| π§© Extensions | β | Firefox-compatible extensions install, and policy-based auto-install (ExtensionSettings) is supported. |
| π Script auto-detection | The firefox-debloat script looks for Mozilla Firefox paths, so it won't find Zen automatically. Point it at Zen manually (below). |
# 1. Open Zen once, then close it (this creates your profile)
# 2. Debloat layer: tell the script where Zen's policy folder is (admin rights needed)
powershell -ExecutionPolicy Bypass -File .\windows\firefox-debloat.ps1 -PolicyDir "C:\Program Files\Zen Browser\distribution"
# 3. Arkenfox + Betterfox layer: pass your Zen profile folder to the merge script
powershell -ExecutionPolicy Bypass -File .\scripts\merge-arkenfox-betterfox.ps1 -ProfileDir "$env:APPDATA\zen\Profiles\<profile>"
# 4. Restart Zen and check about:policies and about:configTip
Not sure which folder is your Zen profile? Open about:support in Zen and look at Profile Folder.
Note
Zen is a fork, so its updates come from Zen's own release channel rather than directly from Mozilla. The stack itself changes nothing about that: it only adds policies and prefs on top.
To undo it on Zen, close Zen and run the same debloat command with -Revert and the same -PolicyDir, then restore your profile's user.js backup as described in Undo everything.
|
|
| Extension | Purpose |
|---|---|
| uBlock Origin | content blocking |
| Proton Pass | password manager (replaces Firefox's built-in one) |
| Privacy Badger | tracker learning and blocking |
| CanvasBlocker | per-site canvas / WebGL / audio randomization |
| TWP (Translate Web Pages) | translation |
| PopUpOFF | popup and overlay control |
| Popup Blocker (strict) | popup blocking |
How it compares with stock Firefox and LibreWolf:
| Stock Firefox | LibreWolf | This stack | |
|---|---|---|---|
| Telemetry / ads / AI removed | β | β | β |
| Security features kept | β | β | |
| Official Mozilla binary and updates | β | β | β |
| Site / DRM compatibility | π Best | π Best | |
| Fingerprinting protection | β None | RFP (standardize) | FPP + optional RFP + CanvasBlocker (randomize) |
| Reversible | n/a | Uninstall | β
-Revert (Windows) / --revert (Linux) |
| Breakage risk | None | Higher | Low |
| Setup effort | None | Install a browser | Run scripts |
π΅οΈ Fingerprinting
- Stock Firefox: no fingerprinting protection. Your real UA, screen size, timezone, canvas, WebGL, fonts, hardware concurrency and DNT header are exposed. Cover Your Tracks reports a unique fingerprint.
- LibreWolf: RFP is on by default. It's strong, but it forces GMT timezone, light theme and window letterboxing, and breaks some sites. The RFP population is small, so you can still look unique.
- This stack: RFP is available (enable it in overrides) plus CanvasBlocker in "fake" mode, which randomizes canvas / WebGL / audio / DOMRect / screen / navigator per site (Brave-like). The DNT header is disabled to remove an identifying bit, and FPP (via ETP Strict) is on by default. Per-site randomization makes cross-site tracking much harder while keeping more sites working.
π Safety and security
- Stock Firefox: Safe Browsing, updates and Remote Settings are on, but telemetry, studies and crash reports send data out.
- LibreWolf: disables many features, and some security-related remote services may be reduced. Updates come from LibreWolf's own channel, which can lag.
- This stack: keeps every security feature on (Safe Browsing, updates, Remote Settings, captive portal) and removes data collection and ad / tracking content. It uses the official Mozilla binary, so Mozilla's security updates arrive immediately. Policies are official enterprise mechanisms: reversible, auditable, visible in
about:policies.
β‘ Speed and performance
- Stock Firefox: default network and cache settings, speculative loading on.
- LibreWolf: RFP and stricter settings can slow some loads, and letterboxing adds overhead.
- This stack: Betterfox Fastfox tuning (more connections, larger buffers, DNS cache, media / image cache, skia font cache) plus re-enabled speculative loading (DNS prefetch, link prefetch, speculative connections). Disk cache is off for privacy; enable it in overrides for faster repeat loads.
π§° Convenience and compatibility
- Stock Firefox: nothing to set up, but noisy (telemetry, ads, AI, recommendations).
- LibreWolf: a separate browser with its own profile and update channel. It breaks some sites (banking, video, captchas) and is harder to undo.
- This stack: runs on stock Firefox with full site and DRM compatibility, official updates, and a one-command revert. It keeps your profile and extensions, auto-installs the curated extension set, and can keep Sync with
-KeepSync.
| I want to... | Do this |
|---|---|
| Change policies or debloat prefs | Edit config/policies.json / config/user.js, then re-run the script |
| Use a lighter profile | -Preset quick / --preset quick (see the presets below) |
| See what a preset does | -ListPresets / --list-presets |
| Check what would change, without writing | -Preview / --preview |
| Keep Firefox Sync | -KeepSync / --keep-sync |
| Lock policies (greyed out in the UI) | -Lock / --lock |
| Block local translation too | -BlockTranslations / --block-translations |
| Tweak Arkenfox | Edit prefs in its user.js (look for [SETUP-*] tags). RFP is off by default; enable it in overrides |
| Add personal overrides | Copy overrides/user-overrides.example.js, edit it, and append it to the end of your profile's user.js (it is not auto-loaded) |
| Change a risk label | Edit config/risk.json (labels only, no behavior change) |
A preset is a named subset of config/. List them with -ListPresets (Windows) or --list-presets (Linux).
| Preset | What it does | Risk |
|---|---|---|
| quick | The loudest extras only: telemetry, studies, crash reports, sponsored content and AI features. Keeps your account, Sync, password manager and search engine. | low |
| recommended | Everything in config/: telemetry, ads, AI, suggestions and Mozilla messages off, Brave Search default, extensions auto-installed, built-in password manager and Firefox Account/Sync disabled. |
low |
| strict | recommended plus every policy locked (greyed out in the UI) and local page translation blocked as well. |
medium |
| keep-sync | recommended, but Firefox Account and Sync stay enabled so bookmarks, passwords and tabs keep syncing. |
low |
powershell -ExecutionPolicy Bypass -File .\windows\firefox-debloat.ps1 -Preset quick-Preview shows what would change and writes nothing. It never asks for elevation.
==> Preview: policies at C:\Program Files\Mozilla Firefox\distribution\policies.json
[safe] change DisableTelemetry Turn off telemetry
[medium] add DisableAccounts Turn off Firefox Account and Sync
[safe] same FirefoxHome Remove sponsored content and stories from the new tab
Every policy has a risk label in config/risk.json:
| Label | Meaning |
|---|---|
| safe | Nothing you use is affected. |
| low | A small convenience is lost. |
| medium | You will notice the change: no Sync, no password prompts, AI features gone. |
| high | Features break or data is deleted. |
Every run records what the tool wrote in a small JSON ledger (next to the policies, and one for the profiles). -Revert uses it to undo exactly its own values:
- a value you changed yourself after the run is left alone and reported,
- a policy that was never ours (from your organization or another tool) is kept,
- everything else the tool wrote is removed, and the original file is restored byte for byte.
Warning
This stack trades a little privacy for convenience in a few places. Know them before you apply it.
- Stay-logged-in vs. privacy. Arkenfox clears cookies and site data on close. The provided overrides disable that so you stay signed in. Remove those override lines for the stricter default.
- RFP is optional. Enabling it forces GMT timezone, prefers the light theme and rounds window size. It can break canvas-heavy or timezone-sensitive sites.
- Speculative loading is re-enabled for speed, which is a minor privacy trade-off.
- Disk cache stays off for privacy. Enable it in overrides for faster repeat loads.
- Site breakage. ETP Strict + RFP + disabled prefetch can break a few sites (banking, captchas, some web apps). Use the shield icon in the address bar to add per-site exceptions.
- Extensions are force-installed via policy. To change the list, edit
ExtensionSettingsinconfig/policies.jsonand re-run. To disable auto-install entirely, remove that block. - CanvasBlocker + RFP can run together. CanvasBlocker's FAQ confirms RFP can stay on, and its default mode is "fake" (per-site randomization).
- Brave Search preferences ("Anonymous local results", "Discussions", "Anonymous usage metrics") are Brave settings, not Firefox settings. After your first search, open Brave Search's gear icon β Preferences and turn them off. The choice persists in a cookie for this profile.
- Profile data is never committed.
.gitignoreexcludesprefs.js, backups anduser-overrides.js. Don't commit real profile files.
# Close Firefox first (it rewrites prefs.js on exit).
powershell -ExecutionPolicy Bypass -File .\windows\firefox-debloat.ps1 -Revert# Linux
./linux/firefox-debloat.sh --revertThe ledger decides what is undone: only the values this tool wrote are removed, and the original policies.json is restored byte for byte. A value someone else changed after the run is left alone and reported, and a policy that was never ours (from your organization, for example) is kept.
Then restore your profile's user.js from the backup the merge script created (user.js.bak-<timestamp> in the profile folder), or delete user.js entirely to return to Firefox defaults.
Will this break my logins?
By default, Arkenfox clears cookies and site data on close. This stack's overrides disable that, so you stay signed in. If you prefer the stricter default, remove those override lines. Either way, your saved passwords are untouched, and Proton Pass is auto-installed as an alternative.
Does it work with Firefox ESR or Developer Edition?
- Firefox ESR: yes, with caveats. Arkenfox recommends not using its updater on ESR and manually applying overrides. Some policies (like
AIControls) need newer versions; on older versions they show up as errors inabout:policies, but theuser.jsprefs still apply. See the firefox-debloat Firefox-version table. - Developer Edition / Nightly: should work, but these change fast. Policies and prefs may be added or renamed. Test and adjust.
- Firefox 152+ is recommended for
AIControlsandDisableAccounts.
How is this different from running Arkenfox alone?
Arkenfox is a user.js template you copy over your profile. This stack:
- Adds firefox-debloat (official enterprise policies + a managed, idempotent block) for the things Arkenfox can't reach via prefs.
- Adds Betterfox performance and annoyance tuning.
- Auto-installs a curated extension set (uBlock Origin, Proton Pass, Privacy Badger, TWP, PopUpOFF, Popup Blocker, CanvasBlocker).
- Sets Brave Search as default and disables Firefox's password manager / autofill.
- Keeps everything in managed blocks so re-running is safe and reverting is one command.
- Pins and verifies the Arkenfox / Betterfox downloads.
Arkenfox is the privacy core; this stack wraps it with policy, performance, extensions and convenience.
Will it break my sites?
Possibly a few. ETP Strict, RFP, CanvasBlocker and disabled prefetch can affect banking, captchas and some web apps. Use the shield icon in the address bar to add per-site exceptions, or turn RFP off in overrides.
How do I add a per-site exception?
Click the shield icon in the address bar on the affected site, then disable "Enhanced Tracking Protection" for that site. For CanvasBlocker, use its toolbar icon.
How do I turn RFP off?
Remove or comment out the two privacy.resistFingerprinting* lines in your overrides (or in user.js), then restart Firefox.
- π Arkenfox and Betterfox are pinned to a specific commit in the merge scripts, and the download is checked against a SHA-256 checksum. The script aborts if the checksum does not match. A scheduled workflow opens an issue when upstream publishes a new version, so the pin is refreshed on purpose.
- π§½ Arkenfox recommends running
prefsCleanerafter major Firefox updates to reset deprecated prefs. - π The debloat script is idempotent. Re-running it regenerates policies from the original plus
config/. - π The one-line installer downloads a release asset and verifies its SHA-256 before running anything.
Auto-checked against config/ by CI
Every preference and policy applied by this stack, listed so the CI consistency check passes. See the upstream firefox-debloat README for the human-readable settings reference.
AIControlsAIControls.DefaultAIControls.TranslationsAutofillAddressEnabledAutofillCreditCardEnabledDisableAccountsDisableDefaultBrowserAgentDisableFirefoxStudiesDisableTelemetryDontCheckDefaultBrowserExtensionSettingsExtensionSettings.78272b6fa58f4a1abaac99321d503a20@proton.meExtensionSettings.CanvasBlocker@kkapsner.deExtensionSettings.jid1-MnnxcxisBPnSXQ@jetpackExtensionSettings.uBlock0@raymondhill.netExtensionSettings.{036a55b4-5e72-4d05-a06c-cba2dfcc134a}ExtensionSettings.{154cddeb-4c8b-4627-a478-c7e5b427ffdf}ExtensionSettings.{de22fd49-c9ab-4359-b722-b3febdc3a0b0}FirefoxHomeFirefoxHome.SponsoredStoriesFirefoxHome.SponsoredTopSitesFirefoxHome.StoriesFirefoxSuggestFirefoxSuggest.ImproveSuggestFirefoxSuggest.SponsoredSuggestionsFirefoxSuggest.WebSuggestionsOfferToSaveLoginsPasswordManagerEnabledPreferencesSearchEnginesSearchEngines.AddSearchEngines.DefaultUserMessagingUserMessaging.ExtensionRecommendationsUserMessaging.FeatureRecommendationsUserMessaging.MoreFromMozillaUserMessaging.SkipOnboardingUserMessaging.UrlbarInterventionsapp.normandy.api_urlapp.normandy.enabledapp.shield.optoutstudies.enabledbreakpad.reportURLbrowser.aboutwelcome.enabledbrowser.ai.control.linkPreviewKeyPointsbrowser.ai.control.pdfjsAltTextbrowser.ai.control.sidebarChatbotbrowser.ai.control.smartTabGroupsbrowser.ai.control.smartWindowbrowser.ai.control.speechRecognitionbrowser.crashReports.unsubmittedCheck.autoSubmit2browser.discovery.enabledbrowser.ml.chat.enabledbrowser.ml.linkPreview.enabledbrowser.newtabpage.activity-stream.asrouter.userprefs.cfr.addonsbrowser.newtabpage.activity-stream.asrouter.userprefs.cfr.featuresbrowser.newtabpage.activity-stream.default.sitesbrowser.newtabpage.activity-stream.feeds.section.topstoriesbrowser.newtabpage.activity-stream.feeds.telemetrybrowser.newtabpage.activity-stream.showSponsoredbrowser.newtabpage.activity-stream.showSponsoredTopSitesbrowser.newtabpage.activity-stream.telemetrybrowser.preferences.moreFromMozillabrowser.shell.checkDefaultBrowserbrowser.tabs.crashReporting.sendReportbrowser.urlbar.suggest.quicksuggest.nonsponsoredbrowser.urlbar.suggest.quicksuggest.sponsoredbrowser.urlbar.trending.featureGatebrowser.vpn_promo.enableddatareporting.healthreport.uploadEnableddatareporting.policy.dataSubmissionEnableddatareporting.usage.uploadEnableddom.payments.request.supporteddom.private-attribution.submission.enabledextensions.formautofill.addresses.enabledextensions.formautofill.creditCards.enabledextensions.getAddons.showPaneextensions.htmlaboutaddons.recommendations.enabledidentity.fxaccounts.enabledprivacy.donottrackheader.enabledsignon.autofillFormssignon.rememberSignonstoolkit.coverage.endpoint.basetoolkit.coverage.opt-outtoolkit.telemetry.archive.enabledtoolkit.telemetry.bhrPing.enabledtoolkit.telemetry.coverage.opt-outtoolkit.telemetry.enabledtoolkit.telemetry.firstShutdownPing.enabledtoolkit.telemetry.newProfilePing.enabledtoolkit.telemetry.servertoolkit.telemetry.shutdownPingSender.enabledtoolkit.telemetry.unifiedtoolkit.telemetry.updatePing.enabled
| Project | Role | License |
|---|---|---|
| firefox-debloat by henriquesebastiao | Vendored under windows/, linux/, config/, tests/ |
AGPL-3.0 (original license kept) |
| Arkenfox user.js | Deep privacy layer | MIT |
| Zen Browser | Additional supported browser (tested, not bundled) | see its repository |
| Betterfox | Performance and annoyance layer | see its LICENSE |
| This repo's original additions (merge script, overrides example, README) | Glue | AGPL-3.0, to stay compatible with the vendored code |
If you redistribute, keep the licenses and attribution.


