Self-Hosting a Firefox Sync Server

  • 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...

  • Garuda Linux has been hosting their own Firefox Sync server for a while now for their FireDragon browser [1]:

       defaultPref("identity.sync.tokenserver.uri", "https://ffsync.garudalinux.org/token/1.0/sync/1.5"); // --> FIREDRAGON CONFIG
    
    (They seem to be running the older non-Rust sync server though. [2])

    [1] https://firedragon.garudalinux.org/

    [2] https://gitlab.com/garuda-linux/infra-nix/-/blob/main/docker...

  • This reminded me to post my own experience:

    https://kyzer.me.uk/syncserver/

    It can be done, but by golly is it a slog. The previous version (abandoned and hopelessly out of date, written in Python 2) was SOOO much better.

    It doesn't require Docker though, nor does it require Python. It does require MySQL for now, but there's like one volunteer guy working on supporting sqlite, like the old version supported out of the box. Meanwhile, the main contributors are LARPing being a corporation and writing justifications for collecting metrics and introducing new metrics frameworks, rather than make it any easier to self-host.

  • Take a look/follow https://github.com/canvas-ai/canvas-browser-extensions

    Its meant to sync your browser tabs (chrome/firefox) to a self-hosted virtual "directory" tree powered by lmdb and roaring bitmap indexes. In retrospect, we should have used rxdb or pouchdb from day one (keeping the bitmaps) but eventually we get there.

    Workflow

    - Create a new context path based on the task you are working on(universe://travel/2024/03/barcelona for example)

    - Depending on your configuration, your browser stores your current tabs and closes them, you then start your airbnb journey adding new tabs to the context path

    - Your significant other may even open the same context and work on it with you(as in, add additional ones, if auto-sync is enabled close yours etc)

    Server component is under a rewrite atm, my amateurism at play! You can do stupid things with a 2 user user-base (like a full api + backend + module rewrite started simultaneously, breaking existing functionality beyond repair) but with the new tools available these days (cursor, claude 3.7), the most important limiting factor for an idea becomes .. well, time!

  • I did that for a while, including hosting the auth myself. Then I realized Mozilla is probably one of the few companies I trust with my data, even though it's probably misplaced trust. The sync server is relatively straightforward to setup, but auth is quite more involved. I don't think it's worth it, compared to using the public hosted service

  • 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...

  • What's the privacy benefit, given that Firefox Sync is E2E encrypted?

    https://support.mozilla.org/en-US/kb/sync

  • Something similar to Firefox Sync is Floccus. If you only need bookmark and tabs sync it looks straightforward in setting up

    https://floccus.org/

  • 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

  • Congrats on getting this self-hosted. However, the solution looks more complicated than necessary. You shouldn't have to set up a database server and Docker just to sync a little bit of data. Ideally, there would be a sync server implementation that uses SQLite and can just run stand-alone.

  • 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.

  • Given the recent Firefox fiasco. What are the viable options for a free software browser? Can anyone point to the most promising alternatives (apart from the other corporate browser engines)?

  • Closed article after "docker".

    Oh god... It's still seems faster to hand-merge bookmarks from all of my browsers and devices together.

  • FYI You can use Floccus and a WebDAV server to sync bookmarks across browsers, set and forget

  • I'll jump to the wolfside but I'm going to absolutely miss "send tab to device", where I'm often driving this from mobile firefox, sending to one of a few other devices for Next time I'm sitting at a desk

    There are alternative techniques but maybe none with so few clicks, where the outcome is something literally in your face. A new tab opening on a computer elsewhere. It's that "I'm almost forced to see this" that I like

  • Asking a related question: is there anyway to sync history between browsers, fully self-hosted?

  • Great timing, with Mozilla's new privacy policy problems the other day

  • It should be possible to use syncthing to achieve sync across multiple devices, without having a third-party server - even if untrusted, right?

  • [dead]

  • I’m no longer using Firefox. They have stated clearly that they sell your data.

  • I've use Firefox as my tertiary browser option, for some specific uses like for example I have it always have an VPN plugin on. But I'm starting to feel anything in its vicinity should be avoided like hostile malware, regardless if an attempt to remove bad parts of it is made.

    A corporation can do a lot of bad stuff with their software and terms, and most have probably normalized that in their mind. But after now Firefox for example implicitly lawfully claims all the google docs you edit as their IP, that should be a bridge too far for anyone using it even slightly professionally. God help if you also use it as a person that Mozilla considers you their political blood enemy (which isn't exactly hard nowadays). Not exactly the Firefox 1.0 release I still remember. Not even as benign as its worst enemy it was built to be against at the time. Truly Dark Knight -esque.