Note: This post is a work in progress and will become more detailed as I complete the project.
This post will guide you through the process of installing Bit Torrent Sync on a Raspberry PI for the purpose of syncing family photos between computers.
This system will include, Windows 7, Windows XP and Linux Mint clients with the initial server located on the Raspberry PI.
Installation of main instance on Raspberry PI
Login to the Raspberry PI via ssh and run the following commands, I am running RaspBMC (debian based).
Download the latest copy of bysync
pi@raspbmc:~$ wget http://btsync.s3-website-us-east-1.amazonaws.com/btsync_arm.tar.gz
Extract the Tarball
pi@raspbmc:~$ tar -xzf btsync_arm.tar.gz
When I tried to run ./btsync to execute the application I got the following error.
pi@raspbmc:~$ ./btsync -bash: ./btsync: No such file or directory
To resolve this we need to symlink the following library
pi@raspbmc:~$ sudo ln -s /lib/arm-linux-gnueabihf/ld-linux.so.3 /lib/ld-linux.so.3
Now dump a copy of the default configuration file
pi@raspbmc:~$ ./btsync --dump-sample-config >> sync.conf
We now have a sync.conf file with the default settings.
The following lines of the default configuration file require modification
“listening_port” : 55555,
“storage_path” : “/home/user/DataFolder”,
“use_upnp” : false,
“listen” : “0.0.0.0:8888”,
“login” : “admin”,
“password” : “password”
To start btsync automatically get the init.d script from https://gist.github.com/MendelGusmao/5398362
Copy the text to /etc/init.d/btsync
Allow execution of init.d script with chmod +x btsync
Edit the init.d script to set the username
copy the btsync binary to /usr/bin/btsync
Autostart the init.d script with
sudo update-rc.d btsync defaults
If you reboot your raspberry pi it should not start btsync automatically.
Following the reboot you should be able to access the web interface of bysync using the username, password and web address defined in the configuration file.
My address was http://192.168.0.2:8888
From here you can create folder shares.
On your router port forward the listening port to the raspberry pi.
The port you need is the one defined in the “Listening Port” in the configuration file.
I also needed to modify the raspbmc firewall to let external traffic into my listening port.
in /etc/network/if-up/secure-rmc look for the section with the lines that look like IP table configurations and add these two lines
iptables -A INPUT -p tcp --dport 55555 -i $IFACE -j ACCEPT
iptables -A INPUT -p udp --dport 55555 -i $IFACE -j ACCEPT
From the servers web interface create a one time key.
Add this key to the client and you will be syncing.