Whatbox Logo
Login for certain variables to be updated with your slot's information

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 18630 has automatically been generated and will be used throughout this article, but can be changed if needed.

Installation

  1. Connect to your slot through SSH

  2. Download Resilio Sync

    https://download-cdn.resilio.com/stable/rpm/x86_64/0/resilio-sync-3.0.1.1414-1.x86_64.rpm
    
  3. Extract Resilio Sync

    mkdir -p ~/rslsync; tar -xf resilio-sync_x64.tar.gz -C ~/rslsync/
    
  4. Create a sample configuration file

    mkdir -p ~/.rslsync; ~/rslsync/rslsync --dump-sample-config > ~/.rslsync/rslsync.conf
    
  5. Open the configuration file for editing

    nano ~/.rslsync/rslsync.conf
    
  6. 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",
    
  7. Move down the file to the line starting with /* use_upnp and change the use_upnp setting to false. Your configuration should look like the following example:

     /* use UPnP for port mapping */
     "use_upnp" : false,
    
  8. 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/",
    
  9. 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:18630" // remove field to disable WebUI
    

    Once you have made these edits, quit nano by pressing Ctrl+S followed by Ctrl+X.

  10. (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
    
  11. Start Resilio Sync with ~/rslsync/rslsync --config ~/.rslsync/rslsync.conf or rslsync if you completed step 9.

  12. Enter http://server.whatbox.ca:18630 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.

  13. (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:18630 into your browser.

Manual Update

  1. Connect to your slot through SSH

  2. Shut down Resilio Sync

    killall rslsync
    
  3. Download Resilio Sync

    rm ~/resilio-sync-*; wget https://download-cdn.resilio.com/stable/rpm/x86_64/0/resilio-sync-3.0.0.1409-1.x86_64.rpm
    
  4. Extract Resilio Sync

    mkdir -p ~/rslsync; rpmunpack resilio-sync-3.0.0.1409-1.x86_64.rpm; mv resilio-sync-3.0.0.1409-1.x86_64/usr/bin/rslsync ~/rslsync/
    
  5. Restart Resilio Sync with ~/rslsync/rslsync --config ~/.rslsync/rslsync.conf or rslsync if you completed the optional step 9 from the Installation section.

  6. (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.

  1. Make a file to be used for the script. touch ~/rslsync_restart.cron

  2. 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
    
  3. Save the file with Ctrl+x and the "y" and Enter to accept overwriting.

  4. Make the script executable. chmod +x ~/rslsync_restart.cron

  5. Open your crontab. EDITOR=nano crontab -e

  6. Enter the following text

     @reboot /home/user/rslsync_restart.cron >/dev/null 2>&1
     */5 * * * * /home/user/rslsync_restart.cron >/dev/null 2>&1
    
  7. Save the crontab with Ctrl+x and the "y" and Enter to accept overwriting.