The Syncthing package installs a .service file at /usr/lib/systemd/system/syncthing@.service.
[Unit] Description=Syncthing service for %i After=network.target [Service] User=%i Environment=STNORESTART=yes ExecStart=/usr/bin/syncthing Restart=always [Install] WantedBy=multi-user.target
When enabling or starting the service, supply the user under which syncthing will run:
Configuration is located at ~/.config/syncthing/. The directory and config files inside it will be created when Syncthing is first started. It is described in detail in the Syncthing documentation .
The config.xml can either be edited via the web GUI or manually. By default, the Web GUI is only reachable from the same machine.
If Syncthing is installed on a machine without a desktop, one can either edit the configuration manually for all tasks or at least to make the GUI available on the network. Manual configuration will also be necessary if you want to change the port number under which the GUI is available, for example when the default port 8080 is already in use.
<configuration version="6"> ... <gui enabled="true" tls="true"> <!-- default: 127.0.0.1:8080 --> <address>0.0.0.0:8888</address> </gui> ... </configuration>
The first thing you might want to do is to remove the ~/Sync/ directory that was created on startup and replace it with something else.
Edit the config file to include the directories to sync:
<configuration version="6"> <folder id="default" path="/home/yourname/sync-folder" ro="false" rescanIntervalS="60" ignorePerms="false"> <device id="[ID-1]"></device> <versioning></versioning> <lenientMtimes>false</lenientMtimes> <copiers>0</copiers> <pullers>0</pullers> <finishers>0</finishers> </folder> ... </configuration>
Create more <folder> elements if you want to sync other directories.
Changes will take effect when Syncthing is restarted:
Repeat installation and configuration on other machines you which to keep in sync. On each machine, Syncthing must be started at least once to determine the device ID for that machine.
Edit the config file to include the new devices and add the device to each folder you want to sync:
<configuration version="6"> <folder id="notes" path="/home/akeil/notes" ro="false" rescanIntervalS="60" ignorePerms="false"> <!-- the ID of the local device --> <device id="[ID-1]"></device> <!-- one or more IDs of remote devices --> <device id="[ID-2]"></device> <versioning></versioning> <lenientMtimes>false</lenientMtimes> <copiers>1</copiers> <pullers>16</pullers> <finishers>1</finishers> </folder> <!-- the local device --> <device id="[ID-1]" name="other-machine" compression="true" introducer="false"> <address>dynamic</address> </device> <!-- remote devices to sync with --> <device id="[ID-1] name="home" compression="true" introducer="false"> <address>dynamic</address> </device> ... </configuration>
You must create <device> elements on both machines. (inside the <folder>'s you wish to sync and in the general section of known devices.).
If not, entries like this appear in the log and nothing is synced:
[...] Connection from 192.168.1.100:12345 with unknown device ID [ID-1];
- There is a Syncthing Android App .
- And another blog post  on Syncthing.
- There is Syncthing for Arch Linux ARM  which means it can run on a RaspberryPi