Go to file
2017-04-10 11:39:57 +10:00
syncserver Add ability to set pool_recycle via config. 2017-04-10 11:39:57 +10:00
.gitignore Use a persistent sqlite db by default, rather than in-memory one. 2014-03-25 16:20:24 +11:00
.travis.yml Remove testing for python2.6 2016-11-24 11:12:09 +11:00
Dockerfile Only include specific files in the docker build 2014-12-10 19:40:00 +11:00
Makefile Use gunicorn rather than pserve 2015-05-12 17:25:13 +10:00
MANIFEST.in Add a simple static node assignment backend, for easier deployment. 2014-02-11 19:58:49 +11:00
README.rst Fix typo in readme 2016-08-17 14:44:22 +10:00
requirements.txt Update dependencies 2017-02-14 10:20:40 +11:00
setup.py Prep v1.6.0 2016-11-24 10:40:21 +11:00
syncserver.ini Use gunicorn rather than pserve 2015-05-12 17:25:13 +10:00
syncserver.wsgi Update syncserver.wsgi 2014-05-06 21:09:59 -04:00

Run-Your-Own Firefox Sync Server
================================

This is an all-in-one package for running a self-hosted Firefox Sync server.
It bundles the "tokenserver" project for authentication and the "syncstorage"
project for storage, produce a single stand-alone webapp.

Complete installation instructions are available at:

   https://docs.services.mozilla.com/howtos/run-sync-1.5.html


Quickstart
----------

The Sync Server software runs using **python 2.6** or later, and the build
process requires **make** and **virtualenv**.  You will need to have the
following packages (or similar, depending on your operating system) installed:

- python2.7
- python2.7-dev
- python-virtualenv
- make

Take a checkout of this repository, then run "make build" to pull in the 
necessary python package dependencies::

    $ git clone https://github.com/mozilla-services/syncserver
    $ cd syncserver
    $ make build

To sanity-check that things got installed correctly, do the following::

    $ make test

Now you can run the server::

    $ make serve

This should start a server on http://localhost:5000/.  

Now go into Firefox's `about:config` page, search for a setting named
"tokenServerURI", and change it to point to your server::

    identity.sync.tokenserver.uri:  http://localhost:5000/token/1.0/sync/1.5

(Prior to Firefox 42, the TokenServer preference name for Firefox Desktop was
"services.sync.tokenServerURI". While the old preference name will work in
Firefox 42 and later, the new preference is recommended as the old preference
name will be reset when the user signs out from Sync causing potential
confusion.)

Firefox should now sync against your local server rather than the default
Mozilla-hosted servers.

For more details on setting up a stable deployment, see:

   https://docs.services.mozilla.com/howtos/run-sync-1.5.html


Customization
-------------

All customization of the server can be done by editing the file
"syncserver.ini", which contains lots of comments to help you on
your way.  Things you might like to change include:

    * The client-visible hostname for your server.  Edit the "public_url"
      key under the [syncstorage] section.

    * The database in which to store sync data.  Edit the "sqluri" setting
      under the [syncstorage] section.


Database Backend Modules
------------------------

If your python installation doesn't provide the "sqlite" module by default,
you may need to install it as a separate package::

    $ ./local/bin/pip install pysqlite2

Similarly, if you want to use a different database backend you will need
to install an appropriate python module, e.g::

    $ ./local/bin/pip install PyMySQL
    $ ./local/bin/pip install psycopg2



Questions, Feedback
-------------------

- IRC channel: #sync. See http://irc.mozilla.org/
- Mailing list: https://mail.mozilla.org/listinfo/services-dev