Syncthing: a private and secure synchronization tool for Synchronizing files/folders between computers

Source: Internet
Author: User
Tags syncthing

Syncthing: a private and secure synchronization tool for Synchronizing files/folders between computers

Syncthing is a free open-source tool that can synchronize files/folders between your network computers. Unlike other synchronization tools, such as BitTorrent Sync and Dropbox, the synchronized data is directly transmitted from one system to another, and it is completely open-source, secure and private. All your precious data will be stored in your system, so that you can have full control over your files and folders, no files or folders are stored in a third-party system. In addition, you have the right to decide where the data should be stored, whether to share it with a third party, or how the data is transmitted over the Internet.

All information communication is encrypted using TLS, so that your data can be securely escaped from snoop. Syncthing has a powerful responsive Web Page Management Interface (WebGUI, the same below) that helps you easily add, delete, and manage folders that are synchronized over the network. By using Syncthing, You can synchronize Multiple folders on multiple systems at a time. Syncthing is a portable, simple, and powerful tool for installation and use. When files or folders are directly transmitted from one computer to another, you do not need to consider paying money to the cloud service provider for additional cloud space. All you need is a very stable LAN/WAN connection and enough hard disk space in your system. It supports all modern operating systems, including GNU/Linux, Windows, Mac OS X, and Android.



For the purpose of this article, we will use two systems: Ubuntu 14.04 LTS and Ubuntu 14.10 server. To identify these two systems, we will call them System 1 and System 2 respectively.


System 1 Details:
  • Operating System: Ubuntu 14.04 LTS server;
  • Host Name: server1.unixmen. local;
  • IP Address:
  • System User: sk (you can use your own system user)
  • Synchronization Folder:/home/Sync/(Syncthing will be created by default)


System 2 details:
  • Operating System: Ubuntu 14.10 server;
  • Host Name: server. unixmen. local;
  • IP Address:
  • System User: sk (you can use your own system user)
  • Synchronization Folder:/home/Sync/(Syncthing will be created by default)


Create a user for Syncthing on system 1 and System 2

Run the following command on two systems to create a user for Syncthing and a synchronization folder between the two systems.

  1. sudo useradd sk
  2. sudo passwd sk


Install Syncthing for system 1 and System 2

Perform the following steps on system 1 and System 2.

Download the latest version from the official download page. I use the 64-bit version, so I downloaded the 64-bit version of the software package.

  1. wget

Decompress the downloaded file:

  1. tar xzvf syncthing-linux-amd64-v0.10.20.tar.gz

Switch to the decompressed Folder:

  1. cd syncthing-linux-amd64-v0.10.20/

Copy the executable file "syncthing" to $ PATH:

  1. sudo cp syncthing /usr/local/bin/

Run the following command to run Syncthing for the first time:

  1. syncthing

After you execute the preceding command, syncthing generates a configuration and some configuration key values, and opens a management interface in your browser.

Input example:

  1. [monitor]15:40:27 INFO:Starting syncthing
  2. 15:40:27 INFO:Generating RSA key and certificate for syncthing...
  3. [BQXVO]15:40:34 INFO: syncthing v0.10.20(go1.4 linux-386default) unknown-user@syncthing-builder 2015-01-1316:27:47 UTC
  5. [BQXVO]15:40:34 INFO:No config file; starting with empty defaults
  6. [BQXVO]15:40:34 INFO:Edit/home/sk/.config/syncthing/config.xml to taste oruse the GUI
  7. [BQXVO]15:40:34 INFO:Starting web GUI on
  8. [BQXVO]15:40:34 INFO:Loading HTTPS certificate: open /home/sk/.config/syncthing/https-cert.pem:no such file or directory
  9. [BQXVO]15:40:34 INFO:Creatingnew HTTPS certificate
  10. [BQXVO]15:40:34 INFO:Generating RSA key and certificate for server1...
  11. [BQXVO]15:41:01 INFO:StartingUPnP discovery...
  12. [BQXVO]15:41:07 INFO:Startinglocal discovery announcements
  13. [BQXVO]15:41:07 INFO:Startingglobal discovery announcements
  14. [BQXVO]15:41:07 OK:Ready to synchronize default(read-write)
  15. [BQXVO]15:41:07 INFO:Device BQXVO3D-VEBIDRE-MVMMGJI-ECD2PC3-T5LT3JB-OK4Z45E-MPIDWHI-IRW3NAZ is"server1" at [dynamic]
  16. [BQXVO]15:41:07 INFO:Completed initial scan (rw) of folder default

