User Tools

Site Tools


start

This blog is my notebook for computer and technology related information, copies of useful webcontent (with refs of course), troubleshooting, general tips and setups that work well for me.

Useful tags:

Blog

Set up private firefox sync server

Firefox sync is very handy, if you use firefox on several computers. Since all data is encrypted before it is sent to the server, I could life with my bookmarks stored on a cloud server. However, it wanted the added security of using my own server. Here's how to install one:

$ apt-get install python-dev mercurial sqlite3 python-virtualenv apache2-mpm-prefork libapache2-mod-wsgi make

Add user ffsync:

$ adduser --group --system --home /usr/local/firefox-sync-server --disabled-password ffsync

Add apache user (www-data) to group ffsync:

$ adduser www-data ffsync

Change user:

$ su - ffsync

Download source files:

$ hg clone https://hg.mozilla.org/services/server-full

Create tmp and data subdirectories

$ mkdir data tmp

Change permissions

$ chmod 770 data tmp

Compile sync server

$ cd server-full
$ make build

Change config files, paths in default install store user data in /tmp, not very useful.

$ vi sync.wsgi
[..]
os.environ['PYTHON_EGG_CACHE'] = ‘/usr/local/firefox-sync-server/tmp/python-eggs’
[..]
$ vi development.ini
[..]
[handler_syncserver_errors]
class = handlers.RotatingFileHandler
args = (‘/usr/local/firefox-sync-server/tmp/sync-error.log’,)
[..]
$ vi etc/sync.conf
[..]
[storage]
backend = syncstorage.storage.sql.SQLStorage
sqluri = sqlite:////usr/local/firefox-sync-server/data/usersettings.db
[..]
[auth]
backend = services.auth.sql.SQLAuth
sqluri = sqlite:////usr/local/firefox-sync-server/data/usersettings.db
[..]
fallback_node = http://sync.mytestdomain.com/
[..]

Change login shell of ffsync to /bin/false.

$ usermod -s /bin/false ffsync

Enable wsgi module

$ a2enmod wsgi

Create new apache virtual host

$ vi /etc/apache2/sites-available/firefox-sync

<VirtualHost *:80>
ServerName sync.mytestdomain.com
ServerAdmin webmaster@mytestdomain.com

DocumentRoot /usr/local/firefox-sync-server/server-full

CustomLog ${APACHE_LOG_DIR}/firefox-sync-server_access.log combined
ErrorLog ${APACHE_LOG_DIR}/firefox-sync-server_error.log

<Directory /usr/local/firefox-sync-server/server-full>
Order deny,allow
Allow from all
</Directory>

WSGIProcessGroup ffsync
WSGIDaemonProcess ffsync user=ffsync group=ffsync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias / /usr/local/firefox-sync-server/server-full/sync.wsgi
</VirtualHost>

Activate virtual host

$ cd /etc/apache2/sites-enabled
$ ln -s ../sites-available/firefox-sync .

Check config and restart apache

$ apachectl configtest &amp;&amp; /etc/init.d/apache restart

Now you can configure firefox sync with Tools>Sync

Ref: http://www.apfelschwein.net/firefox-sync-now-mit-eigenem-apache-server.html

2012-09-28 12:27 · brb · 0 Comments

Archive

Blog History

2009-05: 18 entries 2009-06: 12 entries 2009-07: 9 entries 2009-08: 5 entries 2009-09: 2 entries 2009-10: 2 entries 2009-11: 5 entries 2009-12: 4 entries 2010-01: 1 entry 2010-02: 3 entries 2010-03: 2 entries 2010-04: 2 entries 2010-05: 3 entries 2010-06: 10 entries 2010-07: 8 entries 2010-08: 5 entries 2010-09: 4 entries 2010-10: 6 entries 2010-11: 2 entries 2010-12: 6 entries 2011-01: 5 entries 2011-02: 3 entries 2011-03: 5 entries 2011-04: 2 entries 2011-05: 4 entries 2011-06: 5 entries 2011-07: 11 entries 2011-08: 12 entries 2011-09: 4 entries 2011-10: 4 entries 2011-11: 2 entries 2011-12: 1 entry 2012-01: 5 entries 2012-02: 2 entries 2012-04: 3 entries 2012-06: 1 entry 2012-09: 4 entries 2012-10: 1 entry 2013-04: 1 entry 2014-04: 10 entries 2014-08: 2 entries 2015-04: 1 entry 2015-09: 3 entries 2016-04: 1 entry 2016-05: 1 entry 2016-06: 1 entry 2016-07: 2 entries 2016-10: 1 entry 2017-01: 1 entry 2017-02: 2 entries 2017-04: 1 entry 2017-05: 1 entry 2017-07: 2 entries 2017-08: 1 entry 2017-10: 1 entry 2017-11: 1 entry 2017-12: 2 entries 2018-10: 1 entry 2019-02: 1 entry 2019-05: 1 entry 2019-09: 1 entry 2019-10: 2 entries 2020-08: 1 entry 2020-01: 1 entry 2021-01: 1 entry 2021-02: 1 entry 2021-07: 1 entry 2022-05: 2 entries 2022-06: 1 entry 2022-11: 1 entry 2023-05: 1 entry 2023-09: 2 entries 2023-12: 2 entries 2024-09: 1 entry

2024

September

2023

December

September

May

2022

November

June

May

2021

July

February

January

2020

January

August

2019

October

September

May

February

2018

October

2017

December

November

October

August

July

May

April

February

January

2016

October

July

June

May

April

2015

September

April

2014

August

April

2013

April

2012

October

September

June

April

February

January

2011

December

November

October

September

August

July

June

May

April

March

February

January

2010

December

November

October

September

August

July

June

May

April

March

February

January

2009

December

November

October

September

August

July

June

May

start.txt · Last modified: 2022-11-29 08:28 by brb