Making Firefox syncserver-rs work on Unraid

This is one of those things it feels like it’s useful to share with the world; it was very mundane and annoying and no one else had figured it out yet.

syncserver-rs is the theoretically self-hostable solution to Firefox Sync, developed and published by Mozilla as open source software. However, it is very clearly not designed for the individual to actually self host. It’s mostly published as a courtesy, with users being left to fend for themselves to actually figure out how to work it.

I got this running on my Unraid server. These instructions take some preexisting ones and modify them accordingly.

The Docker Compose Manager is our starting point. Install this, then use it to create a new compose stack. Name the stack syncserver-rs, but don’t do anything with it yet. Instead, open a terminal and navigate to /boot/config/plugins/compose.manager/projects/syncserver-rs, where Compose Manager keeps the data related to the stack.

Next, copy the contents of the buildplan instructions for running syncserver to this folder. I suggest git cloning it on your computer, then moving it to one of your shares, then finally moving it to that directory through the Unraid terminal.

Generate the secrets and input them into the environment file as stated in the instructions here.

BE SURE TO UPDATE YOUR DESIRED SYNC URL NOW. Since I am using Tailscale to connect all my devices, I simply set the URL to http://tower:8069, also indicating the port number we’ll set later. If you do not update this now, you will find it difficult to do so later; it turns out that Firefox caches the URL presented to it when it connects for the first time, and the only way to clear that is to sign out and back in again. I spent a good hour and a half scratching my head over this.

Continue following the instructions, including filling out the docker-compose.yml file. However, here we diverge from the instructions. The Docker Compose Manager plugin stores configuration files on the boot flash drive, which only allows directories to be owned by root. This prevents MariaDB from initializing properly, not that you’d want to store a database there anyway.

Instead, create a new share called Firefox-Syncserver. Then, update the database container volumes entry to look like this instead:

    volumes:
      - /mnt/user/Firefox-Syncserver/data/config:/config
      - /mnt/user/Firefox-Syncserver/data/initdb.d/init.sql:/config/initdb.d/init.sql
      - /mnt/user/Firefox-Syncserver/db:/var/lib/mysql

If you intend to access using a port directly, like on Tailscale, make sure to delete the 127.0.0.1 limiter in the compose file as well. Otherwise, you will need a reverse proxy. I suggest Nginx Proxy Manager, which you should just be able to dump the example configuration into verbatim.

Then, just click “Compose Up” in the Docker menu and watch it work! Depending on how long the database takes to initialize, it may time out and proclaim it is “unhealthy”; just wait another minute or two and try again.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *