After switching from Firefox to LibreWolf, I became interested in the idea of self-hosting my own Firefox Sync server.
Although I had seen this was possible before, I had never really looked into it—until now. I embarked on a journey to
set this up, and while it wasn’t completely smooth sailing, I eventually got it working. Here’s how it went.
Finding the Right Sync Server
Initial Search: Mozilla’s Sync Server Repo
I started by searching for “firefox sync server github” and quickly
found Mozilla’s syncserver repo. This is an all-in-one package
designed for self-hosting a Firefox Sync server. It bundles both the tokenserver for authentication and syncstorage for
storage, which sounded like exactly what I needed.
However, there were two red flags:
- The repository had “failed” tags in the build history.
- A warning was prominently displayed stating that the repository was no longer being maintained and pointing to a new
project in Rust.
Switching to Rust: syncstorage-rs
With that in mind, I followed the link to syncstorage-rs, which is
a modern, Rust-based version of the original project. It seemed like the more viable option, so I decided to move
forward with this one. But first, I wanted to check if there was a ready-to-go Docker image to make deployment easier.
Unfortunately, there wasn’t one, but the documentation did mention running it with Docker.
This is where things started to get complicated.
Diving Into Docker: Confusion and Complexity
Documentation Woes
The Docker documentation had some strange parts. For example, it mentioned:
- Ensuring that
grpcio
andprotobuf
versions matched the versions used bygoogle-cloud-rust-raw
. This sounded
odd—shouldn’t Docker handle version dependencies automatically? - Another confusing part was the instruction to manually copy the contents of
mozilla-rust-sdk
into the top-level root
directory. Again, why wasn’t this step automated in the Dockerfile?
At this point, I was feeling a bit uneasy but decided to push forward. I reviewed the repo, the Dockerfile, the
Makefile, and the circleci workflows. Despite all that, I was still unsure how to proceed.
A Simpler Solution: syncstorage-rs-docker
I then stumbled upon dan-r’s syncstorage-rs-docker repo, which had a
much simpler Docker setup. The description explained that the author had also encountered issues with the
original documentation and decided to create a Docker container for their own infrastructure.
At this point, I felt reassured that I wasn’t alone in my confusion, and decided to give this setup a try.
6 Comments
3np
Note that this setup still relies on Mozilla infrastructure for several surrounding services for auth, email, account metadata, etc.
https://github.com/dan-r/syncstorage-rs-docker/blob/main/app…
It's a good start though and as long as you're OK migrating your account you can plug those in later. Fully self-hosting all the components is just as doable but a little bit more involved. Compared to when I last set it up they seem to have been improving on docs and devex.
https://github.com/mozilla/fxa
https://mozilla.github.io/ecosystem-platform/tutorials/devel…
https://mozilla-services.readthedocs.io/en/latest/howtos/run…
sandreas
Thank you, this is the only thing what slowed me down switching to Librewolf.
Seems that MySQL and Spanner are the only supported DB-Engines by now, but there are efforts to support sqlite and Postgres[1]. I really hope these get merged soon, would make it much easier to backup your whole sync storage contained in one single sqlite file. However, a multiuser instance would probably be better stored via postgres due to better parallel update support.
EDIT: After trying this out: How exactly do I force Firefox (Librewol) using the self-hosted URL? Is there an about:config setting?
1: https://github.com/mozilla-services/syncstorage-rs/issues/49…
promiseofbeans
Great timing, with Mozilla's new privacy policy problems the other day
therein
Would be nice if librewolf and WaterFox changed their flow to make it clear that Mozilla's Sync Server is being used, and make it opt in with something like:
To sync please select one of the options below:
[x] Custom Sync Server: ___________
[ ] Mozilla Sync
zymhan
What's the privacy benefit, given that Firefox Sync is E2E encrypted?
https://support.mozilla.org/en-US/kb/sync
Mostlygeek
There’s also this: https://github.com/mozilla-services/go-syncstorage
While it was never fully deployed into production it was tested with a few hundred thousand users. It is stable at least.