1 # Firefox Sync server {#module-services-firefox-syncserver}
3 A storage server for Firefox Sync that you can easily host yourself.
5 ## Quickstart {#module-services-firefox-syncserver-quickstart}
7 The absolute minimal configuration for the sync server looks like this:
10 services.mysql.package = pkgs.mariadb;
12 services.firefox-syncserver = {
14 secrets = builtins.toFile "sync-secrets" ''
15 SYNC_MASTER_SECRET=this-secret-is-actually-leaked-to-/nix/store
19 hostname = "localhost";
20 url = "http://localhost:5000";
25 This will start a sync server that is only accessible locally. Once the services is
26 running you can navigate to `about:config` in your Firefox profile and set
27 `identity.sync.tokenserver.uri` to `http://localhost:5000/1.0/sync/1.5`. Your browser
28 will now use your local sync server for data storage.
31 This configuration should never be used in production. It is not encrypted and
32 stores its secrets in a world-readable location.
35 ## More detailed setup {#module-services-firefox-syncserver-configuration}
37 The `firefox-syncserver` service provides a number of options to make setting up
38 small deployment easier. These are grouped under the `singleNode` element of the
39 option tree and allow simple configuration of the most important parameters.
41 Single node setup is split into two kinds of options: those that affect the sync
42 server itself, and those that affect its surroundings. Options that affect the
43 sync server are `capacity`, which configures how many accounts may be active on
44 this instance, and `url`, which holds the URL under which the sync server can be
45 accessed. The `url` can be configured automatically when using nginx.
47 Options that affect the surroundings of the sync server are `enableNginx`,
48 `enableTLS` and `hostnam`. If `enableNginx` is set the sync server module will
49 automatically add an nginx virtual host to the system using `hostname` as the
50 domain and set `url` accordingly. If `enableTLS` is set the module will also
51 enable ACME certificates on the new virtual host and force all connections to
54 For actual deployment it is also recommended to store the `secrets` file in a