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 Next › Last »

mentatf commented on 2016-02-21 19:27 (UTC) (edited on 2016-02-21 19:27 (UTC) by mentatf)

Thank you, but I still can't make it work. I use firefox built-in authentication so there's no problem on this side. However: - On firefox 44 desktop, nothing indicates that any sync is going on. - On android, the categories (Bookmarks History...) are greyed out, pressing "Sync now" make the "syncing" appear for a few second and then back to normal, but "last synced" value remains to "never". My config is not different of what you post. What does "ffsync:5000" stand for here ? Also, could you post an example of syncserver.ini for this nginx setup ? The wiki says that there is a bug going on with nginx/https, maybe it's that, but i'm more thinking that I'm doing something wrong (because no visible logs anywhere).

gu1ll0me commented on 2016-02-21 14:01 (UTC)

Hi mentatf, I run ffsync behind nginx https proxy with this config : upstream ffsync { server ffsync:5000; } server { listen 443 ssl; ssl_certificate [ssl_cert]; ssl_certificate_key [ssl_key]; server_name [server_name]; location / { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Real-IP $remote_addr; proxy_redirect off; proxy_read_timeout 120; proxy_connect_timeout 10; proxy_pass http://ffsync/; } }

mentatf commented on 2016-02-20 17:55 (UTC)

Hi, did anybody manage to run it with an nginx server with https ? I can't manage to make it work. The ffsync.service runs without error message and the nginx logs doesn't show any message so that I don't know where to look. Where should I look for logs for this package ?

Teyro commented on 2015-11-11 16:51 (UTC) (edited on 2015-11-12 06:32 (UTC) by Teyro)

@ Sosim: Please make that work ! I cant get the sync server to work.... Useing Owncloud with old sync addon... And Mozilla will drop support at jan / 16.... edit: got the sync server to work....Doenst work with Firefox for Android 42... Works with fdroid fennec (firefox fork version 40....)

Siosm commented on 2015-10-26 01:20 (UTC)

@HLFH: Interesting! I will have a look at it.

HLFH commented on 2015-10-25 23:29 (UTC)

Isn't fxa-local-dev the best available package? https://github.com/mozilla/fxa-local-dev http://math.rousse.me/2015/07/30/how-to-set-up-firefox-sync-self-hosted/

Siosm commented on 2015-07-15 16:40 (UTC)

@simonsd: https://wiki.archlinux.org/index.php/Arch_User_Repository#Prerequisites

simonsd commented on 2015-07-15 09:11 (UTC)

missing build-depends: binutils make gcc fakeroot