Package Details: firefox-syncstorage-git 0.13.0.r10.gab5df9ba-1

Git Clone URL: https://aur.archlinux.org/firefox-syncstorage-git.git (read-only, click to copy)
Package Base: firefox-syncstorage-git
Description: Sync storage with build-in token server for running a self-hosted firefox sync server.
Upstream URL: https://github.com/mozilla-services/syncstorage-rs
Keywords: firefox morzilla sync syncserver
Licenses: MPL2
Conflicts: firefox-syncstorage
Provides: firefox-syncstorage
Submitter: jewelux
Maintainer: jewelux
Last Packager: jewelux
Votes: 10
Popularity: 0.000000
First Submitted: 2021-12-12 18:41 (UTC)
Last Updated: 2023-01-12 18:55 (UTC)

Pinned Comments

jewelux commented on 2021-12-12 19:15 (UTC) (edited on 2023-01-12 18:59 (UTC) by jewelux)

Database

To setup a fresh MySQL DB and user: (mysql -u root):

CREATE USER "sample_user"@"localhost" IDENTIFIED BY "sample_password";
CREATE DATABASE syncstorage_rs;
GRANT ALL PRIVILEGES on syncstorage_rs.* to sample_user@localhost;
Config

Open file /etc/firefox-syncstorage.toml to set your own parameters. Here is an example.

port=5000
syncstorage.database_url = "mysql://sample_user:sample_password@127.0.0.1:3306/syncstorage_rs"
# get secret with: head -c 20 /dev/urandom | sha1sum
master_secret = "my_secret"
human_logs = 1
tokenserver.enabled = true
tokenserver.node_type = "mysql"
tokenserver.database_url = "mysql://sample_user:sample_password@127.0.0.1:3306/syncstorage_rs"
tokenserver.fxa_metrics_hash_secret = "my_secret"
tokenserver.fxa_email_domain = "api.accounts.firefox.com"
tokenserver.fxa_oauth_server_url = "https://oauth.accounts.firefox.com/v1"
cors_allowed_origin = "null"
cors_max_age = 86400
Firefox

In abount:config change tokenserver url to your service url.

identity.sync.tokenserver.uri    https://mydomain.tld/1.0/sync/1.5
Run service

systemctl start firefox-syncstorage.service

Add node record

Currently it is necessary to add your node (incl. service pattern) to tokenserver database.
Your can add the node record by the following sql. Don't forget to replace the example url https://mydomain.tld with your service url.

INSERT INTO `services` (`id`, `service`, `pattern`) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}');
INSERT INTO `nodes` (`id`, `service`, `node`, `available`, `current_load`, `capacity`, `downed`, `backoff`) VALUES ('1', '1', 'https://mydomain.tld', '1', '0', '1', '0', '0');
Troubleshooting
Trouble with Apache as reverse proxy

If you use TLS you should modify the request header and set X-Forwarded-Proto to https. Here is an example of a virtual host file:

<VirtualHost *:443>
   ServerName mydomain.tld
   DocumentRoot /srv/http/webservices/
   RequestHeader set X-Forwarded-Proto https
   ProxyPreserveHost On
   ProxyPass / http://127.0.0.1:5000/
   ProxyPassReverse / http://127.0.0.1:5000/
   <Proxy *>
      AllowOverride all
      Require all granted
   </Proxy>
</VirtualHost>
Sync in Firefox Mobile Nightly is broken

Firefox Mobile client expected X-Timestamp in response header.
Here is an example to set X-Timestamp header in apache virtual host file:

Header set X-Timestamp %t
Header edit X-Timestamp t= ""

The issue is fixed and the workaround should not be necessary anymore.

Latest Comments

« First ‹ Previous 1 2 3 4 5 6

Siosm commented on 2014-09-14 12:19 (UTC)

Fixed

jiak commented on 2014-09-14 09:17 (UTC)

python2-virtualenv is installed, but it seems it installs "virtualenv2" command, not virtualenv. virtualenv is in package python-virtualenv.

Siosm commented on 2014-09-13 16:44 (UTC)

Did you install the python2-virtualenv dependency?

jiak commented on 2014-09-13 16:21 (UTC)

Thanks for this new version. Building this fails with /bin/sh: virtualenv: command not found Am I missing something?

Siosm commented on 2014-09-08 20:40 (UTC)

Please read the Wiki (https://wiki.archlinux.org/index.php/Mozilla_Firefox_Sync_Server).