33 comments

[ 150 ms ] story [ 1874 ms ] thread
Browser sync seems like a really cool feature but the last time I tried to host my own version of the sync server from Mozilla I found the documentation to be sparse and the software ultimately non-functional.

Has anyone had any positive experiences with self-hosting the Firefox Sync Server?

I wrote my very own Firefox Sync Server, completely from scratch, based on their docs but also based on mozilla-services's Python code and some Firefox OS codebase. I mostly used Go as a programming language and AWS Lambda/DynamoDB as a way to store and serve API endpoint.

> [...] I found the documentation to be sparse and the software ultimately non-functional.

Yes, my first take on the documentation was the same - existing but hard to understand in first proof-read. As I implementing my own sync and token server I really often I was catching myself "hey, you don't have to look into Python code, they really wrote how it should work in docs", especially [0] and [1] pages. There are also few other websites owned by Mozilla, which are very outdated, so also misleading.

Ah, worth noting is about:sync extension [2] and logs stored in the profile directory, which may help you to investigate some issues that might come during development and maintenance.

> Has anyone had any positive experiences with self-hosting the Firefox Sync Server?

I am biased a bit, because I had one very negative experience related to token verification error, which costed me ~4 dollars, before I noticed and I had put service into downtime for some months. However, I am really happy about a whole project. Operational costa are is about few cents per month. It also helped me to write some tools I use on daily basis and preserve knowledge I have learned about serverless applications on AWS.

[0]: https://mozilla-services.readthedocs.io/en/latest/storage/ap...

[1]: https://mozilla.github.io/application-services/docs/sync/faq...

[2]: https://github.com/mhammond/aboutsync

Wow. I did the same thing, except that mine was written in Python/Django (and it was a crude hack) and that I've hosted it on bare metal.

I've used that for 3 years, then I've abandoned it because mainenance was a pain, and I haven't figured out (despite the code being there in the open!) how to get iOS app to log in - my JS was missing some magic call and all Firefox did show is an error message (not the served HTML page).

I've commented a bit about my experiences here: https://news.ycombinator.com/item?id=18448125

Yeah, I don't complain on maintenance by now, but I anticipate it might be problematic as soon as new features comes in. I am looking forward to create a fork from their Rust[0] backend and include DynamoDB as a storage to keep compatibility with the latest version of Firefox Sync Server protocol.

[0]: https://github.com/mozilla-services/syncstorage-rs

I put several weekends of effort into trying to make it work, about a year ago, and ended up giving up. The documentation is mostly missing and the code, as released, just doesn't seem to work.
Somewhat related: If I'm using Nightly as my main browser, is there still a reason to install the Multi-Account Containers extension?
What does the question even mean?
Parent comment doesn't make it clear at all, but Nightly has multi-account containers built in.

I guess they want to know whether the extension adds any features beyond what is built in to Nightly.

Containers are built into any of the versions of Firefox and can be used even without an addon. You just need to turn them on in about:config:

privacy.userContext.enabled to true

privacy.userContext.ui.enabled to true

privacy.userContext.longPressBehavior to 2

Multi-Account Containers is a specific way to enhance privacy that, at present, requires some manual setup of each container.

Sites that rely on authenticating or payment processing with other sites will not work outside of the established container. For instance, if you try to pay for something with paypal, but you have a paypal container, then you'll either have to sign into paypal in both containers, and if you set paypal to always open in the paypal container then you'll lose whatever session you had in the other container so you need to pay attention.

My current workaround is to open a private window when I need to do something like this.
Containers remember your login details, etc. And you can do one for each company, whereas you can only have one private session open.

So I can seamlessly browse facebook, google, amazon, paypal, my bank, and so on and feel confident that my cookies and sessions aren't being leaked across websites. That they aren't tracking my behavior off the site via the browser.

And I don't even consciously need to open a specific type of tab, I can set it so that it will always load that tab for that site.

And the Facebook Container plugin, in particular, sets everything up for facebook automatically with regard to any domains owned by facebook.

