Thursday, April 25, 2024
HomeHow toHow to Install Resilio Sync File Sharing Tool on Ubuntu 22.04

How to Install Resilio Sync File Sharing Tool on Ubuntu 22.04

Resilio Sync is a proprietary peer-to-peer file synchronization tool for Linux, FreeBSD, Mac, Windows, Android, iOS, Amazon Kindle Fire, and NAS devices. It is a reliable file-sharing and syncing tool developed by Resilio, Inc. It does not require a centralized server to store files. You just need to install Resilio Sync on the server and start sharing and syncing files via the BitTorrent protocol.

Features

  • Send a large file via email.
  • Secure Links for Sharing.
  • Fast, reliable, and simple.
  • Manage access permissions
  • Manage permissions on the fly.
  • Access from anywhere Control bandwidth usage

This post will show you how to install Resilio Sync on Ubuntu 22.04.

Prerequisites

  • A server running Ubuntu 22.04.
  • A root password is configured on the server.

Update Your System

Before starting, you will need to update and upgrade all software packages to the latest version. You can update them using the following command:

apt update -y
apt upgrade -y

After updating all the system packages, you can proceed to the next step.

Add Resilio Sync Repository

The Resilio Sync package is not available in the Ubuntu 22.04 default repository. So you will need to install it from the Resilio Sync official repository.

First, install the required dependencies using the following command:

apt-get install gnupg2 curl wget git software-properties-common acl -y

Next, download and import the GPG key with the following command:

wget http://linux-packages.resilio.com/resilio-sync/key.asc
apt-key add key.asc

Next, add the Resilio Sync repository to APT using the following command:

add-apt-repository "deb http://linux-packages.resilio.com/resilio-sync/deb resilio-sync non-free"

Once the repository is added, update the repository using the following command:

apt-get update -y

Once the repository is up-to-date, you can proceed to install Resilio Sync.

Install Resilio Sync Ubuntu 22.04

Now, run the following command to install Resilio Sync on your server.

apt-get install resilio-sync -y

Next, start the Resilio Sync service and enable it to start at after the system reboot.

systemctl start resilio-sync
systemctl enable resilio-sync

Now, verify the status of the Resilio Sync with the following command:

systemctl status resilio-sync

You will get the following output:

? resilio-sync.service - Resilio Sync service
     Loaded: loaded (/lib/systemd/system/resilio-sync.service; disabled; vendor preset: enabled)
     Active: active (running) since Tue 2022-12-13 06:01:06 UTC; 15s ago
       Docs: https://help.resilio.com
    Process: 95865 ExecStartPre=/bin/mkdir -p ${SYNC_RUN_DIR} ${SYNC_LIB_DIR} (code=exited, status=0/SUCCESS)
    Process: 95866 ExecStartPre=/bin/chown -R ${SYNC_USER}:${SYNC_GROUP} ${SYNC_RUN_DIR} ${SYNC_LIB_DIR} (code=exited, status=0/SUCCESS)
    Process: 95867 ExecStart=/usr/bin/rslsync --config ${SYNC_CONF_DIR}/config.json (code=exited, status=0/SUCCESS)
    Process: 95869 ExecStartPost=/bin/sleep 1 (code=exited, status=0/SUCCESS)
   Main PID: 95868 (rslsync)
      Tasks: 16 (limit: 2238)
     Memory: 13.2M
        CPU: 62ms
     CGroup: /system.slice/resilio-sync.service
             ??95868 /usr/bin/rslsync --config /etc/resilio-sync/config.json

Dec 13 06:01:05 ubuntu2204 systemd[1]: Starting Resilio Sync service...
Dec 13 06:01:06 ubuntu2204 systemd[1]: Started Resilio Sync service.

By default, Resilio Sync listens on port 8888. You can check it with the following command:

ss -antpl | grep 8888

You should see the following output:

LISTEN 0      10         127.0.0.1:8888       0.0.0.0:*    users:(("rslsync",pid=95868,fd=16))                                                                                                                                                                                                                                                                             

Configure Resilio Sync

By default, Resilio Sync listens on the local host. In order to access the Resilio Sync from the remote devices, you will need to change the local host to your server IP.

nano /etc/resilio-sync/config.json

Change the following lines:

{
    "storage_path" : "/var/lib/resilio-sync/",
    "pid_file" : "/var/run/resilio-sync/sync.pid",

    "webui" :
    {
        "force_https": true,
        "listen" : "your-server-ip:8888"
    }
}

Save and close the file then restart the Resilio Sync service to apply the changes:

systemctl restart resilio-sync

Next, you will need to create a directory that you want to share using Resilio Sync. You can create it with some files using the following command:

mkdir /mnt/files/
touch /mnt/files/doc1.txt
touch /mnt/files/doc2.txt

Next, set proper permission using the following command:

setfacl -R -m "u:rslsync:rwx" /mnt/files

Once you are done, you can proceed to the next step.

Access Resilio Sync Web UI

Now, open your web browser and access the Resilio Sync web interface using the URL https://your-server-ip:8888/. You will be redirected to the admin user creation page:

Set your admin username, password and click on the Continue button. You should see the following page:

Define your Resilio Sync name and click on the Get started button. You should see the following page:

Now, click on the + button. You should see the following page:

Click on the Standard folder. You should see the following page:

Select the folder that you want to share and click on the Open button. You should see the following page:

Click on the Link tab to generate a share link. You should see the following page:

Now, click on the X button to close the link-sharing interface.

Now, go to the remote device and access your shared folder using the link which you have copied. You should see the shared folder on the following page:

Conclusion

In this post, we explained how to install the Resilio Sync server on Ubuntu 22.04 server. You can now deploy Resilio Sync on your personal server and use it to share files with other users. Feel free to ask me if you have any questions.


RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here


spot_img

Most Popular