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