Wiki > Resilio Sync
Resilio Sync is a proprietary peer-to-peer synchronization tool.
A random port number between 10000 and 32767 is needed and will be used to access your Resilio Sync WebUI once setup is complete. The port number 20306 has automatically been generated and will be used throughout this article, but can be changed if needed.
Installation
-
Connect to your slot through SSH
-
Download Resilio Sync
wget https://download-cdn.resilio.com/stable/linux/x64/0/resilio-sync_x64.tar.gz
-
Extract Resilio Sync
mkdir -p ~/rslsync; tar -xf resilio-sync_x64.tar.gz -C ~/rslsync/
-
Create a sample configuration file
mkdir -p ~/.rslsync; ~/rslsync/rslsync --dump-sample-config > ~/.rslsync/rslsync.conf
-
Open the configuration file for editing
nano ~/.rslsync/rslsync.conf
-
Move down the file to the line starting with
/* storage_path
and change the storage_path dir to/home/user/.rslsync
. You will need to remove the//
from the beginning of the line. Your configuration should look like the following example:/* storage_path dir contains axillary app files if no storage _path field: .sync dir created in the directory where binary is located. otherwise user-defined directory will be used */ "storage_path": "/home/user/.rslsync",
-
Move down the file to the line starting with
/* use_upnp
and change the use_upnp setting tofalse
. Your configuration should look like the following example:/* use UPnP for port mapping */ "use_upnp" : false,
-
Move down the file to the line starting with
/* directory_root
and change the directory root path to/home/user/
. This change is required to allow Resilio Sync's web interface to operate properly. You will need to remove the//
from the beginning of the line. Your configuration should look like the following example:/* directory_root path defines where the WebUI Folder browser starts (linux only). Default value is / */ "directory_root" : "/home/user/",
-
Move down the file to the line starting with
"webui"
and change the WebUI port. Your configuration should look like the following example:"webui" : { "listen" : "0.0.0.0:20306" // remove field to disable WebUI
Once you have made these edits, quit
nano
by pressingCtrl+S
followed byCtrl+X
. -
(Optional) Create an alias for rslsync for easy startup. This will allow you to use
rslsync
rather than~/rslsync/rslsync --config ~/.rslsync/rslsync.conf
echo "alias rslsync='~/rslsync/rslsync --config ~/.rslsync/rslsync.conf'" >> ~/.bashrc; source ~/.bashrc
-
Start Resilio Sync with
~/rslsync/rslsync --config ~/.rslsync/rslsync.conf
orrslsync
if you completed step 9. -
Enter
http://server.whatbox.ca:20306
into your browser. You will need to set up a username and password for accessing Resilio Sync on your slot, as well as name for the Resilio Sync server running on your slot. -
(Optional) Clean up by removing the Resilio Sync install archive
rm -r ~/resilio-sync-*
HTTPS
Add your ResilioSync port on your Domain Page.
Usage
The user guides for Resilio Sync operation can be found here.
WebUI
- You can access the Resilio Sync WebUI by entering
http://server.whatbox.ca:20306
into your browser.
Manual Update
-
Connect to your slot through SSH
-
Shut down Resilio Sync
killall rslsync
-
Download Resilio Sync
rm ~/resilio-sync-*; wget https://download-cdn.resilio.com/stable/linux/x64/0/resilio-sync_x64.tar.gz
-
Extract Resilio Sync
mkdir -p ~/rslsync; rpmunpack resilio-sync-3.0.1.1414-1.x86_64.rpm; mv resilio-sync-3.0.1.1414-1.x86_64/usr/bin/rslsync ~/rslsync/
-
Restart Resilio Sync with
~/rslsync/rslsync --config ~/.rslsync/rslsync.conf
orrslsync
if you completed the optional step 9 from the Installation section. -
(Optional) Clean up by removing the Resilio Sync install archive
rm -r ~/resilio-sync-*
Automatically Restart
Software is software and sometimes it can crash. This will automatically restart your rslsync instance should it go offline for any reason.
-
Make a file to be used for the script.
touch ~/rslsync_restart.cron
-
Edit the file and enter the text below.
nano -w ~/rslsync_restart.cron
#!/bin/bash if pgrep -fx "/home/user/rslsync/rslsync --config /home/user/.rslsync/rslsync.conf" > /dev/null then echo "Resilio Sync is running." else echo "Resilio Sync is not running, starting Resilio Sync" /home/user/rslsync/rslsync --config /home/user/.rslsync/rslsync.conf fi exit
-
Save the file with Ctrl+x and the "y" and Enter to accept overwriting.
-
Make the script executable.
chmod +x ~/rslsync_restart.cron
-
Open your crontab.
EDITOR=nano crontab -e
-
Enter the following text
@reboot /home/user/rslsync_restart.cron >/dev/null 2>&1 */5 * * * * /home/user/rslsync_restart.cron >/dev/null 2>&1
-
Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.