I really like the sync feature of firefox. Having access to the same information in each firefox instance you are using. However, I like to keep that information private, so I prefer to run the sync server on my own system. Fortunately installing a sync server isn’t too difficult. Below is what I did on one of my zones (debian based). I want to have the software store its information in a mysql database. I already have a database server running. So I first logged in to my database server and created the database called sync. mysqladmin create sync Then you need to grant permission on the database for a user. Please use a more secure password then the example below has. echo "grant ALL on sync.* to sync IDENTIFIED BY 'password';" | mysql mysql Now to install the software. First install the prerequisite packages. apt-get install python-dev mercurial sqlite3 python-virtualenv libmysqlclient-dev I want to have the software installed in /opt/sync. So create the directory and check out the software mkdir -p /opt/sync
cd /opt/sync
hg clone https://hg.mozilla.org/services/server-full Now we need to build the software. I creates a self contained environment. cd server-full
make build We also need mysql support, so build that as well. bin/easy_install Mysql-Python Now the base software installation is complete. You need to edit the configuration file to point to the sql server and set the right url in the auth section. Edit the file in etc/sync.confg. This is the content of mine. [captcha]
use = false
public_key = 6Le8OLwSAAAAAK-wkjNPBtHD4Iv50moNFANIalJL
private_key = 6Le8OLwSAAAAAEKoqfc-DmoF4HNswD7RNdGwxRij
use_ssl = false So, now the server should be able to start. Try it with: bin/paster serve development.ini Now the server should be running. Next task is to configure a firefox instance and see if it will work. Select Set Up Sync from the Tools menu. [sync-01.png sync-01.thumb.png sync-02.png sync-02.thumb.png sync-03.png sync-03.thumb.png sync-04.png sync-04.thumb.png sync-05.png sync-05.thumb.png]![]() Select Create a New Account [sync-01.png sync-01.thumb.png sync-02.png sync-02.thumb.png sync-03.png sync-03.thumb.png sync-04.png sync-04.thumb.png sync-05.png sync-05.thumb.png]![]() Fill in your account details, and change the sever to reflect your own server. Now press the Next button [sync-01.png sync-01.thumb.png sync-02.png sync-02.thumb.png sync-03.png sync-03.thumb.png sync-04.png sync-04.thumb.png sync-05.png sync-05.thumb.png]![]() You will now see your sync key. Don’t loose this, your stored data on the sync server is encrypted with this key. Press Next [sync-01.png sync-01.thumb.png sync-02.png sync-02.thumb.png sync-03.png sync-03.thumb.png sync-04.png sync-04.thumb.png sync-05.png sync-05.thumb.png]![]() You should now see a completed screen. [sync-01.png sync-01.thumb.png sync-02.png sync-02.thumb.png sync-03.png sync-03.thumb.png sync-04.png sync-04.thumb.png sync-05.png sync-05.thumb.png]![]() In the window where you have stared the sync server, you will see a lot of output where the firefox client has queried the sync server. You shouldn’t see any errors there. Something like this: 2011-07-14 21:24:17,477 INFO [syncserver] 192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "DELETE /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/tabs HTTP/1.1" 200 5 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop"
192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "DELETE /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/tabs HTTP/1.1" 200 5 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop"
2011-07-14 21:24:17,494 INFO [syncserver] 192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "POST /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/tabs HTTP/1.1" 200 70 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop"
192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "POST /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/tabs HTTP/1.1" 200 70 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop"
2011-07-14 21:24:17,569 INFO [syncserver] 192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "PUT /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/meta/global HTTP/1.1" 200 13 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop"
192.168.1.48 - hprz27nt4vcqnyzxofrmomlx6dhbg4mb [14/Jul/2011:21:24:17 +0200] "PUT /1.1/hprz27nt4vcqnyzxofrmomlx6dhbg4mb/storage/meta/global HTTP/1.1" 200 13 "-" "Firefox/5.0 FxSync/1.8.0.20110615151330.desktop" Now you’re all set. I run the service behind an apache server in proxy mode with https, so all data is transmitted securely. There are also other options to do this, please take a look at: http://docs.services.mozilla.com/howtos/run-sync.html Happy syncing! :) |