From a975ab07527f350b2f22b05a79924baf9148054a Mon Sep 17 00:00:00 2001 From: Guillaume Girol Date: Mon, 2 Jun 2025 12:00:00 +0000 Subject: [PATCH] nixos/doc: explain how to use the ff sync module with ff android MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit source https://mozilla-services.readthedocs.io/en/latest/howtos/run-sync-1.5.html#howto-run-sync15 Quotation: ``` Firefox for Android (“Daylight”, versions 79 and later) does support using a non-Mozilla-hosted Sync server. Before logging in, go to App Menu > Settings > About Firefox and click the logo 5 times. You should see a “debug menu enabled” notification. Go back to the main menu and you will see two options for a custom account server and a custom Sync server. Set the Sync server to the URL given above and then log in. To configure Android Firefox 44 up to 78 to talk to your new Sync server, just set the “identity.sync.tokenserver.uri” exactly as above before signing in to Mozilla accounts and Sync on your Android device. Important: after creating the Android account, changes to “identity.sync.tokenserver.uri” will be ignored. (If you need to change the URI, delete the Android account using the Settings > Sync > Disconnect… menu item, update the pref, and sign in again.) Non-default TokenServer URLs are displayed in the Settings > Sync panel in Firefox for Android, so you should be able to verify your URL there. ``` the /token/ prefix is experimentally wrong. --- nixos/doc/manual/redirects.json | 9 ++++++ .../services/networking/firefox-syncserver.md | 28 ++++++++++++++++--- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/nixos/doc/manual/redirects.json b/nixos/doc/manual/redirects.json index 44ab6c6b860c..4a5c4237021f 100644 --- a/nixos/doc/manual/redirects.json +++ b/nixos/doc/manual/redirects.json @@ -50,6 +50,15 @@ "module-services-crab-hole-upstream-options": [ "index.html#module-services-crab-hole-upstream-options" ], + "module-services-firefox-syncserver-clients": [ + "index.html#module-services-firefox-syncserver-clients" + ], + "module-services-firefox-syncserver-clients-android": [ + "index.html#module-services-firefox-syncserver-clients-android" + ], + "module-services-firefox-syncserver-clients-desktop": [ + "index.html#module-services-firefox-syncserver-clients-desktop" + ], "module-services-opencloud": [ "index.html#module-services-opencloud" ], diff --git a/nixos/modules/services/networking/firefox-syncserver.md b/nixos/modules/services/networking/firefox-syncserver.md index f6b515e67f15..991e97f799d6 100644 --- a/nixos/modules/services/networking/firefox-syncserver.md +++ b/nixos/modules/services/networking/firefox-syncserver.md @@ -24,10 +24,8 @@ The absolute minimal configuration for the sync server looks like this: } ``` -This will start a sync server that is only accessible locally. Once the services is -running you can navigate to `about:config` in your Firefox profile and set -`identity.sync.tokenserver.uri` to `http://localhost:5000/1.0/sync/1.5`. Your browser -will now use your local sync server for data storage. +This will start a sync server that is only accessible locally on the following url: `http://localhost:5000/1.0/sync/1.5`. +See [the dedicated section](#module-services-firefox-syncserver-clients) to configure your browser to use this sync server. ::: {.warning} This configuration should never be used in production. It is not encrypted and @@ -55,3 +53,25 @@ be made via TLS. For actual deployment it is also recommended to store the `secrets` file in a secure location. + +## Configuring clients to use this server {#module-services-firefox-syncserver-clients} + +### Firefox desktop {#module-services-firefox-syncserver-clients-desktop} +To configure a desktop version of Firefox to use your server, navigate to +`about:config` in your Firefox profile and set +`identity.sync.tokenserver.uri` to `https://myhostname:5000/1.0/sync/1.5`. + +### Firefox Android {#module-services-firefox-syncserver-clients-android} +To configure an Android version of Firefox to use your server: +* First ensure that you are disconnected from you Mozilla account. +* Go to App Menu > Settings > About Firefox and click the logo 5 times. You + should see a “debug menu enabled” notification. +* Back to the main menu, a new menu "sync debug" should have appeared. +* In this menu, set "custom sync server" to `https://myhostname:5000/1.0/sync/1.5`. + +::: {.warning} +Changes to this configuration value are ignored if you are currently connected to your account. +::: + +* Restart the application. +* Log in to your account.