ownCloud is a very good self hosted solution to host all your contacts, photos, documents etc. Now, ownCloud does provide its own file sync application, but I believe using BitTorrent Sync is much better solution to keep your files in sync between your local machine and your ownCloud installation.
Update 1/9/2013 – Permissions have been added into this guide, so that when you configure BTSync everything should work.
1. Check your BitTorrent Sync / ownCloud setup
You should be able to access the WebUI of BitTorrent Sync on the server where ownCloud is installed by going to http://owncloudserver:8888/gui and logging in with the details you choose (for details for how to enable the webUi, see my post). You should be presented with the Web UI screen.
Now to check ownCloud. Login to your ownCloud installation and check that you can see the Files section.
2. Get your ownCloud file location
For this you will need to SSH into your owncloud server and point it to the location you installed ownCloud into. My installation sits at /usr/share/owncloud/data/adam/files. Where ever your ownCloud Data folder is, navigate to it and cd into your users folder and take a note of the location, you will need it later.
3. Install BitTorrent Sync on your local machine
If you have not already done so, install the BitTorrent Sync application on your local machine where you want to sync data to (go here to download).
Once you have that installed (I’m on Mac OS). Open BitTorrent Sync and you should see the below menu (will be slightly different on Windows). Once you have that window, right click on the folder you want to sync to (you can add another folder if you want, im going straight into my BTSync folder). Then click copy secret.
4. Link your ownCloud server location with BitTorrent Sync
In the BTSync WebUI – click Add Folder. You will see the below view:
Paste the Secret you copied from the Application in step 3 into the Secret box – and put the location of your ownCloud files in the Path field. Click Add.
Congratulations – you should now be all set! Copy a file into your local machines folder and wait for it to be synced. This should only take a few seconds to complete.
You may get permission issues on ownCloud after you do this – or BTSync may not be able to do much. My installation of BTSync runs at root access, so it can put files anywhere. You may have to add your user to www-data to allow it access to the files location. If you cant figure it out put as much information as you can in the comments and I will try to assist!
When you have completed everything it BTSync is complaining that the Destination folder is not reachable or ownCloud has permission errors, run the below commands on the files folder under owncloud/data/user.
sudo usermod -a -G www-data root
chown www-data:root files