Areas we serve

Self-Hosted Mozilla FxA: The Real Firefox Accounts Monorepo (Lab Scale, Not Lite)

You sign into Firefox Sync on a new laptop. Password saved, tabs appear, history syncs. Behind that familiar login is Mozilla Accounts—the service Mozilla still abbreviates as FxA even after the rename from Firefox Accounts.

mozilla/fxa is the open-source monorepo for that stack: auth servers, account management UI, profile APIs, subscription plumbing, and the glue for services like Monitor, Relay, and Mozilla VPN. About 700 GitHub stars, MPL-2.0, mostly TypeScript, and the docs live on the Firefox Ecosystem Platform site—not a single docker-compose on a $5 VPS.

What actually lives in the repo

Think distributed identity product, not a blog plugin. The monorepo pulls together fxa-auth-server (tokens, keys, OAuth flows), content and settings frontends, profile servers, payment and subscription packages, functional Playwright tests, and local-only helpers like 123done (a demo relying party that ships with yarn start).

Production Mozilla Accounts runs at Mozilla scale. Your local clone is meant for contributors and integrators who need the real protocol—not a mock OAuth server in Express.

What “self-hosted” means here

Be straight about expectations. Mozilla’s own docs note that today, production Mozilla Accounts only services clients internal to Mozilla. You are not going to point Firefox Release at your basement server and replace accounts.firefox.com without forking the entire ecosystem.

What you can do—and what counts as self-hosting in the open-source sense—is run the full development stack on hardware you control:

  • Clone the repo, install Node via .nvmrc, Yarn, Nx, Docker Desktop, and (for some flows) the Google Cloud SDK.
  • Run yarn start so PM2 brings up MySQL, Redis, Memcached, and the FxA services together.
  • Hit the stack on localhost (the docs are picky: use localhost, not 127.0.0.1).
  • Partial stacks exist too—yarn start mza for Mozilla Accounts services only if you do not need the whole circus.

That is self-hosting for development, security review, and custom relying-party experiments. It is not the same category as self-hosted Espial or Ghost on shared hosting.

Who cares—and why the code being open matters

Every Firefox user touches this codebase indirectly. Researchers studying authentication, teams building Mozilla-ecosystem adjacent tools, and engineers contributing fixes all benefit from MPL-licensed source you can audit and run.

Data sovereignty angles still show up, just narrower than “move my bookmarks off the cloud.” If you are prototyping an internal product that speaks FxA’s OAuth dialect, training staff without touching real user accounts, or proving compliance around how keys and sessions are handled, a Canadian datacenter running your own FxA lab stack keeps that work off someone else’s SaaS boundary—even when the upstream service remains Mozilla-operated in production.

Resource reality check

Mozilla’s setup guide literally warns that FxA has “a lot of moving parts” and that port conflicts with hand-rolled MySQL or Redis will ruin your afternoon. Plan for:

  • A dev machine or chunky VPS with Docker, plenty of RAM, and patience for first yarn install.
  • PM2 logs when something hangs (yarn pm2 logs is your friend).
  • Optional secrets (secrets.json) for Apple/Google login or payments—team-only values, not in the public tree.

This is wrong fit for cPanel PHP hosting. It is right fit for a cloud VPS or dedicated box in Canada where your team already runs Node, Docker, and staging databases.

Good fit / skip it

Good fit: Mozilla contributors, identity engineers, teams integrating with FxA APIs in dev, orgs that need an auditable copy of the account stack for research or compliance drills.

Skip it: anyone who wanted “self-hosted login for my forum” in an afternoon. Look at Authentik, Keycloak, or Zitadel for general SSO. Skip it if you cannot dedicate RAM and ops time to MySQL plus Redis plus a dozen Node processes.

Bottom line

mozilla/fxa is the real Mozilla Accounts monorepo—open, complex, and self-hostable as a local or lab deployment, not a drop-in replacement for Mozilla’s production identity cloud. Clone it on serious infrastructure, run yarn start, and you are inside the same machinery that backs Firefox Sync sign-in. That is valuable even when you are not shipping your own public account provider.

Talk with Swift Host if you need Canadian VPS capacity for dev stacks like this—we are in St. Albert and we have seen worse than PM2 on a Monday morning.

Tags:
  • FxA
  • Mozilla
  • Identity
  • Firefox
  • Docker
  • Self-Hosted

Need Help With Your Hosting?

Tell us about your application — we respond within 1 hour with honest recommendations.