Photo by Alexandru Acea

Syncthing Tips & Tricks

Syncthing is a fantastic decentralized file synchronization utility, which functions in a manner similar to other cloud storage services like Dropbox or Google Drive, but is self-hosted and does not require a central server to operate.

We recently covered Syncthing on another blog post and wanted to give some further more condensed tips for first time users.

Pertaining to Setup

Syncthing is very simple to install. On most platforms you will simply need to download the latest version of Syncthing Core from syncthing.net, quickly extract a compressed archive, and run the program.

When Syncthing is first installed, the Web UI will launch on https://localhost:8384/.  You can change the listen IP later if you need to access the instance remotely.

When you’re setting up your first shared folder on Syncthing, there are two identifiers that are important to remember.

Folder IDs

The Folder ID is the identity of a shared folder.  This ID is generated by the first peer who creates a shared folder, and then it should be given out to all other peers that you want to share the folder with.  So, it’s created randomly, then never changes for the life of the shared folder.

To create a new shared folder, you simply need to click the Add Folder button.  If you have an existing shared folder and need to get the ID, you can find that information within the Shared Folders pane in the web UI for existing folders.

Device IDs

The Device ID is the identity of the Syncthing instance itself, so this is the identifier for a computer or other device that you want to share with.  This ID is randomly generated during the installation of Syncthing without any user action required. It does not change for the length of the existence of the Syncthing installation on the device.

This ID is used to initiate sharing with other instances, so you will need to know your peers’ device IDs in order to start sharing folders with them.

This ID can be easily obtained by going to Actions > Show ID (found on the upper right corner of the Web UI).

Pertaining to Global Settings

Automatic Updates

Syncthing is not usually installed through a package manager, so you may be wondering about keeping it up to date.  You can turn on Automatic Upgrades from Actions > Settings > General in the Web UI. Generally, you should choose “Stable releases only” as your update option.  This is on by default.

Bandwidth Limiting

Sometimes, you may be using Syncthing on an Internet connection where there is other traffic which should be taking priority.  If you happen to be on a residential Internet connection like most Syncthing users, chances are that you don’t have a lot of upload bandwidth available, and Syncthing pushing out file changes might not be as high priority to you as making sure that your Netflix stream isn’t buffering.

You can turn on incoming or outgoing rate limiting from Actions > Settings > Connections.  The limits are set in kilobytes per second. A good strategy might be to run a speed test on your Internet connection and then set the Syncthing limit to 80% or less than your typical upload speed.  This is usually a good amount to prevent saturating your connection under most conditions.

Bandwidth limits are not turned on by default when you install Syncthing.

Pertaining to Shared Folders

Rescan Interval

To conserve server resources, you may want to increase your rescan interval time.  A very low rescan interval time can cause disk load issues, especially if you have a large amount of files.  You can find this setting by clicking the Edit button on the shared folder from within the Web UI and expanding Advanced Settings.

If you do configure a high rescan interval, you should know that any files added to the folder will take longer to propagate to peers on the network.  You can manually expedite the process by starting a rescan, which can be done by clicking the Rescan button on the shared folder in the Web UI.

Another reason that I’ve found to set this to a higher value is if a rescan occurs while you are transferring files into the folder (such as downloading a file from the Internet into the folder), you can end up syncing out a partial file version.  This is just generally a waste of bandwidth, as Syncthing will have to sync out the full file once the download finishes. It also creates a buildup of corrupt “file versions” on your other peers if they have versioning turned on. So, if you are going to be putting this folder somewhere that it may be receiving slow file transfers, that is another consideration for changing this setting.

File Versioning

Syncthing supports several different types of file versioning.  You can configure the method that you want to use, as well as the maximum age of file versions to retain.  This works similar to “revision history” features in popular cloud storage platforms like Dropbox. By default, revisions are stored in the .stversions folder.

You can configure the settings by clicking the Edit button on the shared folder and expanding the Advanced Settings section.

I have been using Staggered File Versioning, and this has worked well for me.  To understand the different types of file versioning, you may want to consult the Syncthing documentation.

Accessing and restoring old versions of files is as simple as clicking the Versions button on the shared folder and finding the revision that you want to restore from there, it can all be done through the web UI, or you can manually access the file yourself from the .stversions folder in your shared folder’s root directory.

Pertaining to Devices

Introducers

An “Introducer” is a distinction of a peer which can be very useful when used correctly.

Say that you have some files that you share with John, and John wants to share the same files with his friend Sally.  You don’t know Sally, but you don’t mind John’s friends connecting to you as a peer to increase the speed and reliability of the file transfers.  Instead of Sally contacting you with her device ID, you can simply configure John to be an “introducer.” That way, any device John sets up as his peer will automatically become your peer as well.

There are some situations where this can be a drawback.  For instance, if you’re trying to remove a dead peer from the network, your introducers might have a nasty habit of introducing it back to you.  It may be necessary for you to temporarily disable this option while you are trying to delete peers, but otherwise, it can be left on for convenience.

Conclusion

Hopefully, these tips will be insightful for you in setting up your first Syncthing network.  Most of the features of Syncthing are very self explanatory, but as a user for over a year, I compiled these tips for you based on my experiences and the inconveniences that I’ve encountered.

If you have any further questions about Syncthing, I can’t stress enough that their documentation is fantastic, very detailed, and really worth a look. 

 

Have a question? chat with our specialists.