Backup & File Protection with Syncthing

Syncthing is a file/folder replication tool which consists of a Web client. This tool is essentially server-less since it consists of clients which all have peer relationships. It’s possible to replicate a folder structure across many clients as well.

image
Syncthings can work over the LAN or over the Internet. In order to lower your threat surface, I would be inclined to configure Syncthings for the LAN and handle replication only when you are on your home network or when you have a VPN connection to your home network.
Syncthing is available for a broad set of devices including Windows, macOS, Linux and Android.
image
I installed Syncthings on QNAP QTS as a QPKG through the QNAP Club store.
image
Syncthing uses two IP ports. A client computer has the Syncthing web interface offered on http://127.0.0.1:8384.
image
The actual replication take place via TLS on TCP/UDP port 22,000. Communication is bidirectional and it is possible to replicate in either one or both directions.
SyncThings also has the concept of “versioning” where it can keep track of multiple versions of a file according to rules that you establish.
image
Each Syncthings client can replicate one or more folders with one or more client devices.
image
My Syncthings configuration on my QNAP NAS is a Syncthings client like all other installations of the product. The difference is that I access the interface from my NAS address rather than the lapback address on the device locally.

The screenshot below shows three computers that I am replicating and my phone. My phone replicates its DCIM Camera folder to the QNAP NAS. I have chosen to only replicate to the NAS rather than bidirectionally.
image
Folder definition on the NAS provides the path to replicate the incoming data into. The folder label is just a name, but the Folder ID needs to be the same is on the system sending the data, because that is a way to identify that it is the same folder. Syncthings usually makes this a random string of characters.
image
The sharing tab indicates which clients that a given folder are sharing to.
image
Installing Syncthing involves a couple steps. Below I am downloading the Linux version of Syncthings.
image
I extract the folder strructure from the archive and I place it in my home folder.
image
In the case of Windows, you just run the installation package.
In linux, I just double click the Syncthings startup and then add it to the startup application folder.
image
Here is adding it to the startup applications.
image
This is how it looks added to the startup applications.
image
Once, you launch the application, it takes about three minutes to start up. Once it has started, your web browser will pop up just like in a wifi hotspot. The browser will navigate to http://127.0.0.1:8384.
image
You can ackknowlege the usage statistics or not.
The next thing you should do is go to settings and create a username and password.
image
In settings, the authorization data is set in the GUI tab.
image

Once you change the login info, Syncthing will make you log back in and the main screen will look like this.
image
I normally click on, edit, and delete the default folder.
image
Click add a folder to choose a folder you want to replicate. I generally set the folder ID the same as the label for simplicity.
image
Now the folder is added, but not yet shared.
image
At the bottom of the screen, click “Add Remote Device”, This is assuming that you have added at least one other Syncthing client on your network. If so, it will give you an authorization number and you can give the device a name. This is how the security works. The authorization number is an access key.
image
As you can see above, even though I added “VMSCloud” as a remote sync partner, it shows that it is disconnected. That’s because the action of adding a replication must be acknowledged at both ends for security reasons.

If I now go back to the Syncthing client on VMSCloud, it will flag an incoming request for our new client to connect.
image
I then click on Add device and check the box for “introducer” under the sharing tab and click save.
image
We now see “LXC-Ubuntu” from the VMSCloud Syncthing client.
image
Notice that is says “Connected” but unused. Go back to the LXC-Ubuntu Syncthing client and edit the LXC-Documents folder. Go to the “Sharing” tab and put a checkbox in the VMSCloud
to start sharing and click save.
image
Now the folder shows that it is “up to date”.
image
The folder is not replicating yet. You must go back to the VMSCloud Syncthing client. You will see a message indicating there is a new shared folder on VMSCloud.
image
Click the “Add”. In order to see your replicated documents from File Station on the QNAP, you must create a path to an existing folder and not accept the default.
image
Once you click save, replication starts and the folder will replicate.
image
I created a test document in the LXC-Ubuntu and it replicated to VMSCloud. Click on the folder in Syncthing and you can always see the stats.
image
Now edit the folder on VMSCloud and go to the file versioning tab and set it to simple versioning.
image
I edited the document twice back on LXC-Ubuntu. Here’s what the folder looks like on the NAS in File Station.
image
If I now go into the .stversions folder, I can see the earlier versions of the file.
image
Syncthing is a very powerful tool with many options.

In my experience, it is excellent at file replication and data protection with the use of file versioning.
image
Although there is no client/server concept, this peer to peer client design can create a mesh whereby multiple systems keep a replicated copy of the same data. My documents folder is an example of this because it is shared between VMSCloud, Putteroom, Mondo, and Laptop-Ubuntu.
image
Good luck and enjoy Syncthing. A great Open Source Solution.

1 Like

Also, there are alternatives that are very reliable, full-featured , easy, and quick such as Syncback, Gs Richcopy 360 , Syncovery and Resilio , search all

@Terry_Lampart the best part about Open Source is there are always lots of alternatives and so I have found that having that choice is what makes life in Linux awesome.

1 Like