Since Google Browser Sync has been discontinued, I moved to Mozilla Weave. The cool thing is that it is open source and you can even create your own weave server.
All you need is an apache server with following modules activated and configured:

  • dav
  • dav_fs
  • dav_lock

Since weave only uses basic authentication (digest would have been better) it is strongly advised to use https.
Here is the vhost configuration file. It should be pretty straightforward:

<VirtualHost *:80>
        ServerName weave.YOURDOMAIN

        RewriteEngine On
        RewriteCond %{HTTPS} !on
        RewriteRule ^/(.*) https://%{SERVER_NAME}%{REQUEST_URI} [R]
</VirtualHost>

<VirtualHost *:443>
        ServerName weave.YOURDOMAIN
        ServerAdmin YOURMAIL

        DocumentRoot "/var/www/weave.YOURDOMAIN"

        <Directory /var/www/weave.YOURDOMAIN>
                SSLRequireSSL
                Order allow,deny
                Allow from all

                DAV On
                AuthType Basic
                AuthName "Restricted"
                AuthUserFile /etc/apache2/passwd/weave_htpasswd
                require valid-user

                AllowOverride None
        </Directory>

        <Directory /var/www/weave.YOURDOMAIN/user/YOURUSER>
                require user YOURUSER
                Options Indexes
        </Directory>

        ErrorLog /var/log/apache2/weave.YOURDOMAIN_error.log
        LogLevel warn
        CustomLog /var/log/apache2/weave.YOURDOMAIN_access.log combined
</VirtualHost>

Now all you need to do is to create the /user/YOURUSER directory in the vhost and give apache the rights to write to it.
Then create the password file with the htpasswd utility.

That should be enough to have a working weave server. You can test it by going to the directory with your browser first. Once everything works, change the server in your weave preferences.

Links:

EDIT: If you use firefox 3 you will have to add a security exception if your certificate is not signed.