Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

lightweight firefox weave/sync server

tag: 0.3

Fetching latest commit…

Cannot retrieve the latest commit at this time


This is a lightweight implementation of Mozillas' User API v1.0 and Storage API v1.1 without LDAP, MySQL, Redis etc. pp. overhead. It has multi users capabilities and depends on werkzeug only.

Setup and Configuration

Make sure you have sqlite available on your system (e.g. apt-get install libsqlite3-0) as well as python >= 2.5 (2.5 needs simplejson as additional egg though). See python --help for a list of parameters including a short description.

$> easy_install -U werkzeug
$> git clone
Cloning into weave-minimal...
$> cd weave-minimal
$> ./ &
 * Running on

You can also use gunicorn and the init.d system to run this service as a daemon with invoke-rc.d weave-minimal start:

# save to /etc/init.d/weave-minimal

DAEMON_OPTS="-b weave:app"

case $1 in
    echo -n "Starting $NAME: "
    start-stop-daemon --start --pidfile /var/run/$ --chdir $CHDIR \
    --chuid $USER --make-pidfile --background --exec $CMD \
    -- $DAEMON_OPTS || true
    echo "$NAME."
stop)  start-stop-daemon --stop --pidfile /var/run/$

Setting up Firefox

Using a server different from Mozillas' is rather inconvenient but works in most use-cases. Open the Sync preference pane and choose "Firefox Sync Setup" -> "Create a new account" and enter your email-address and point to your weave-minimal server. By default everyone can register (I'm too lazy for a sophisticated registration/captcha method), but you can disable this feature by setting ENABLE_REGISTER to False.

Each additional client can connected with the usual procedure (I already have an account -> connect device -> enter three codes into the your other browser).

Using a Custom Username

Mozilla assumes, you're using their services, therefore you can not enter a non-valid email-address and Firefox will prevent you from doing this. But there's an alternate way:

Instead of entering all your details into the first screen of "Firefox Sync Setup" you click on "I already have a Firefox Sync Account". Before you can go to the next step, you have to set up a user account in weave.

$> ./ --register bob:secret
[info] database for `bob` created at `.data/bob.e5e9fa1ba31ecd1a`

Now you can continue your Firefox Sync Setup and click "I don't have the device with me" and enter your username, password, "use custom server" -> url and secret passphrase. That's all.


Write down or save your Firefox Sync key! Neither weave-minimal nor Mozilla will save this and it is (instead of your regular password) your password to decrypt all data send to the servers.

Webserver Configuration

using lighttpd and mod_proxy

To run weave-minimal using lighttpd and mod_proxy you need to pass an extra argument to weave on startup, called --prefix. E.g. if you host weave under /weave/, you have at least this basic configuration:

$HTTP["url"] =~ "^/weave/" {
    proxy.server = ("" =>
       (("host" => "", "port" => 8080)))

Now, you have to run weave using ./ --prefix=/weave & to let weave-minimal recognize that it is served on this specific sub-uri. (This is an issue of lighttpd itself).


Run weave via ./ & (or inside a screen) and add the following to your nginx.conf:

location ^~ /weave/ {
    proxy_set_header        Host $host;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Scheme $scheme;
    proxy_set_header        X-Script-Name /weave;
    proxy_pass    ;

other webservers

are possible, but I don't know how to config. Deployment improvements are always welcome.

Something went wrong with that request. Please try again.