How to install resilio sync AKA rslsync (depreciated bitorrentsync bt sync)


#1

I loved btsync and while I :tulip: opensource I decided to stick with resilio sync when the main guys split off. I have contacted their team, and while they are helpful with troubleshooting their help articles about linux are poorly written. I suggested an edit and after 4 months they have made no changes to this linux “help”

So failing much info that is actually for the new service here arch wiki for rslsync

I have decided to write an article. I hope this helps. I am new to linux and welcome better ways to do this. However after many mess ups. This is what I found that works. Running system wide for all users doesn’t work. the rw permssons for the files get all messed up to and from other machines. You can read about my troubles here total headaches while I could include my emails with the support team… I won’t they support linux = good. However, they didn’t wish to make changes to their horrible to navigate help articles. I digress.

This will set up a user service for use with rslsync, system wide rslsync doesn’t work well.

to get rslsync working

yaourt rslsync
in the example below user and user group are andy
do not enable or start yet

step 1

first add andy to rslsync group
sudo usermod -a -G rslsync andy
add rslsync user to the andy group
sudo usermod -a -G andy rslsync

step 2

in the /home/user folder create
mkdir rslsync
cd rslsync
mkdir andyDocuments
cd …
sudo chown -Rv andy:rslsync rslsync
sudo chmod -Rv 770 rslsync
rslsync will be added to the web gui as to root folder to contain all the synced folders and files later. andyDocuments with be the first folder you add when you go into the web gui
mkdir .rslsync
sudo chown andy:rslsync .rslsync
sudo chmod 770 .rslsync
this folder will be used to store all the metadata about syncing

step 3

sudo mkdir -p ~/.config/rslsync
sudo cp /etc/rslsync.conf ~/.config/rslsync/rslsync.conf
cd ~/.config/rslsync
sudo chown andy:rslsync rslsync.conf
sudo chmod 770 rslsync.conf
this step copies the .conf file to a directory under the user config then change permission so the user and group can rw to it.

step 4

edit the config file
nano rslsync.conf
/* storage_path dir contains auxilliary app files if no storage_path fie$
“storage_path” : “/home/andy/.rslsync”,

/* set location of pid file */
“pid_file” : “/home/andy/.rslsync_pid/resilio.pid”,

the storage_path MUST be set to the folder where you want to store the metadata.

the pid_file MUST be set You will create this in step 5

Nothing else in this file needs to be changed.

step 5

the “pid_file” path needs to be created and permissions set
sudo mkdir -p /home/andy/.rslsync_pid
cd /home/andy
sudo chown andy:rslsync .rslsync_pid
sudo chmod 770 .rslsync_pid

step 6

start and enable the service as the user
systemctl --user start rslsync
systemctl --user enable rslsync

using enable will start the service at boot, which in most cases is what you want.
Note --user is not a place to put your user name in the example --andy you literally type --user

step 7

open up the web gui
http://localhost:8888/gui
enter a username and password
you can leave the password fields blank if you wish
choose a name to show when you sync files
Note the the name is how your files will be shown as synced to other machines so going with your system name might be a good move here.
tick the boxes to except terms

step 8

almost there!
subscribe to email list if you like or leave blank for no spam
in the upper left corner click add folder and navigate to
/home/andy/rslsync/andyDocuments
it will pop up with a dialog to share the folder.

Actually using resilio sync is outside the scope of this article as there are already many articles online to show you how to do that.


#2

Thanks for the guide step 2 seems to be missing cd .. after mkdir andyDocuments


#3

I just wanted to update this in case anyone is using this service

After a recent kernel update or perhaps to some other tweaking I was doing the rslsync system instance started running and enabled itself.

If a machine suddenly asks for a password when you either didn’t have one or it is disconnected

The reason probably is that a recent change to the system is running rslsync as system user
not as the home user i.e. dick or andysir (your username)

Try the following

2672 [2017-09-25 01:07:58] systemctl status rslsync
does it show running? note the PID to see it is different from the --user instance
2673 [2017-09-25 01:08:14] systemctl --user status rslsync
This probably will have failed and is not running
2674 [2017-09-25 01:08:48] systemctl stop rslsync
stop the system service
2675 [2017-09-25 01:09:07] systemctl status rslsync
note that is has stopped
2676 [2017-09-25 01:09:21] systemctl disable rslsync
Now make sure it doesn’t run at boot
2677 [2017-09-25 01:09:53] systemctl --user start rslsync
Start the user instance instead
2678 [2017-09-25 01:10:01] systemctl --user status rslsync
Checking it is running
2679 [2017-09-25 01:10:16] systemctl --user enable rslsync
Now have it run at boot
2680 [2017-09-25 01:10:23] systemctl --user status rslsync
It should show that it is now enabled at boot
2681 [2017-09-25 01:10:36] sudo shutdown -r now
Restart the system to make the darn thing happy and try
localhost:8888/gui

Good Luck :wink: