4.1 Resilio Sync

Resilio Sync (formerly BitTorrent Sync) is an awesome way of replacing Dropbox with your a self-hosted, peer-to-peer based, private version. If your concerned about the security or the closed-source nature of Sync you might be better of using Syncthing instead, which is a bit more immature at the moment (in my opinion) but fully open source.

Install

For security reasons it's usually best to install daemons as a separate user without root permissions. Let's create a user:

adduser btsync

Follow the steps, then cd /home/btsync into the new user's home directory and download Sync:

sudo -s -u btsync
wget "http://download.getsyncapp.com/endpoint/btsync/os/linux-arm/track/stable"
tar -zxvf stable
rm stable
./btsync --dump-sample-config >> btsync.conf

Configure

You now have the executable in user btsync's home directory, with a configuration file called btsync.conf. Modify the configuration file to your wishes before you continue. I use the following settings:

  • "disk_low_priority": true,
  • "use_upnp" : false because I configure my router manually,
  • "lan_encrypt_data": false because encryption is though for the Pi,
  • "use_gui" : false for extra security,
  • "folder_rescan_interval": 1800 because I never manipulate synced files on the Pi directly, scanning the synced folder isn't needed very often.
  • modify the value for "listening_port" to a port you've opened for inbound traffic in iptables.

Run

Next, you'll want the app to run as a daemon in the background and to automatically run on boot, so for this purpose it's best to put a script in /etc/init.d/. Here's an example script that you can save as /etc/init.d/btsync.

Once you have saved the script (and possibly modified it to your wishes), make it run on boot using the following:

sudo chmod +x /etc/init.d/btsync
sudo update-rc.d btsync defaults

You can now do the following:

  • sudo service btsync start to run Sync,
  • sudo service btsync stop to stop it,
  • update-rc.d btsync remove to remote BTSync from boot.

results matching ""

    No results matching ""