|
1 | | -<a id="howto_run_fxa"></a> |
2 | | - |
3 | | -# Run Your Own Mozilla Accounts Server (Outdated) |
4 | | - |
5 | | -The Mozilla accounts server is deployed on our systems using RPM packaging, |
6 | | -and we don't provide any other packaging or publish official builds yet. |
7 | | - |
8 | | -> **Note:** This guide is preliminary and vastly incomplete. If you have any |
9 | | -> questions or find any bugs, please don't hesitate to file an issue: |
10 | | -[Syncstorage-rs GitHub Issues](https://github.com/mozilla-services/syncstorage-rs/issues). |
11 | | - |
12 | | -> **Note:** You might also be interested in |
13 | | -> [this Docker-based self-hosting guide](https://github.com/michielbdejong/fxa-self-hosting) |
14 | | -> (use at your own risk - quite out of date). |
15 | | -
|
16 | | -The Mozilla accounts server is hosted in **git** and requires **nodejs**. |
17 | | -Make sure your system has these, or install them: |
18 | | - |
19 | | -- **git**: <http://git-scm.com/downloads> |
20 | | -- **nodejs**: <http://nodejs.org/download> |
21 | | - |
22 | | -A self-hosted Mozilla accounts server requires two components: |
23 | | - |
24 | | -- an **auth-server** that manages the accounts database |
25 | | -- a **content-server** that hosts a web-based user interface |
26 | | - |
27 | | -Clone the fxa repository [linked here](https://github.com/mozilla/fxa/) and follow the README to deploy your own auth-server and content-server instances. <https://github.com/mozilla/fxa/> |
28 | | - |
29 | | - |
30 | | -Now direct Firefox to use your servers rather than the default, Mozilla-hosted |
31 | | -ones. The procedure varies a little between desktop and mobile Firefox, and |
32 | | -may not work on older versions of the browser. |
33 | | - |
34 | | ---- |
35 | | - |
36 | | -## Desktop Firefox (version 52 or later) |
37 | | - |
38 | | -1. Enter `about:config` in the URL bar. |
39 | | -2. Right-click anywhere on the page and choose **New > String**. |
40 | | -3. Enter `identity.fxaccounts.autoconfig.uri` for the name, and your |
41 | | - content-server URL for the value. |
42 | | -4. Restart Firefox for the change to take effect. |
43 | | - |
44 | | -> **Note:** This must be set prior to loading the sign-up or sign-in page |
45 | | -> in order to take effect, and its effects are reset on sign-out. |
46 | | -
|
47 | | ---- |
48 | | - |
49 | | -## Firefox for iOS (version 9.0 or later) |
50 | | - |
51 | | -1. Go to **Settings**. |
52 | | -2. Tap on the **Version number** 5 times. |
53 | | -3. Tap **Advance Account Settings**. |
54 | | -4. Enter your content-server URL. |
55 | | -5. Toggle **Use Custom Account Service** to on. |
56 | | - |
57 | | ---- |
58 | | - |
59 | | -## Firefox Preview for Android (“Fenix”) |
60 | | - |
61 | | -- There is not yet support for using a non-Mozilla-hosted account server. |
62 | | -- Work is being tracked in this GitHub issue: |
63 | | - <https://github.com/mozilla-mobile/fenix/issues/3762> |
64 | | - |
65 | | ---- |
66 | | - |
67 | | -## Firefox for Android (“Fennec”, version 44 or later) |
68 | | - |
69 | | -1. Enter `about:config` in the URL bar. |
70 | | -2. Search for items containing `fxaccounts`, and edit them to use your |
71 | | - self-hosted URLs. |
72 | | - |
73 | | -### Auth server |
74 | | - |
75 | | -Use your auth-server URL to replace `api.accounts.firefox.com` in: |
76 | | - |
77 | | -- `identity.fxaccounts.auth.uri` |
78 | | - |
79 | | -### Content server |
80 | | - |
81 | | -Use your content-server URL to replace `accounts.firefox.com` in: |
82 | | - |
83 | | -- `identity.fxaccounts.remote.webchannel.uri` |
84 | | -- `webchannel.allowObject.urlWhitelist` |
85 | | - |
86 | | -### Optional: OAuth and profile servers |
87 | | - |
88 | | -Use your OAuth and profile server URLs to replace |
89 | | -`{oauth,profile}.accounts.firefox.com` in: |
90 | | - |
91 | | -- `identity.fxaccounts.remote.profile.uri` |
92 | | -- `identity.fxaccounts.remote.oauth.uri` |
93 | | - |
94 | | -> **Important:** *After* creating the Android account, changes to |
95 | | -> `identity.fxaccounts` prefs will be *ignored*. |
96 | | -> If you need to change the prefs, delete the Android account using |
97 | | -> **Settings > Sync > Disconnect…**, update the pref(s), and sign in again. |
98 | | -> |
99 | | -> Non-default Mozilla account URLs are displayed in the |
100 | | -> **Settings > Sync** panel in Firefox for Android, so you should be able |
101 | | -> to verify your URL there. |
102 | | -
|
103 | | ---- |
104 | | - |
105 | | -Since the Mozilla-hosted sync servers will not trust assertions issued by |
106 | | -third-party accounts servers, you will also need to run your own |
107 | | -sync-1.5 server. See [How To Run Your Own Sync-1.5 Server](./how-to-run-sync-server.md). |
108 | | - |
109 | | -Please note that the `fxa-content-server` repository includes graphics and |
110 | | -other assets that make use of Mozilla trademarks. If you are doing anything |
111 | | -other than running unmodified copies of the software for personal use, please |
112 | | -review: |
113 | | - |
114 | | -- Mozilla Trademark Policy: |
115 | | - <https://www.mozilla.org/en-US/foundation/trademarks/policy/> |
116 | | -- Mozilla Branding Guidelines: |
117 | | - <http://www.mozilla.org/en-US/styleguide/identity/mozilla/branding/> |
118 | | - |
119 | | -You can ask for help on Matrix (chat.mozilla.org) in the **#fxa** room: |
120 | | -<https://chat.mozilla.org/#/room/#fxa:mozilla.org> |
121 | | - |
122 | | ---- |
123 | | - |
124 | | -### Additional reading |
125 | | - |
126 | | -- [How to connect Firefox for Android to self-hosted Mozilla account and Firefox Sync servers](http://www.ncalexander.net/blog/2014/07/05/how-to-connect-firefox-for-android-to-self-hosted-services/) |
| 1 | +# Run Your Own FxA Server |
0 commit comments