.\" Man page generated from reStructuredText. . .TH "SYNCTHING-FAQ" "7" "Sep 06, 2020" "v1" "Syncthing" .SH NAME syncthing-faq \- Frequently Asked Questions . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH WHAT IS SYNCTHING? .sp Syncthing is an application that lets you synchronize your files across multiple devices. This means the creation, modification or deletion of files on one machine will automatically be replicated to your other devices. We believe your data is your data alone and you deserve to choose where it is stored. Therefore Syncthing does not upload your data to the cloud but exchanges your data across your machines as soon as they are online at the same time. .SH IS IT “SYNCTHING”, “SYNCTHING” OR “SYNCTHING”? .sp It’s \fBSyncthing\fP, although the command and source repository is spelled \fBsyncthing\fP so it may be referred to in that way as well. It’s definitely not SyncThing, even though the abbreviation \fBst\fP is used in some circumstances and file names. .SH HOW DOES SYNCTHING DIFFER FROM BITTORRENT/RESILIO SYNC? .sp The two are different and not related. Syncthing and BitTorrent/Resilio Sync accomplish some of the same things, namely syncing files between two or more computers. .sp BitTorrent Sync, now called Resilio Sync, is a proprietary peer\-to\-peer file synchronization tool available for Windows, Mac, Linux, Android, iOS, Windows Phone, Amazon Kindle Fire and BSD. [1] Syncthing is an open source file synchronization tool. .sp Syncthing uses an open and documented protocol, and likewise the security mechanisms in use are well defined and visible in the source code. Resilio Sync uses an undocumented, closed protocol with unknown security properties. .IP [1] 5 \fI\%https://en.wikipedia.org/wiki/Resilio_Sync\fP .SH WHAT THINGS ARE SYNCED? .sp The following things are \fIalways\fP synchronized: .INDENT 0.0 .IP \(bu 2 File contents .IP \(bu 2 File modification times .UNINDENT .sp The following may be synchronized or not, depending: .INDENT 0.0 .IP \(bu 2 File permissions (when supported by file system; on Windows only the read only bit is synchronized) .IP \(bu 2 Symbolic links (synced, except on Windows, but never followed) .UNINDENT .sp The following are \fInot\fP synchronized; .INDENT 0.0 .IP \(bu 2 File or directory owners and Groups (not preserved) .IP \(bu 2 Directory modification times (not preserved) .IP \(bu 2 Hard links and Windows directory junctions (followed, not preserved) .IP \(bu 2 Extended attributes, resource forks (not preserved) .IP \(bu 2 Windows, POSIX or NFS ACLs (not preserved) .IP \(bu 2 Devices, FIFOs, and other specials (ignored) .IP \(bu 2 Sparse file sparseness (will become sparse, when supported by the OS & filesystem) .UNINDENT .SH IS SYNCHRONIZATION FAST? .sp Syncthing segments files into pieces, called blocks, to transfer data from one device to another. Therefore, multiple devices can share the synchronization load, in a similar way to the torrent protocol. The more devices you have online, the faster an additional device will receive the data because small blocks will be fetched from all devices in parallel. .sp Syncthing handles renaming files and updating their metadata in an efficient manner. This means that renaming a large file will not cause a retransmission of that file. Additionally, appending data to existing large files should be handled efficiently as well. .sp Temporary files are used to store partial data downloaded from other devices. They are automatically removed whenever a file transfer has been completed or after the configured amount of time which is set in the configuration file (24 hours by default). .SH WHY IS THE SYNC SO SLOW? .sp When troubleshooting a slow sync, there are a number of things to check. .sp First of all, verify that you are not connected via a relay. In the “Remote Devices” list on the right side of the GUI, double check that you see “Address: ” and \fInot\fP “Relay: ”. [image] .sp If you are connected via a relay, this is because a direct connection could not be established. Double check and follow the suggestions in firewall\-setup to enable direct connections. .sp Second, if one of the devices is a very low powered machine (a Raspberry Pi, or a phone, or a NAS, or similar) you are likely constrained by the CPU on that device. See the next question for reasons Syncthing likes a faster CPU. .sp Third, verify that the network connection is OK. Tools such as iperf or just an Internet speed test can be used to verify the performance here. .SH WHY DOES IT USE SO MUCH CPU? .INDENT 0.0 .IP 1. 3 When new or changed files are detected, or Syncthing starts for the first time, your files are hashed using SHA\-256. .IP 2. 3 Data that is sent over the network is compressed (optionally) and encrypted (always). When receiving data it must be decrypted and then (if compressed) decompressed. .IP 3. 3 There is a certain amount of housekeeping that must be done to track the current and available versions of each file in the index database. .IP 4. 3 By default Syncthing uses periodic scanning every hour when watching for changes or every minute if that’s disabled to detect file changes. This means checking every file’s modification time and comparing it to the database. This can cause spikes of CPU usage for large folders. .UNINDENT .sp Hashing, compression and encryption cost CPU time. Also, using the GUI causes a certain amount of extra CPU usage to calculate the summary data it presents. Note however that once things are \fIin sync\fP CPU usage should be negligible. .sp To minimize the impact of this, Syncthing attempts to lower the process priority when starting up. .sp To further limit the amount of CPU used when syncing and scanning, set the environment variable \fBGOMAXPROCS\fP to the maximum number of CPU cores Syncthing should use at any given moment. For example, \fBGOMAXPROCS=2\fP on a machine with four cores will limit Syncthing to no more than half the system’s CPU power. .SH SHOULD I KEEP MY DEVICE IDS SECRET? .sp No. The IDs are not sensitive. Given a device ID it’s possible to find the IP address for that device, if global discovery is enabled on it. Knowing the device ID doesn’t help you actually establish a connection to that device or get a list of files, etc. .sp For a connection to be established, both devices need to know about the other’s device ID. It’s not possible (in practice) to forge a device ID. (To forge a device ID you need to create a TLS certificate with that specific SHA\-256 hash. If you can do that, you can spoof any TLS certificate. The world is your oyster!) .sp \fBSEE ALSO:\fP .INDENT 0.0 .INDENT 3.5 device\-ids .UNINDENT .UNINDENT .SH WHAT IF THERE IS A CONFLICT? .sp Syncthing does recognize conflicts. When a file has been modified on two devices simultaneously and the content actually differs, one of the files will be renamed to \fB.sync\-conflict\-\-