Graham Eddy

Resilio Sync Server

Install Resilio Sync server to provide peer-to-peer synchronisation of directories & files between hosts.

This is applied to synchronise multiple copies (instances) of shares, each of which is accessed by its local users (either directly or via smb, nfs or similar).

2021-03-14 Ubuntu 20.10-22.04, macOS 10.13-12.5


In this example, we create Resilio Sync share photos.


Installation

macOS installation

is by a macOS installer downloaded from www.resilio.com. This installs server and desktop client, with short-cut icon on menubar.

Creating new shared directories:

graham:~ sudo mkdir -p /Users/Shared/photos graham:~ sudo chown graham:staff /Users/Shared/photos

Ubuntu installation

graham:~ echo "deb:http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free" | \ sudo tee /etc/apt/sources.list.d/resilio.list graham:~ curl -LO http://linux-packages.resilio.com/resilio-sync/key.asc && \ sudo apt-key add key.asc graham:~ sudo apt update graham:~ sudo apt install resilio-sync

The client is a browser on server hosts's port 8888.

graham:~ sudo vi /etc/resilio-sync/config.json
/etc/resilio-sync/config.json make it look like this
{
    "storage_path" : "/var/lib/resilio-sync/",
    "pid_file" : "/run/resilio-sync/sync.pid",

    "webui" :
    {
        "force_https": true,
        "listen" : "0.0.0.0:8888"
    }
}
graham:~ sudo systemctl restart resilio-sync

Now browse to Resilio sync client to complete the configuration:

https://localhost:8888/ select name and password for Resilio Sync admin user.
    User:     [ admin           ]
    Password: [ password        ]
graham:~ sudo adduser graham rslsync

Creating new shared directories:

graham:~ sudo mkdir -p /srv/share/photos graham:~ sudo chown rslsync:rslsync /srv/share/photos graham:~ sudo chmod 02770 /srv/share/photos

Creating an entirely new share

A Resilio Sync share is uniquely identified by a key e.g. BVMAWEBAVWBXTAGBFPBI4O7LZTGB2ZECE.

This share might have multiple instances/replicants, each managed by a Resilio Sync server with an associated share root directory. This server might in turn be managing multiple shares.

Resilio Sync client Folders view
  1. Select + to cause popup for a new (to this server) share to manage
  2. Select Standard folder to create an entirely new share i.e. allocate a new, unique key
  3. Select an existing, share root directory for the new share
  4. Dismiss the popup

Creating a new share instance (clone of existing share)

Get key of existing share

Keep a copy of the shares' keys in a file handy for copy&paste. Otherwise, each key can be fetched from servers as needed:

Use the Resilio Sync client to talk to the Resilio Sync server that is managing an existing share instance to be cloned. Either browse to that host and run run the web client there, or log into that host and run/display its desktop client.

Resilio Sync desktop client Show keys
  1. Select Folders View to get list of shares
  2. Hover over the share to be cloned
  3. Select the Share action on that line, causing popup
  4. Select Key mode (to get figure shown above)
  5. Under Read & Write section, click Copy

Use key to clone to local share instance

Use the Resilio Sync client to talk to the local Resilio Sync server that will manage the new share instance being cloned from existing.

Resilio Sync client Enter existing key
  1. Select + to cause popup for a new entry.
  2. Select Enter a key or link.
  3. Paste the read&write-capable key into the provided field, hit Next, causing popup.
  4. Select a directory for the cloned copy to be stored in. This directory need not be empty; its content becomes part of the share (replicated to the other instances).

Sync'ing starts immediately.