Syncthing (Wikipedia) - Overview and Practical Guide
0. TL;DR
- make sure you know how to use SSH-Certs with either kmk or certagent to login to departmental servers, including by using a jump host
- make sure Syncthing is installed on all devices where you want to use it - see sections 2.A Desktop/Laptop and/or 2.B Server below
- when syncing to a departmental server, make sure you have enough disk quota as described in the 2.Getting started section
- make sure you know the (Syncthing) login name and (Syncthing) password and (Syncthing) GUI port for each of your Syncthing devices
- make your devices known to each other with Add Remote Device in their web interfaces
- start with a star topology to keep it simple and use the departmental server as your central device
- create or select a directory/folder you want to sync and add it on the device where that directory/folder resides with Add Folder in its web interface
- create a sync connection with all other devices you want to sync that folder with via the Sharing tab of the Folder Edit
- you must explicitly accept the sync connection on each of those devices.
- read the Important Advice at the end of this page
1. Overview
How Syncthing Works
- Syncthing operates with devices: each device is a computer or server running a Syncthing process.
- Each device can share one or more folders and subscribe to folders shared by other devices.
- Terminology used in this document:
- Folder: a name for a group/tree of files that can/will be synced
- on each device a Syncthing folder corresponds to a (sub)directory where the synchronised files are stored
- the names of those (sub)directories do not need to be the same on all devices
- Sync-connection: the synchronisation link between two devices for a specific Syncthing folder.
- Folder: a name for a group/tree of files that can/will be synced
- All devices participating in a folder work together to keep that folder identical.
- After the initial synchronisation, it no longer matters which device originally created or shared the folder.
- Any device may stop syncing a folder at any time without affecting the ability of the remaining devices to continue syncing.
Sync Topology
- You must decide, per device, which other devices it will sync a particular folder with.
- Common setup: a star topology, where multiple devices sync with one central device.
- This central device becomes a single point of failure.
- However, it keeps configuration and the mental model simple.
- Loop configurations (A ↔ B ↔ C ↔ A) may be possible; behavior probably depends on Syncthing details and needs further investigation.
Managing Folders and Sync Connections
- Folders and sync-connections are created and managed through Syncthing's web interface or the Preferences menu.
- On some platforms, a syncthing icon is available by default in the System Tray - on other platforms a separate GUI tool is available to make such an icon available there
- As far as we know, these System Tray icons do not give more configuration options than the standard web interface
- This documentation therefore does not describe those GUI tools, but only how to configure and manage your syncthing via the standard web interface
- The web interface is enabled/configured through Syncthing's configuration file.
- Always protect the web interface with a username and password.
- You may create a new folder from any device that will participate in syncing that folder.
- a Syncthing folder corresponds to a real folder/directory somewhere on your machine - take care: everything in this (real) folder will be synced to, and later on changed by, the other devices in the sync connection
- To establish a sync-connection:
- Initiate it from a device that already has the folder in the Sharing tab of the Folder Edit.
- Then accept the connection on the device you want to sync with.
- Folder modes:
- Send & Receive
- Send Only
- Receive Only
Do Not Sync Your Entire Home Directory
- This can cause serious problems, especially when syncing full home directories between devices:
- You would also sync Syncthing's own configuration - this will definitely break things.
- Home directories contain large and frequently changing cache directories that are not useful to sync.
- Always sync only specific subdirectories within your home directory.
2. Getting Started
A typical setup might be 1 or more laptops/desktops (see A) and a single departmental system-group-managed server (see B) - first set it up on the server, then on the first other device and let it sync and then on the other devices.
Important: before actually syncing to a departmental server, make sure you have enough disk quota on that server to store all files:
- on the device where the files are currently stored, check the size with:
du -sh /path/to/your/folder(or the equivalent on your platform) - on the departmental server where you want to sync the files to, check your quota with:
quota -vs --filesystem=$HOME $USER
A. On a Desktop or Laptop (GUI Environment)
- Warning: do not do this on a system-group-managed desktop if you intend to also use syncthing on a system-group-managed server because these will interfere/conflict with each other!!!
- Ensure Syncthing is installed:
- already present on all system-group-managed clients - no install action needed there
- more information is available on the Syncthing web site
- install it in the usual way software is installed on your platform
- for Windows, the best results are with the SyncTrayzorPortable version - no 'real' installation needed, just download, extract and use
- for most Linux distributions a (possibly older version) of syncthing is available in the standard out-of-the-box repositories
- for Ubuntu/Debian Linux there is a repository with up to date versions from which you can install and keep it up to date
- the default installation and most default configuration options seem to be OK - if something doesn't work for you and you think it is worthwhile to mention here, please let us know
- Choose how Syncthing will start:
- Manually (recommended for initial testing):
- on system-group-managed laptops and desktops: with the
/usr/local/cs-adm/bin/cs-syncthing startcommand- when starting it in this way, you can see what is happening in the log file in your home directory:
~/.my-syncthing.log
- when starting it in this way, you can see what is happening in the log file in your home directory:
- on self-managed laptops and desktops: most probably with the
syncthingcommand- do consider the --no-browser --logflags=3 --logfile=$HOME/.my-syncthing.log --log-max-old-files=7 --log-max-size=1048576 --log-level=info command line options
- on system-group-managed laptops and desktops: with the
- Automatically at login:
- how to depends on your desktop session - on Ubuntu you can use the Startup Applications Preferences
- use the above manual command to start it in your auto-start configuration
- FYI: The option to start it at (re)boot does not work if your home directory is encrypted - which should be the case on laptops!
- Manually (recommended for initial testing):
- Important on first use: A few configuration options need special attention: Open the web interface and:
- See at the bottom of this page for how to find on which port the web interface is listening, in case you can't find it.
- Secure it with a username and password in Settings → GUI.
- Check and if needed change the GUI Listen Address to 127.0.0.1 as well - for more details see further below in section 4
- Configure in Settings → Connections:
- disable / deselect both "Enable NAT traversal" and "Local Discovery" (useless for our use of syncthing)
- enable / select both "Global Discovery" and "Enable Relaying" (unless you really know what you are doing)
click to open/close more information about these options
- NAT traversal is a technique with which your syncthing process tries to contact your default (local network) gateway and asks it to open up network ports so it is reachable from the outside world - corporate environments definitely do not allow this and most probably neither do most consumer home routers - it causes discovery broadcasts which all lead to nothing - therefore disable it
- Local discovery is a technique with which your syncthing process tries to discover other syncthing devices on the same local network - you most probably do not want to sync your folders with your colleagues, that is not the model we are using syncthing for - discovery alone is not a problem, so leaving it on does no harm in itself - but it causes discovery broadcasts which all lead to nothing - therefore disable it - especially because if you by accident accept such a discovered device and then by accident accept a shared folder, you might gain/give access to files you most probably do not want
- Global discovery is a technique with which your syncthing process tries to find the devices you have registered / accepted - without global discovery you can only sync your folders if there is a direct connection between the 2 sync devices and the IP addresses do not change - with global discovery the network address of one or both sync devices can change - because your laptop will change IP address, global discovery is needed to communicate its new IP address to your other devices - global discovery is also needed for the next item: relaying
- Relaying is a technique with which your syncthing process can keep syncing with your other devices, even when there is no direct connection possible with those other devices (e.g. both behind a NAT or at least 1 behind a firewall) - the actual syncing will then happen with a relaying partner that is accessible for both your devices in the sync connection - do notice that this relaying partner does not see the contents of what is being synced because that is protected with a shared encryption key between/of your devices - moreover this relaying will stop as soon as a direct connection is available again (e.g. when starting the departmental VPN or connection to the wired network or ...) - relaying details are available to your syncthing proces(ses) via global discovery - relaying bandwidth is of course (much) lower than with a direct connection
B. On a Server Managed by the System Group (SSH-Only)
You must login on the server with SSH - you can do so from anywhere in the world by using a jumphost - but by preference with SSH-Certs.
Ask your system group representative which server to use.
When logged in, you must execute some commands to initialise your syncthing configuration and to make sure your syncthing is started at (re)boot of the server.
- TL;DR in case you don't want to read the more detailed explanation below:
- Check your SSH-Cert with: ssh-add -L | ssh-keygen -Lf - | grep Valid
- Make sure you know what yourlogin and your server is
- Login with: ssh -J yourlogin@ssh.cs.kuleuven.be yourlogin@server.cs.kuleuven.be
- Configure and start your Syncthing with:
- /usr/local/cs-adm/bin/cs-syncthing generate-config
- /usr/local/cs-adm/bin/cs-syncthing generate-crontab
- /usr/local/cs-adm/bin/cs-syncthing check-crontab
- /usr/local/cs-adm/bin/cs-syncthing start
- Lookup your Syncthing details with: /usr/local/cs-adm/bin/cs-syncthing show-details
- Start a new SSH connection with a tunnel to the syncthing GUI port - replace the 12345 with the real port shown in your details:
ssh -L 12345:localhost:12345 -J yourlogin@ssh.cs.kuleuven.be yourlogin@server.cs.kuleuven.be - Access the web interface via that SSH tunnel: http://localhost:12345
- Generate your Syncthing configuration using:
/usr/local/cs-adm/bin/cs-syncthing generate-config
This will:- Create a configuration
- Assign a dedicated port
- Set an initial password
2026/01/22 11:39:28 INFO: Updated GUI authentication user name: username 2026/01/22 11:39:28 INFO: Updated GUI authentication password. 2026/01/22 11:39:28 INFO: Updated GUI address: http://127.0.0.1:12345
Write down the port number (in the above example 12345) - you will need it below to configure your syncthing.
The username should be your usual departmental login name (no need to write that down, you need it to login anyway ;-)
If you don't want to remember but want to store your password, please make sure it is in a safe, encrypted password manager / vault - please take a moment to consider whether your built-in browser password manager is safe enough. - Decide how Syncthing should start:
- Manually with the
/usr/local/cs-adm/bin/cs-syncthing startcommand (recommended for initial testing)- When starting it in this way, you can see what is happening in the log file in your home directory:
~/.my-syncthing.log
- When starting it in this way, you can see what is happening in the log file in your home directory:
- With an
@rebootcrontab entry:/usr/local/cs-adm/bin/cs-syncthing generate-crontab
This will:- Either create a crontab for you with a single entry that starts your syncthing after each reboot of the system
- Or suggest what crontab entry you must add to your existing crontab
/usr/local/cs-adm/bin/cs-syncthing show-crontab
/usr/local/cs-adm/bin/cs-syncthing check-crontabThis crontab entry automates the (manual) syncthing start and is, in essence, the same as when you would start it manually as shown above, including the log file in your home directory.
Do not forget that (one-time only right) after creating your @reboot crontab you must start your syncthing manually with the command shown above - after this first manual start, it will be started automatically after each reboot of the system.
- FYI: You cannot use systemd to start your syncthing because user accounts on our servers are not local accounts but are managed in/with LDAP and the home directories are not local directories either but are mounted via NFS. Both things make it impossible to use systemd to startup (user) services at reboot.
- Manually with the
- To access the web interface, create an SSH tunnel from a machine with a browser and visit the web interface via that tunnel:
- You need the exact port of your syncthing - on the server where your syncthing is running, use: /usr/local/cs-adm/bin/cs-syncthing show-details to find it.
- Then open a new terminal on your laptop and create a tunnel:
ssh -L 12345:localhost:12345 -J yourlogin@ssh.cs.kuleuven.be yourlogin@server.cs.kuleuven.be
- Then visit:
either http://localhost:12345(accept the unencrypted connection)- or
https://localhost:12345(accept the self-signed certificate)
- Log in using your Syncthing GUI username and password.
Click to expand to see instructions to start over
- stop all syncthing processes, remove all configuration files and remove your @reboot crontab entry:
- /usr/local/cs-adm/bin/cs-syncthing stop
- rm -fr ~/.local/state/syncthing ~/.config/syncthing (or move aside instead of removing them)
- crontab -e and remove the @reboot crontab entry about syncthing
- check left-overs:
- /usr/local/cs-adm/bin/cs-syncthing show-processes
- /usr/local/cs-adm/bin/cs-syncthing show-config
- /usr/local/cs-adm/bin/cs-syncthing show-crontab
- if no file nor process is shown, you have cleaned everything
3. Important Advice
Regularly check - in the Preferences and/or the web interface - that all sync-connections on all your devices show "Up to Date".
If you forgot on which port your syncthing processes are listening, you can find this:
- on a system-group-managed laptop and server:
- /usr/local/cs-adm/bin/cs-syncthing show-details
- on a self-managed system:
- in your Settings → GUI → GUI Listen Address (but this is of course the chicken&egg problem ;-)
- in your syncthing configuration file (on Linux: either ~/.local/state/syncthing/config.xml or ~/.config/syncthing/config.xml)
- by looking at which ports your syncthing process has open (on Linux: ss -anlp | grep syncthing)
If something does not look right, the first thing you can/should try is to stop the syncthing devices/processes that don't seem to work and restart them - on system-group-managed laptops and servers, this can be done with:
- /usr/local/cs-adm/bin/cs-syncthing show-processes
- /usr/local/cs-adm/bin/cs-syncthing stop
- /usr/local/cs-adm/bin/cs-syncthing show-processes
- /usr/local/cs-adm/bin/cs-syncthing start
- /usr/local/cs-adm/bin/cs-syncthing show-processes
After restarting, it will/might take a while before connections are re-established - wait at least several minutes before acting again - depending on the circumstances it might take quite a while before your syncthing devices will find each other again.
4. Annexes
GUI Listen Address
Especially on a shared server, it is important not to change the port number in the GUI Listen Address because that has to be guaranteed unique, otherwise your syncthing cannot start its web interface and you cannot use it to configure it - be careful there!
The hostname part of your GUI Listen Address though, should be 127.0.0.1 - if it isn't, feel free to change it (without changing the :12345 port part) - in this way access is only granted from the machine itself, not from other machines on the network, which is an additional layer of security for your syncthing!
Other important data
If you set up some folders to be synced to other devices, please do notice that some other important data is most probably still not safe: the bookmarks of your browser(s), the config of your mail client(s), configuration of other important software, ...
This kind of (mostly configuration) data is probably scattered around in your home directory, often even in hidden directories (like ~/.config of ~/.local). These directories are usually not included in synced folders and are therefore not being synced to your other devices.
You might want to setup some kind of (regular or scheduled) export of that data into files that are included/located in one of your synced folders, such that it is copied to a safe (or at least other) place as well.
Syncthing check script
If you want, you can activate a crontab entry that checks (as often as you want it) whether your syncthing processes are actually running. Use crontab -e to add a crontab entry with a schedule of your liking - consult the crontab documentation to see how and what you can do that. E.g. once a week on Monday morning:
19 9 * * 1 /usr/local/cs-adm/bin/cs-syncthing check-processes
With this you will get an e-mail each Monday at 9:19am notifying you whether your syncthing processes are actually running (on the machine this crontab is installed on) or not.