I have a question... If mozilla automatically blocks third party cookies, can e-commerces actually track you when you are not on their site? And if so (and I gues its very possible) how do containers help?
Containers are useful for more than just site isolation.

For example, I use one container for browsing this website, and another for Reddit.

If I click an Amazon link from reddit, it might be a funny product I want to look at, but wouldn't consider buying. I don't necessarily want Amazon to know that.

Or similarly for Google Accounts: I can log into separate accounts for youtube and gmail, work and personal, etc. Google has some account-switching built-in, but I find it easier to work this way.

At work, I use multiple AWS accounts, and if I want to look at the AWS dashboards, containers let me use multiple AWS accounts at once. That's not something Amazon makes easy otherwise.

Really cool! I wish I could sync per-container though. I have a "personal" container at work for personal things, and have configured some websites to always open in the "personal" container. Syncing that with my personal laptop seems not very useful (and would actually be annoying)
I need a 'Firefox account'? What's that?

'an identity provider that provides authentication and user profile data for Mozilla cloud services.... give us a pre-existing email address and choose a password.'

Uh, yeh, no thanks ... been down that road before. (I didn't like cookies right away either.)

Gorhill lets us backup far more complex settings without signing up for a UO account.

You do realize that UBO's backup functionality relies on the browser's native data syncing functionality (and thus on Firefox Accounts, for Firefox), right?
Sync is a very nice side feature for containers, and helps make the experience consistent.

Going a little off topic, the current UX for using different containers is still cumbersome. Not being able to have or assign keyboard shortcuts or other ways to open tabs in specific containers (not referring to tying domains/sites to containers) allows for easier mistakes. Container extension extensions like Temporary Containers help a bit to avoid mixing up usage. I also find the container colors to be not as prominently visible on the tabs as I’d like.

There are keyboard shortcuts, though I only stumbled upon them by accident. Ctrl + . opens the menu, then press a number corresponding to a profile in the list to open a tab for that profile. (On macOS, it’s Cmd + .)

For example, to open a new tab for the first container profile, press Ctrl + ., 1

Please just start syncing cookies and local storage (on a best effort, maybe opt-in basis) and I would probably worship Firefox. Also sync non-default containers

At this point Firefox needs to learn from Ballmer. This isn't the place to post because this one is good news but in general stop focusing on "cool stuff" and do what you do best:

1) Provide open alternarive in absence of such.

2) focus on your strengths. this is where the ballmer part comes in. Firefox is now mostly for power users. Grandmas use chrome now. But after edge nobody will use anything else. So how about empowering developers and power users to do cool stuff ? Perhaps (paid and verified?) native add-ons? Maybe only from trusted partners... Or maybe only if you sideload.

I’ve been giving Firefox a chance over the past two weeks, but one thing that I haven’t figured out is how to open a new tab in the current container that I’m in via the keyboard. It’s driving me nuts that I have to use the mouse. Does anyone know what I’m missing in the settings?
I don't know that (let me know if you find it!), but I use control-. to open the container menu and get a tab from there.
You can pass Ctrl+L to focus the address bar, type in the url and then press Alt+Enter to open a new tab in the same container.
I really wish multi account containers had better support for the back button. Default behavior for a clicked container-designated link is to open a new container tab and close the current one.

This little annoyance was enough to make me drop the extension, unfortunately. I'm not trying to break a 20 year habit over a browser extension.

Could someone explain what is the best way, or the intended way, to use containers?

Because, right now I am using the Personal container for most of the websites that require login (except Shopping and Banking), and I am not sure if it is the right thing to do.

I am also blocking by default all third party cookies (and despite FF warning that it may break sites, I find that everything works fine). So, I am also wondering if that is enough and makes Containers useless or not.

I think it's important to put as many websites that require login inside containers (as you already do). Separating them is also a nice plus: Having FB and some other website B in the same container can give website B knowledge about your FB identity (through fb like buttons and such). See https://robinlinus.github.io/socialmedia-leak/ I try not to log in to any website on my default container. Also keep all the news websites where I accepted those giant cookie overlays in a "Reading" container.
You can also set privacy.firstparty.isolate to "true" in about:config to put every site that you visit in a container of its own.