Syncthing has been successfully initialized, And the webpage management interface can also access URL: http: // localhost: 8080 through a browser. As shown in the preceding figure, Syncthing automatically creates a folder named default ** under the Sync directory in your home directory.

By default, the web page management interface of Syncthing can only be accessed on the local port (localhost). to access it remotely, You need to perform the following operations on the two systems:

First, press CTRL + C to terminate the Syncthing initialization process. Now you are back to the terminal interface.

Edit the config. xml file,

  1. sudo nano ~/.config/syncthing/config.xml

Find the following command:

  1. [...]
  2. <gui enabled="true" tls="false">
  3. <address></address>
  4. <apikey>-Su9v0lW80JWybGjK9vNK00YDraxXHGP</apikey>
  5. </gui>
  6. [...]

In the region, change 8080 to 8080. As a result, your config. xml looks like this:

  1. <guienabled="true"tls="false">
  2. <address></address>
  3. <apikey>-Su9v0lW80JWybGjK9vNK00YDraxXHGP</apikey>
  4. </gui>

Save and close the file.

Execute the following command again on the two systems:

  1. syncthing


Access the webpage management interface

Now, open http: // ip-address: 8080/in your browser /. You will see the following interface:

The webpage management interface is divided into two tabs. In the left pane, you can see the list of synchronized folders. As mentioned above, folder default is automatically created when you initialize Syncthing. If you want to synchronize more folders, click Add Folder.

In the right pane, you can see the number of connected devices. Now there is only one computer that you are working on.


Configure Syncthing on the web page

To improve security, enable TLS and set the administrator user and password for accessing the webpage management interface. To do this, click the gear button in the upper right corner and select Settings

Enter the account name/password of the Administrator. I set admin/Ubuntu. You should use more complex passwords.

Click Save. Now, you are asked to restart Syncthing to make the change take effect. Click Restart.

Refresh your web browser. You can see an SSL warning like below. Click the button that shows I understand the Risks. Then, click "Add Exception" to Add the current page to the Trust List of the browser.

Enter the administrator user and password set in the previous step. I set admin/ubuntu.

Now, we have improved the security of the web page management interface. Do not forget to perform the same steps on both systems.


Connect to other servers

To synchronize files between systems, you must tell them the information of other servers. This is achieved by switching the device IDs. You can find it by selecting "Show ID" in "gear menu" (in the upper right corner.

For example, the following is the ID of system 1.

Copy this ID and go to the webpage management interface of another system (System 2). Click Add Device in the right pane.

The following interface is displayed. Paste System 1 ID ** in the Device area **. Enter the device name (optional ). In the address area, you can enter the IP address of another system (LCTT: the system to which the pasted ID belongs, this should be System 1), or use the default value. The default value is dynamic. Finally, select the folder to be synchronized. In our example, the synchronization folder is default **.

Click save. You will be asked to restart Syncthing. Click Restart to make the change take effect.

Now, go to system 1's webpage management interface and you will see the connection and synchronization requests from system 2. Click Add. Now, system 2 requires system 1 to share and synchronize folders named default.

Restart the Syncthing service of system 1 to make the change take effect.

Wait about 60 seconds. Then you will see that the two systems have been successfully connected and synchronized.

You can check this situation in the Add Device area on the webpage management interface.

After System 2 is added, the control window in system 1 web page management interface is as follows:

After System 1 is added, the control window in the webpage management interface of System 2 is as follows:

Now, put any file or folder in the "default" folder of any system. You can see that these files/folders are automatically synchronized to other systems.

This article is complete! Happy synchronization!

Thank you !!!

  • Syncthing website


Author: SK Translator: XLCYun Proofreader: wxy

This article was originally translated by LCTT and launched with the Linux honor in China

This article permanently updates the link address:

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.