Oct 042013

syncHave you finish your cloud space on Dropbox, Google Drive or one of the many cloud storage providers ? Or maybe you don’t trust them and you’d prefer a solution made with your computer/vps/Server ?

Good news, from some time there is a new solution available: BitTorrent Sync

BitTorrent Sync by BitTorrent, Inc is a proprietary peer-to-peer file synchronization tool available for Windows, Mac, Linux, Android, iOS and BSD. It can sync files between devices on a local network, or between remote devices over the Internet via secure, distributed P2P technology, so in short you can setup your own cloud storage and share your files among your devices.


P2P Protocol : BitTorrent Sync synchronizes your files using a peer-to-peer (P2P) protocol. This protocol is very effective for transferring large files across multiple devices, and is very similar to the powerful protocol used by applications like µTorrent and BitTorrent. The data is transferred in pieces from each of the syncing devices, and BitTorrent Sync chooses the optimal algorithm to make sure you have a maximum download and upload speed during the process.

The devices you setup to sync are connected directly using UDP, NAT traversal and UPnP port mapping. We also provide such additional methods of ensuring connectivity as relay and tracker servers. If your devices are on the same local network, BitTorrent Sync will use your LAN for faster synchronization.

Security -BitTorrent Sync was designed with privacy and security in mind. The system uses SRP for mutual authentication and for generating session keys that ensure Perfect Forward Secrecy. All traffic between devices is encrypted with AES-128 in counter mode, using a unique session key. Modification requests are all verified using Ed25519 signatures and only systems with full access keys can generate valid modification requests.

Secret – The secret is a randomly generated 20-byte key. It is Base32-encoded in order to be readable by humans. BitTorrent Sync uses /dev/random (Mac, Linux) and the Crypto API (Windows) in order to produce a completely random string. This authentication approach is significantly stronger than a login/password combination used by other services. That’s why using a secret generated by BitTorrent Sync is very safe and secure.

Versioning – BitTorrent Sync supports versioning starting from version 1.1.16. By default it creates and stores all the old copies of edited files for the period of 30 days


On the official site you can download a .tar.gz file (just click on the big red “Download” button and choose your Linux architecture) that contains the software, as alternative for some distributions it’s available a package in their specific format:

ArchLinux : The package it’s available via AUR, so if you have already configured this repository you can install it via the command:

yaourt -S bittorrent-sync

Ubuntu : There is a PPA available for Ubuntu, so you can easily install the software adding it via the commands:

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update

After this you can install one of the 2 packages, If you want to install it on a desktop use:

sudo apt-get install btsync-user

Or if you want to install it on a server (with no graphical interface) use:

sudo apt-get install btsync

Debian : Currently there are packages available for Debian squeeze, wheezy and sid supporting both i386 and amd64. In addition, there are armhf and armel packages for wheezy (usable also with raspbian) and armel packages for squeeze. The packages can be easily installed by adding the btsync repository and then installing as usual:

sudo gpg --keyserver pgp.mit.edu --recv-keys 6BF18B15
sudo gpg --armor --export 6BF18B15 | sudo apt-key add -
sudo echo deb http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list
sudo echo deb-src http://debian.yeasoft.net/btsync $(lsb_release -cs) main contrib non-free >> /etc/apt/sources.list.d/btsync.list
sudo apt-get update

As ubuntu you can now install the desktop version with:
sudo apt-get install btsync-user

Or the server version with:
sudo apt-get install btsync

More information on Debian and Ubuntu can be found on these links:

Debian and Ubuntu Desktop Packages for BitTorrent Sync
Debian and Ubuntu Server Packages for BitTorrent Sync

Basic Usage

This is a small list of steps that you have to achieve to get everything up and running:

  1. Install BitTorrent Sync on the devices you want to sync.
  2. Add a folder that you want to synchronize and generate a secret for that folder on one of the devices. The secret is random and unique, and functions like a key that connects multiple devices into one sync network.
  3. On the other devices, choose a folder to sync and enter the same secret.
  4. Leave BitTorrent Sync running on all devices you want to keep in sync.
  5. Manage your sync folders at any time via the application interface on Windows and Mac, Linux (WebUI and config file), or mobile.

Please note that On Linux, BitTorrent Sync can be accessed and managed via Web UI or command line.

WebUI can be accessed by default at YourLocalIP:8888/gui
*Default port 8888 can be changed in the config file (get example by running –dump-sample-config).


CLI (Command line interface) is an alternative way of managing BitTorrent Sync.
You can get a list of available commands by running BitTorrent Sync with –help argument.

Config file in Linux

Config file offers a slightly wider variety of options to configure. It is a JSON format file.
In order to set preferences using a config file, first get a sample config by running –dump-sample-config. You’ll see a list of options and commentary.

* For example, to save it to the current directory, run:

./btsync --dump-sample-config > sync.conf

After you saved the config file, you can customize it and then run BitTorrent Sync with the
modified config.

*For example, if your config file is in the same directory with BitTorrent Sync, run:

./btsync --config sync.conf


BitTorrent Sync can be a perfect solution if you have a VPS or a server at home that you can keep always (or most of the time) on and online, in this way you’ll be able to have your own “private cloud storage” and have your files in-sync between your computers and your mobile devices.

But this can be also a great alternative to move files/keep them in sync on different servers.

Definitely a software that can generate a lot of interesting solutions.

Popular Posts:

Flattr this!

  One Response to “BitTorrent Sync: Automatically sync files on your Linux Devices”

  1. Whoa! You helped me man.. I’m looking for an alternative to DropBx for its privacy implications.. I’ll definitely try this as well as GNU MediaGoblin…

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>