How to use Syncthing for remote continuous file synchronization
Learn how to securely synchronize files between remote devices using Syncthing with Meshnet.
Introduction
Backing up files is a crucial aspect of data management and should be considered a top priority for individuals and organizations alike. Accidental deletion, hardware failure, malware attacks, and natural disasters are some potential threats that can lead to data loss. You can recover lost data and avoid potential disruptions by synchronizing files between different devices and using backup folders.
Syncthing is a free and open-source continuous file synchronization program. The app allows you to link various devices and exchange data between them in real time. In addition, Syncthing allows you to select a network interface on each device that is used for file synchronization.
Once you enable Meshnet on your device, it creates a new network interface using the NordLynx technology. This interface can then be used to increase the security of Syncthing file transfers even further with encrypted network tunnels. Moreover, you do not need to worry about allowing remote connections between your devices because Meshnet connects them to a single virtual network without poking additional holes in your firewall.
This article showcases how you can set up Syncthing on Windows, macOS, Linux, and Android devices and synchronize your files over Meshnet.
Installing Syncthing
To start the configuration, you need to install Syncthing on your system.
For convenience, the Syncthing Tray app will be used for Windows. Unlike the standard version, which requires an active terminal window during operation, Syncthing Tray can run in the background and be minimized to the system tray. If needed, alternative versions are available for download on Syncthing’s Community contributions page.
To install the app:
Visit the Releases page of the Syncthing Tray GitHub repository.
Download the latest
syncthingtrayinstaller archive for the 64-bit version of Windows.
Extract the downloaded archive.
Launch Syncthing Tray by opening the executable file.


Follow the setup wizard to configure Syncthing for your device.
If the Windows security alert box appears, select both the private and public networks options, and then click Allow access to allow incoming connections through the firewall.

Syncthing is now active and ready for use on your system. Additionally, the app will launch automatically each time you reboot your device. You can see the Syncthing Tray icon in your system tray.


To install the Syncthing macOS application bundle:
Visit the Releases page of the syncthing-macos GitHub repository.
Download the latest Syncthing
.dmgfile.
Open the downloaded file.
In the new window, drag and drop Syncthing to the Applications folder.
Launch Syncthing. If you receive a confirmation dialog, click Open.


Syncthing is now installed on your device and ready for use.
Launch Syncthing automatically
To ensure the highest up-time and continuous file synchronization, it is best to launch Syncthing every time your system is started. However, launching the app manually may get tedious. To auto-launch Syncthing upon each reboot:
In the menu bar, click the Syncthing icon and select Preferences.


Select the Start at login checkbox.


Syncthing will now automatically start each time you log in to your computer.
To install Syncthing on Linux:
Open Terminal.
Download and import Syncthing’s PGP key to your device by running this command:
sudo curl -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpgAdd the Syncthing repository to your repository list with this command:
echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.listFetch all available repository updates and install Syncthing by executing the following command:
sudo apt update && sudo apt install syncthing -y
Launch Syncthing automatically
To ensure the highest up-time and continuous file synchronization, it is best to launch Syncthing every time your system is started. On many Linux distributions, you can utilize SystemD to start the Syncthing process each time your device is started by taking these steps:
Open Terminal.
Run the following command to initiate the Syncthing service upon each reboot:
sudo systemctl enable syncthing@$USER.serviceExecute this command to start Syncthing right now:
sudo systemctl start syncthing@$USER.service
Syncthing is now active and ready for use on your system. You can check the status of the service with this command:
sudo systemctl status syncthing@$USER.serviceThe output should tell you that the service is active.

You can download and install the Syncthing app for Android from the following sources:
Releases page of the syncthing-android GitHub repository
F-Droid Android app repository
Configuring Syncthing for remote file synchronization
Once you install Syncthing, its web interface is created. You can use the web interface to control all aspects of Syncthing, including managing your synchronization folders and devices.
Set up web interface authentication
Even though, currently, the web interface can only be accessed from the host device, it is highly recommended to use username and password authentication. This is especially important to minimize the risk of unauthorized access if you plan to allow connecting to the web interface from other devices. To enable authentication:
Open your internet browser and visit the following URL:
127.0.0.1:8384/Under GUI authentication: set user and password, click the Settings button.


Switch to the GUI tab.
Type in your authentication details.
In the GUI authentication user field, enter your desired username.
In the GUI authentication password field, enter a secure password. Example


Click Save.
On the Authentication required screen, enter your newly created credentials and click Log in.

Connect remote devices
With authentication in place, you can start linking other devices for data synchronization. You must have control of both devices to complete the connection procedure.
Connect the host device
In your Syncthing web interface, under Remote devices, click Add remote device.
On the General tab specify the following information:
In the Device ID field, enter the Device ID of the remote device that you want to synchronize your files with.
In the Device name field, type in a custom name for the specific device.
Select the Advanced tab.
In the Addresses field, enter
tcp://<peer>:22000, replacing<peer>with the other device’s Nord name or Meshnet IP address. Example

Click Save.
Connect the client device
On the other device, you will receive a message asking if you want to connect with the new device. To finish linking the devices, you must accept the connection on the client device as well.
Open the Syncthing web interface.
Under New device, click Add device.


In the Device name field, enter a custom name for the device. Alternatively, you can leave the default name that was selected by the other device.
Switch to the Advanced tab.
In the Addresses field, enter
tcp://<peer>:22000, replacing<peer>with the host device’s Nord name or Meshnet IP address. Example

Click Save.
After a few seconds, the device status will change to Connected (unused).


Add synchronization folders
Syncthing automatically creates a default synchronization folder called Sync in the user’s home directory. Nevertheless, you can create and share multiple new folders with selected devices.
Share a folder from the host device
On the Syncthing web interface, under Folders, select Add folder.


Fill in the following fields:
In the Folder label field, type in a custom label to easily differentiate the folder.
In the Folder path field, enter the path to the folder you want to synchronize. If the folder does not exist, it will be created automatically.
Switch to the Sharing tab.
Under Unshared devices, select the devices that you want to synchronize the folder with.


Click Save.
The new folder is now visible under Folders on your Syncthing web interface.


Share a folder from the client device
On the client device, you will receive a message asking if you wish to add the shared folder to your system. To finish linking the folders:
Open the Syncthing web interface.
Under New folder, click Add.


Fill in the following fields:
In the Folder label field, type in a custom label to easily differentiate the folder.
In the Folder path field, enter the path where you want the synchronized folder to be located on your system.
Click Save.
The new folder should be visible under Folders on your device.
Your folders are now synchronized between your remote devices over Meshnet, and you can securely make backups of your storage hassle-free.
Optional: Allow access to the web interface from other devices
While having access to the web interface only from the host device is more secure, you may want to have access to it over the network. To change the address of the web interface:
On your Syncthing web interface, in the upper-right corner, select Actions > Settings.
Switch to the GUI tab.
Change the GUI listen address to
0.0.0.0:8384.

Click Save.
Your Syncthing web interface can now be accessed from the device’s local network or over Meshnet using the Nord name or the Meshnet IP address with the port number 8384.
Last updated
Was this helpful?