How to install Syncthing to Sync files/folders between systems

To install Synthing to Sync files/folders between systems

Syncthing is a free application that is used to synchronize files or directories between any network of computers and it transfers files and directories directly from one system to another system. The entire communication in this process is encrypted. It has the most reliable WebGUI,that supports the users for adding, deleting or managing directories over network.

To install Syncthing

Requirements
System 1
Hostname : server1.linuxhelp.com
IP Address : 192.168.7.157
System 2
Hostname : server2.linuxhelp.com
IP Address : 192.168.7.158

To start installing syncthing in system 1
Add a user for syncthing by using the following command.

root@server1:/home/user1# useradd user2
root@server1:/home/user1# passwd user2
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

Next download the syncthing installation package from the official site.
https://github.com/syncthing/syncthing/releases/

root@server1:/home/user1# wget https://github.com/syncthing/syncthing/releases/download/v0.14.3/syncthing-linux-amd64-v0.14.3.tar.gz
--2016-08-09 13:05:10--  https://github.com/syncthing/syncthing/releases/download/v0.14.3/syncthing-linux-amd64-v0.14.3.tar.gz
&hellip 
&hellip 
2016-08-09 13:05:28 (410 KB/s) - ‘ syncthing-linux-amd64-v0.14.3.tar.gz’  saved [6281812/6281812]

Then extract the downloaded package by using the following command.

root@server1:/home/user1# tar xzvf syncthing-linux-amd64-v0.14.3.tar.gz 
syncthing-linux-amd64-v0.14.3/
syncthing-linux-amd64-v0.14.3/syncthing
..
&hellip 
syncthing-linux-amd64-v0.14.3/extra/Getting-Started.pdf
syncthing-linux-amd64-v0.14.3/extra/FAQ.pdf

Now change directory of the file and copy the syncthing executable file to location /usr/local/bin/.

root@server1:/home/user1# cd syncthing-linux-amd64-v0.14.3
root@server1:/home/user1/syncthing-linux-amd64-v0.14.3# cp syncthing /usr/local/bin/

Run the syncthing executable file.

root@server1:/home/user1/syncthing-linux-amd64-v0.14.3# syncthing 
[monitor] 13:09:34 INFO: Starting syncthing
[start] 13:09:34 INFO: Generating ECDSA key and certificate for syncthing...
[BE5MX] 13:09:34 INFO: syncthing v0.14.3 " Dysprosium Dragonfly"  (go1.6.3 linux-amd64) jenkins@build.syncthing.net 2016-07-28 11:15:14 UTC
&hellip 
&hellip 
BE5MX] 13:09:35 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BE5MX] 13:09:45 INFO: Detected 0 NAT devices
[BE5MX] 13:09:59 INFO: Joined relay relay://128.199.232.154:22067

press ctrl + c to stop the command.
Run the following command to edit the config.xml file.

root@server1:/home/user1/syncthing-linux-amd64-v0.14.3# nano ~/.config/syncthing/config.xml
Find this directive
< &hellip > 

< gui enabled=" true"  tls=" false" > 

< address> 127.0.0.1:8384< /address> 

< apikey> srNoNU4AmLVXRHLLFbjWXmbxZrWKGup9< /apikey> 

< theme> default< /theme> 

< /gui> 

< &hellip > 

And change 127.0.0.1 to 0.0.0.0, then save the file and exit
Then run the Syncthing executable file.

root@server1:/home/user1/syncthing-linux-amd64-v0.14.3# syncthing 
[monitor] 13:09:34 INFO: Starting syncthing
[start] 13:09:34 INFO: Generating ECDSA key and certificate for syncthing...
[BE5MX] 13:09:34 INFO: syncthing v0.14.3 " Dysprosium Dragonfly"  (go1.6.3 linux-amd64) jenkins@build.syncthing.net 2016-07-28 11:15:14 UTC
&hellip 
&hellip 

Open the browser and navigate to http://< IP_address> :8384.

To do the same configurations as in system 2

To install syncthing

Add a user for syncthing.

root@server2:/home/user1# useradd user2
root@server2:/home/user1# passwd user2
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully

Next download the syncthing installation package.
https://github.com/syncthing/syncthing/releases/

root@server2:/home/user1# wget https://github.com/syncthing/syncthing/releases/download/v0.14.3/syncthing-linux-amd64-v0.14.3.tar.gz
--2016-08-09 13:05:10--  https://github.com/syncthing/syncthing/releases/download/v0.14.3/syncthing-linux-amd64-v0.14.3.tar.gz
&hellip 
&hellip 
2016-08-09 13:05:28 (410 KB/s) - ‘ syncthing-linux-amd64-v0.14.3.tar.gz’  saved [6281812/6281812]

