However, I do not want to risk storing absolutely sensitive data (browsing history, auth cookies, credentials, etc) at some third party.
Everytime this comes up in HN comments, someone says that Firefox Sync can be self-hosted. And while this was true in the older versions of Firefox, it seems to me that self-hosting is currently neither supported nor documented. And it has been like this for at least since 2020[1][2]. It seems self-hosting is not a priority for Mozilla.
Is anyone actually self-hosting Firefox Sync? If so, how do you do it? How is it working for you? Any issues to be aware of?
[1]: https://github.com/mozilla-services/syncstorage-rs/issues/681 (opened on Jun 22, 2020)
[2]: https://github.com/mozilla-services/syncstorage-rs/issues/550 (opened on May 26, 2020)
I do hope that syncstorage-rs will become usable eventually and hopefully improve performance.
Note: contrary to your post, cookies are not synced.
[1]: https://hub.docker.com/r/mozilla/syncserver
Their docs[0] make it seem like little would be gained from a privacy/security perspective as it seems pretty secure/private (at least to me).
[0] https://support.mozilla.org/en-US/kb/how-firefox-sync-keeps-...
But honestly, while encryption theoretically can make any data "safe" to hand to a 3rd party, it's just good "data hygiene" to keep it under your own control. If someone steals the Firefox sync database now, and some part of the encryption scheme is later broken by e.g. quantum computers, the thieves could retroactively decrypt your sync account data.
And there's also the question of metadata - when does your Firefox send data to sync, and how much? Are you sure there's nothing to glean from that?
Deleted Comment
It still uses the Firefox identities service, since I haven't bothered to try setting that one up myself. That means I need a Firefox/Mozilla account even with a self-hosted sync server, which isn't ideal.
Note that Mozilla do provide a script to delete all your data from their servers[1], in case you were using Firefox sync before going self-hosted.
I originally went through the setup instructions manually. Now I've created a Nix package[2] and NixOS module for it[3], which was an adventure by itself. I can now easily reproduce the setup, which I did while migrating my webserver to a different provider.
As for why I didn't try syncstorage-rs, it's rather petty, but the old syncserver was working well for me, and it doesn't yet support SQLite.
[0] https://github.com/mozilla-services/syncserver
[1] https://github.com/mozilla-services/syncserver#removing-mozi...
[2] https://git.sr.ht/~williamvds/config/tree/master/item/nix/pk...
[3] https://git.sr.ht/~williamvds/config/tree/master/item/nix/mo...
> Note that this repository is no longer being maintained. Use this at your own risk, and with the understanding that it is not being maintained, work is being done on its replacement, and that no support or assistance will be offered.
And its replacement syncserver-rs is in this forever-unfinished state so they've effectively killed self-hosting. At least from a support standpoint.
Instead, they went for a Big Rewrite in Rust, resulting in a much bigger codebase that will be much harder to maintain... and broke it anyway.
Of course, everything self-hosted is at my own risk etc. And official support is a luxury in this kind of FOSS, I generally don't count on it.
But since it works for me, it may be worth sharing the details.
- The new replacement package, syncserver-rs, has already been added to Nixpkgs, along with a NixOS module [0]
- Python 2 and the package itself are no longer supported, meaning...
- support in Nixpkgs is pretty rough - dependencies have been updated such that they no longer support Python 2, or have been removed outright, meaning...
- syncserver has already been removed from Nixpkgs
- in order to avoid the problem of unsupported dependencies, I delegated dependency resolution to a community project, poetry2nix[1]. Even so, it was a nightmare to get working, lots of hacks and workarounds were needed
Of course, my repo is public, so anyone is welcome to use the Flake within. If they do, I'd suggest dropping me a line so I don't do anything drastic to the package or module.
[0] https://github.com/NixOS/nixpkgs/pull/176835
[1] https://github.com/nix-community/poetry2nix
Note : You'll need to disable 2fa first on your account before you can delete the data.
Struggle is a good way to put it! I feel I hit one of Nix's pain points here: packaging software whose dependencies are largely missing from Nixpkgs. On top of that, it was a Python app, and the state of Python packaging is quite a mess.
I also feel it Nix was the right choice. My journey was rather harsh, but I do believe in its approach.
It does not really solve your problem for browser-history/credentials etc. But as long as you use a client that you verified you can be kinda sure the data is E2E encrypted and can't be read by Mozilla.
Also on a side note: To this day the weave protocol is one of the more (needlessly) complex protocols I ever implemented and I'm still not sure what problems some of the design decisions solve...
[1] github.com/mikescher/firefox-sync-client
Deleted Comment
FWIW Firefox says they do not have the capability to read your data: https://hacks.mozilla.org/2018/11/firefox-sync-privacy/
I like to imagine it as having a safe deposit box provided by a local bank. I have the only key and have proven that to be the case. I also store the key at home in another safe which is regularly serviced by bank employees. While they probably don’t abuse their position in the latter to access the former, it would be completely wrong to say they do not have the capability to get at my stuff.
All that aside, I love FF sync and rely on it everyday for work stuff. It is like magic and I’m very grateful for the feature. I am realistic about the NSA’s level of interest in my work calendar and the threat they pose to my day to day life.
Hosting your own sync server doesn't prevent this.
Locksmiths will get through that lock in a couple of minutes, probably without you ever knowing
The only thing stopping the bank and/or government from accessing your box is the law
The article is from 2018. Isn't this only relating to the old version of Firefox Sync - the one in which self-hosting is actually supported?
The design looks reasonable. However, my main problem with it is that putting all this extremely valuable data in one place makes it a huge target. A supply-chain attack or an implementation error in the crypto would be devastating.
Deleted Comment
To Mozilla: fire your overpaid activist CEO Mitchell Baker and use the resulting funds to hire (back) the developers she got rid of, clean up the mess, get rid of the social justice nonsense and take back your place as a browser development organisation instead of a 'colours of change' peddler.
I stopped doing that after some time, it seemed too futile. Errors are hard to debug and you're on your own, plus I was not using it for passwords or CC, so it just wasn't worth it.
Deleted Comment
But other than that, it's an interesting design choice.