Install and Setup of Bit Torrent Sync (btsync) on Raspberry PI for Family Photo Sync

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.

Host Configuration

The following lines of the default configuration file require modification

“device_name”: “RaspberryPI-Craig”,
“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.

Network Configuration

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

Client Configuration

From the servers web interface create a one time key.

Add this key to the client and you will be syncing.

 

Advertisements

9 thoughts on “Install and Setup of Bit Torrent Sync (btsync) on Raspberry PI for Family Photo Sync

  1. Hi,

    I have a problem here if you could help me.
    I have port forwarded the 5555 UDP and TCP Port on my Router. (BTSync uses that)
    I have set the IPTables rules that you have written here on my Raspberry Server. I can sync between Machines on the Same Network, but not if they are on different networks! The Devices don’t find each other on different Networks….

    Do you know how to solve that? I want to use it for backups across multiple machines on different locations.

    Thanks in Advance!

    Like

  2. To the last poster:

    Port 5555 might have been the listening port on the author’s BTSync set-up – but yours is possibly something else.

    Go into the BTSync web UI on your Raspberry, and click on the “Preferences” button. It will open up a Settings Box that displays your unique listening port. This is the port you should forward from your Router to your RPI server.

    Good luck!

    Like

  3. The download link is dead. You need to now go to the getsync.com domain to download it. This also appears suspiciously close to a guide published days before yours on the btsync site. I don’t see any credits here..

    Like

  4. It was hard to find this article in google, but i’m glad i found
    your interesting site. You deserve for much more traffic.

    Your niche is not so hard to rank in google, there is one effective method to rank,
    search in google for: Rotia knows how to rank

    Like

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