Resilio Sync

Resilio (formerly BitTorrent Sync) is a proprietary file syncing service similar to Dropbox that works with private peer-to-peer connections between connected devices. The peer-to-peer technology is based on the BitTorrent protocol. Resilio Inc., the company behind Resilio Sync, uses a freemium business model with a free tier called “Sync Home”.


Note

For this guide you should be familiar with the basic concepts of

Installation

Change into the ~/bin directory, download and extract the latest version of Resilio Sync:

[isabell@stardust ~]$ cd ~/bin
[isabell@stardust bin]$ wget https://download-cdn.resilio.com/stable/linux-x64/resilio-sync_x64.tar.gz
[isabell@stardust bin]$ tar --gzip --extract --file resilio-sync_x64.tar.gz
[isabell@stardust bin]$ rm resilio-sync_x64.tar.gz
[isabell@stardust bin]$

Configure web server

Note

Resilio is running on port 9000.

To make the application accessible from the outside, configure a web backend:

[isabell@stardust ~]$ uberspace web backend set / --http --port <port>
Set backend for / to port <port>; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Configure firewall port

Resilio Sync will work without this step, however, all connections will be routed through a relay server, since direct connections are blocked by the firewall.

To make the application accessible from the outside, open a port in the firewall:

[isabell@stardust ~]$ uberspace port add
Port 40132 will be open for TCP and UDP traffic in a few minutes.
[isabell@stardust ~]$

Configure Resilio Sync

Create a config file ~/.sync/resilio-sync.conf with the following contents:

Warning

Replace <username> with your username and <port> with the appropriate port number, which was opened in the previous step (would be 40132 in our example).

{
  "device_name": "Uberspace",
  "listening_port" : <port>, // 0 - randomize port

   "storage_path" : "/home/<username>/.sync",

   "webui" :
       {
       "listen" : "0.0.0.0:9000" // remove field to disable WebUI
       }
}

Configure supervisord

Create ~/etc/services.d/resilio-sync.ini with the following content:

[program:resilio-sync]
command=rslsync --nodaemon --config /home/isabell/.sync/resilio-sync.conf

Start Service

After creating the configuration, tell supervisord to refresh its configuration and start the service:

[isabell@stardust ~]$ supervisorctl reread
SERVICE: available
[isabell@stardust ~]$ supervisorctl update
SERVICE: added process group
[isabell@stardust ~]$ supervisorctl status
SERVICE                            RUNNING   pid 26020, uptime 0:03:14
[isabell@stardust ~]$

Now go to https://<username>.uber.space (would be https://isabell.uber.space in our example) and see if it works. Enjoy!

Update Resilio Sync

The webinterface will notify you when a new version of Resilio Sync is available. To install the update, download the latest binaries, extract them, and restart the service:

[isabell@stardust ~]$ cd ~/bin
[isabell@stardust bin]$ wget https://download-cdn.resilio.com/stable/linux-x64/resilio-sync_x64.tar.gz
[isabell@stardust bin]$ supervisorctl stop resilio-sync
[isabell@stardust bin]$ tar --gzip --extract --overwrite --file resilio-sync_x64.tar.gz
[isabell@stardust bin]$ rm resilio-sync_x64.tar.gz
[isabell@stardust bin]$ supervisorctl start resilio-sync
[isabell@stardust bin]$

Tested with Resilio Sync 2.5.12, Uberspace 7.1.4.0

Written by: Martin Porsch <https://github.com/kubiac/>