Sync at home – Weave minimal server on microapache

Just in case you didn’t know, Firefox Sync is a very convenient service Mozilla gave to the world: you can can keep synchronized history, bookmarks, tabs and passwords between different Firefox installations, on different platforms and devices.

Even if Mozilla affirms that

Your data is always protected, so only you have access to information like your passwords and browsing history.

(and I’m pretty sure they’re not lying), people usually like to keep private data private: encrypted is good, encrypted and at home is better.

Toby Elliot (Mozilla team), some months ago released a minimal version of the “real” sync server: it lacks all the user management api, but is a full implementation of the storage part. Set up Apache (or equivalent), configure your Firefox to a custom server, repeat for every device, and you’re done. I’ve been using it for more or less two years (iPhone and Android clients included), and indeed it works rather well.

Sadly, it is now discontinued, since the php version has been dropped and now Mozilla runs a brand new python sync server. There are instructions, if you want to set up your own, however it is not for the soft hearted (especially under Windows) and the server itself seems to be a bit more resource hungry than the minimal version.

If you want to try the weave minimal server on Windows, I have packaged microapache 2.0.63 with PHP 5, weave minimal and a simple GUI to configure and manage it (built with NSIS).

weave miniman on microapache GUI
The functions are quite self explanatory: in the upper section, you can configure the servername and the listening port for apache, and install/uninstall/start/stop the server. In the lower section you can add a new user to the sync db, remove already existing users, and you can see the url to use in Firefox.

To setup Firefox: Set up Sync -> Connect to an already existing Firefox Sync accont -> I don’t have the device with me -> and then complete the form and save.

firefox 7 sync custom server setup

Limits of this first release:

  • the apache configuration has not been particularly hardened for production use, it could be a very good idea to use it behind a VPN (I use a simple ssh tunnel). If you have experience in securing apache, I would gladly receive advices about the httpd.conf
  • HTTP only. SSL support is present but not yet configured (and not really needed as long as apache is not ready for production use)
  • The GUI needs admin rights.As long as it has to interact with Windows services, there isn’t really any alternative. If I receive enough feedbacks, I could release a no-service version of the GUI.
  • Tested on XP only (should work on Vista and 7, tho).

You can download it here (less than 4MB for the whole package), just decompress the archive and run config.exe.

Sources will be released on google code after some cleaning.

What can I say… as long as Mozilla does not revamp the storage API (making the minimal server useless), I think I’ll keep running this version, at least as long as I do not find the time to make a standalone version of the python server 🙂


UPDATE: v0.11 – fix: not working on non standard HTTP/80 port.

Advertisements

9 thoughts on “Sync at home – Weave minimal server on microapache

  1. I tried this – FF 7.0.1 – when I fill in the log-in and password, i) I can not leave the sync key blank, ii) it does not recognize the username or password; whatever form of username I use (user or user@host.domain)
    (I had to install Microapache on port 8080 so the server string is like http://localhost:8080/weave/)
    Help ?
    (My OS: Win XP SP3)
    (Microapache’s error.log has [Thu Oct 13 11:56:10 2011] [error] [client 127.0.0.1] Invalid method in request \x16\x03\x01 )
    (just caught my eye, may not be relevant?)

    • Hi Lukasz,
      i) The sync key cannot be blank, it’s the passphrase Sync uses to encrypt your data
      ii) Has been the user created in advance in the configuration GUI?

      The “Invalid method in request \x16\x03\x01” should be caused by accessing an http url in https or viceversa, did you try accessing the weave server via browser?

      • Hi PsychoWood,
        i) will connecting to the sync ‘server’ for the first time set it ?
        ii) yes I have created username of form :-
        luser
        luser@server
        luser@server.domain
        but Firefox Sync said either the username or password wasn’t recognized (and I know I pasted the same thing in both places)
        iii) tried this again : server name localhost port 8080 gives me http://localhost:8080/weave/ going there by Firefox gives me : Firefox can’t find the file at http://tlmain:8080/weave/
        (btw does it matter where do I unzip that package ? Mine is in C:\Documents and Settings\admin\My Documents\Downloads\weaveMinimall-0.1\weaveMinimal and the config.exe runs from there)

      • It seems there is a problem when using a non standard port, could you try if port 80 works?
        The other settings should not matter, I tried it within a directory with spaces, with or without ‘@’ in the username.

      • Hello PW,
        thanks, that works – I didn’t expect that, but it was enough to put the captcha in and the ‘remote’ device didn’t even require to have the information about /where/ the server is (neither the address nor sync key)

        Thanks again 🙂

  2. For the record though:
    The data on ‘remote’ device has been synced only /after/ I went Options->Sync->Manage Account->Reset Sync and went ahead with selected option (maybe upon setup it automatically does /merge/ even if I manually select /replace/, I don’t know – don’t want to reproduce, don’t want to kill my bookmarks ;)) seems like FF glitch to me.

  3. Hi,

    just like to thank you for the setup, helped me a lot to get it running on windows..
    however, got 2 notes to add, if people maybe have the same issue:
    – i had to add some more alias to make it connect from firefox 8 (only the first one was there in the ..bins\conf\httpd.conf)
    Alias /weave ../WebRoot/weave_minimal/index.php
    Alias /1.0 ../WebRoot/weave_minimal/index.php
    Alias /1.1 ../WebRoot/weave_minimal/index.php
    Alias /user/1.0 ../WebRoot/weave_minimal/index.php
    Alias /user/1 ../WebRoot/weave_minimal/index.php
    – second i had problems with username/password with mixed lower/uppercase, all in lowercase worked at the end
    with that it is really easy to setup and running (compared to the hours i spent in looking for a solution at all)
    so big thanks mate!

    regards
    Sebastian

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s