Now extract the package.

root@server2:/home/user1# tar xzvf syncthing-linux-amd64-v0.14.3.tar.gz 
syncthing-linux-amd64-v0.14.3/
syncthing-linux-amd64-v0.14.3/syncthing
..
&hellip 
syncthing-linux-amd64-v0.14.3/extra/Getting-Started.pdf
syncthing-linux-amd64-v0.14.3/extra/FAQ.pdf

Change the directory and then copy the syncthing executable file to the location /usr/local/bin/.

root@server2:/home/user1# cd syncthing-linux-amd64-v0.14.3
root@server2:/home/user1/syncthing-linux-amd64-v0.14.3# cp syncthing /usr/local/bin/

Now run the syncthing executable file.

root@server2:/home/user1/syncthing-linux-amd64-v0.14.3# syncthing 
[monitor] 13:09:34 INFO: Starting syncthing
[start] 13:09:34 INFO: Generating ECDSA key and certificate for syncthing...
[BE5MX] 13:09:34 INFO: syncthing v0.14.3 " Dysprosium Dragonfly"  (go1.6.3 linux-amd64) jenkins@build.syncthing.net 2016-07-28 11:15:14 UTC
&hellip 
&hellip 
BE5MX] 13:09:35 INFO: Access the GUI via the following URL: http://127.0.0.1:8384/
[BE5MX] 13:09:45 INFO: Detected 0 NAT devices
[BE5MX] 13:09:59 INFO: Joined relay relay://128.199.232.154:22067

Press ctrl + c to stop the command and edit the config.xml file

root@server2:/home/user1/syncthing-linux-amd64-v0.14.3# nano ~/.config/syncthing/config.xml
< &hellip > 
< gui enabled=" true"  tls=" false" > 
< address> 127.0.0.1:8384< /address> 
< apikey> srNoNU4AmLVXRHLLFbjWXmbxZrWKGup9< /apikey> 
< theme> default< /theme> 
< /gui> 
< &hellip > 

And change 127.0.0.1 to 0.0.0.0, then save the file and exit
Again run the Syncthing executable file, by using the following command.

root@server2:/home/user1/syncthing-linux-amd64-v0.14.3# syncthing 
[monitor] 13:09:34 INFO: Starting syncthing
[start] 13:09:34 INFO: Generating ECDSA key and certificate for syncthing...
[BE5MX] 13:09:34 INFO: syncthing v0.14.3 " Dysprosium Dragonfly"  (go1.6.3 linux-amd64) jenkins@build.syncthing.net 2016-07-28 11:15:14 UTC
&hellip 
&hellip 

Now open the browser and type the URL http://< IP_address> :8384

Navigate to the system 1 to configure the Syncthing webGUI.
Click settings.

Set the GUI authentication user and password, check the Use HTTPS for GUI and finally click save.

Open the browser and call https://< IP_address> :8384
Enter the GUI authentication user and password.

Repeat the same configuration in system 2.
Click settings.

Set the GUI authentication user and password, check the Use HTTPS for GUI and click save.

Open the browser and call the URL https://< IP_address> :8384
Login using the GUI authentication user and password.

To Connect to each other systems.
Goto system 1 and click add remote device.

And then move to system 2, choose Action and click showID

Copy the system 2 ID

Navigate to system 1 and paste the system 2 ID, change the compression to “ all data” , select the default folder and save.

Navigate to system 2, you can see the request from system 1. Click add device.



Change the compression to all data and select the default folder and save.

Click add folder.

Give path for the folder and click save.

Now goto system 1 and click add folder

Give path for the folder and click save.

Click share to share the folder with system 2.

System 2 files are in sync with system 1.

Tag : Syncthing
FAQ
Q
How to mentioned the customize ssh port number while executing the rsync process?
A
You can use the option of "-e 'ssh -p12345'" with "rsync" command to specified the customize port number while executing "rsync" process. Syntax: "rsync -Pave 'ssh -p1234' source destination"
Q
Are there limitations on the number of files to sync?
A
FreeFileSync imposes no artificial limitations on how many files you can sync. Practically speaking, the only limiting factor for extremely large sync jobs is the amount of free memory available: For each 1 GB of RAM, FreeFileSync can synchronize roughly 1.7 million file pairs at a time.
Q
can you Please share the document link for this ?
A
refer the following link, https://docs.syncthing.net/
Q
Is it available for multi-platform?
A
Yes it is Multi-Platform, refer this official site https://syncthing.net/ you can get the package for almost every platform
Q
can you Name similar softwares like this?
A
you can also try Resilio Sync, SyncTrayzor, SparkleShare