Manually Installing Resilio Sync (rslSync) on the Raspberry Pi: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
= raspbian on the Raspberry Pi = | = raspbian on the Raspberry Pi = | ||
Once raspbian has been installed or imaged it is very simple to setup | Once raspbian has been installed or imaged it is very simple to setup Resilo Sync. Normally I would create an image but as this is so simple I will just include the instructions. | ||
== Create Folder for | == Create Folder for Resilo Sync == | ||
<pre> | <pre> | ||
sudo mkdir -p /opt/resilio/bin | sudo mkdir -p /opt/resilio/bin | ||
Line 15: | Line 15: | ||
<pre> | <pre> | ||
sudo vi /etc/init.d/ | sudo vi /etc/init.d/rslsync | ||
</pre> | </pre> | ||
Line 22: | Line 22: | ||
<pre> | <pre> | ||
#! /bin/sh | #! /bin/sh | ||
# /etc/init.d/ | # /etc/init.d/rslsync | ||
# | # | ||
Line 44: | Line 44: | ||
Set appropriate permissions for the new file and set defaults for service. | Set appropriate permissions for the new file and set defaults for service. | ||
<pre> | <pre> | ||
sudo chmod 755 /etc/init.d/ | sudo chmod 755 /etc/init.d/rslsync | ||
sudo update-rc.d | sudo update-rc.d rslsync defaults | ||
</pre> | </pre> | ||
Line 59: | Line 59: | ||
<pre> | <pre> | ||
{ | { | ||
"device_name": "My | "device_name": "My Resilo Sync", | ||
"listening_port" : 0, // 0 - randomize port | "listening_port" : 0, // 0 - randomize port | ||
Line 123: | Line 123: | ||
// Advanced preferences can be added to config file. | // Advanced preferences can be added to config file. | ||
// Info is available in | // Info is available in Resilo Sync User Guide. | ||
// http://btsync.s3-website-us-east-1.amazonaws.com/BitTorrentSyncUserGuide.pdf | // http://btsync.s3-website-us-east-1.amazonaws.com/BitTorrentSyncUserGuide.pdf |
Revision as of 08:51, 19 September 2016
raspbian on the Raspberry Pi
Once raspbian has been installed or imaged it is very simple to setup Resilo Sync. Normally I would create an image but as this is so simple I will just include the instructions.
Create Folder for Resilo Sync
sudo mkdir -p /opt/resilio/bin sudo mkdir /opt/resilio/app_files cd /opt/resilio/bin sudo wget https://download-cdn.getsync.com/stable/linux-arm/resilio-sync_arm.tar.gz sudo tar -xvf resilio-sync_arm.tar.gz sudo rm -f resilio-sync_arm.tar.gz
Create a Service
sudo vi /etc/init.d/rslsync
Copy the following contents into the file.
#! /bin/sh # /etc/init.d/rslsync # # Carry out specific functions when asked to by the system case "$1" in start) /opt/resilio/bin/resilio --config /opt/resilio/bin/resilio.conf ;; stop) killall resilio ;; *) echo "Usage: /etc/init.d/resilio {start|stop}" exit 1 ;; esac exit 0
Set appropriate permissions for the new file and set defaults for service.
sudo chmod 755 /etc/init.d/rslsync sudo update-rc.d rslsync defaults
Configuration File
Create a configuration file with your required settings. Pay special attention to the login and password fields as the default login is username and the default password is password. Also pay attention to the listening value as I have used port 80 which is the default port for HTTP.
sudo vi /opt/resilio/bin/resilio.conf
Add the following contents to the new file.
{ "device_name": "My Resilo Sync", "listening_port" : 0, // 0 - randomize port /* storage_path dir contains auxilliary 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" : "/opt/resilio/app_files", // uncomment next line if you want to set location of pid file "pid_file" : "/var/run/resilio.pid", "check_for_updates" : true, "use_upnp" : true, // use UPnP for port mapping /* limits in kB/s 0 - no limit */ "download_limit" : 0, "upload_limit" : 0, /* remove "listen" field to disable WebUI remove "login" and "password" fields to disable credentials check */ "webui" : { "listen" : "0.0.0.0:80", "login" : "username", "password" : "password" } /* !!! if you set shared folders in config file WebUI will be DISABLED !!! shared directories specified in config file override the folders previously added from WebUI. */ /* , "shared_folders" : [ { // use --generate-secret in command line to create new secret "secret" : "MY_SECRET_1", // * required field "dir" : "/opt/resilio/sync_test", // * required field // use relay server when direct connection fails "use_relay_server" : true, "use_tracker" : true, "use_dht" : false, "search_lan" : true, // enable sync trash to store files deleted on remote devices "use_sync_trash" : true, "sync_trash_ttl" : 365, // Default is 30 days. // specify hosts to attempt connection without additional search "known_hosts" : [ "192.168.1.2:44444" ] } ] */ // Advanced preferences can be added to config file. // Info is available in Resilo Sync User Guide. // http://btsync.s3-website-us-east-1.amazonaws.com/BitTorrentSyncUserGuide.pdf }
Mount a USB Hard Disk
There is not much space if just using the inbuilt SD card as storage so have a look at Mount_USB_Device to connect a USB hard disk to your rPi.