Syncing Firefox bookmarks and passwords

I use a few computers and I like to have pretty much the same $ENV on them. Using various rsync methods helps keeping $HOME synced. Yet, sometimes that $HOME is way too big for syncing via the Internet. And what if I’d like to sync just some programes and not the whole damn $HOME dir?

One of the things that was bothering me a lot was syncing Firefox and it’s bookmarks/passwords on different computers. Especially when I change a computer and forget to pickup whatever I needed on a USB stick(encrypted one). And I need my bookmarks. I’m one of those geeks who have been keeping a well organized bookmarks for the past 10+ years. I’ve been digging around a bit and found a perfect solution. It comes down to this: Lighttpd via WebDAV and HTTPS and one neat plugin for Firefox.

This short HOWTO assumes that you know your way around with Lighty. I won’t go too deep into details but if you need some additional help just let me know. So, you’ll need Lighttpd compiled with WebDAV support. Once that is done you need the following in your lighttpd.conf:

$HTTP["host"] == "sync.com" {
server.document-root = "/home/user/sync"
server.errorlog      = "/var/log/sync.error.log"
accesslog.filename   = "/var/log//sync.access.log"
webdav.activate = "enable"
webdav.is-readonly = "disable"
}

This will allow you to read and write data to /home/user/sync which will be our central location for keeping bookmarks and/or passwords. I suggest using this location only via HTTPS.

Give settings will allow anyone rw access. Not a good idea. Add something like this to your Lighttpd configuration:

$HTTP["host"] =~ "sync.com" {
auth.require = ("/" => (
"method"  => "digest",
"realm"   => "Datasphere entrance",
"require" => "user=username"
))
}

Or tweak this password protection in any other way available for Lighty –> http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAuth

We’re almost done.

Next step is to install Syncplaces addon for Firefox.You can find it here: https://addons.mozilla.org/en-US/firefox/addon/8426

It’s pretty easy to setup. There are just a few things you need to change in the Options menu: Host should be whatever is the hostname of your sync site and paths to files for passwords and bookmarks. By default those are /syncplaces.xml, /syncplaces.html and /passwords. Change them to whatever you want. Syncplaces can be tweaked to do automatic syncing at whatever time you like. Or when you shut down Firefox thus making sure that the latest bookmarks and passwords will be on server once you go an pull the data from another computer.

I’ve tried to keep this HOWTO as simple as possible. If any part of it is not clear enough let me know and I’ll explain.

Tags: , , ,

Leave a Comment