syncthing-faq.7 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .
  4. .nr rst2man-indent-level 0
  5. .
  6. .de1 rstReportMargin
  7. \\$1 \\n[an-margin]
  8. level \\n[rst2man-indent-level]
  9. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  10. -
  11. \\n[rst2man-indent0]
  12. \\n[rst2man-indent1]
  13. \\n[rst2man-indent2]
  14. ..
  15. .de1 INDENT
  16. .\" .rstReportMargin pre:
  17. . RS \\$1
  18. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  19. . nr rst2man-indent-level +1
  20. .\" .rstReportMargin post:
  21. ..
  22. .de UNINDENT
  23. . RE
  24. .\" indent \\n[an-margin]
  25. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  26. .nr rst2man-indent-level -1
  27. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  28. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  29. ..
  30. .TH "SYNCTHING-FAQ" "7" "Feb 29, 2024" "v1.27.3" "Syncthing"
  31. .SH NAME
  32. syncthing-faq \- Frequently Asked Questions
  33. .INDENT 0.0
  34. .IP \(bu 2
  35. \fI\%General\fP
  36. .INDENT 2.0
  37. .IP \(bu 2
  38. \fI\%What is Syncthing?\fP
  39. .IP \(bu 2
  40. \fI\%Is it “syncthing”, “Syncthing” or “SyncThing”?\fP
  41. .IP \(bu 2
  42. \fI\%What things are synced?\fP
  43. .IP \(bu 2
  44. \fI\%Is synchronization fast?\fP
  45. .IP \(bu 2
  46. \fI\%How does Syncthing differ from BitTorrent/Resilio Sync?\fP
  47. .IP \(bu 2
  48. \fI\%Is there an iOS client?\fP
  49. .IP \(bu 2
  50. \fI\%Should I keep my device IDs secret?\fP
  51. .UNINDENT
  52. .IP \(bu 2
  53. \fI\%Troubleshooting\fP
  54. .INDENT 2.0
  55. .IP \(bu 2
  56. \fI\%Where are the Syncthing logs?\fP
  57. .IP \(bu 2
  58. \fI\%Why is the sync so slow?\fP
  59. .IP \(bu 2
  60. \fI\%Why does it use so much CPU?\fP
  61. .IP \(bu 2
  62. \fI\%Why is the setup more complicated than BitTorrent/Resilio Sync?\fP
  63. .IP \(bu 2
  64. \fI\%Why do I get “Host check error” in the GUI/API?\fP
  65. .IP \(bu 2
  66. \fI\%My Syncthing database is corrupt\fP
  67. .IP \(bu 2
  68. \fI\%Why do I see Syncthing twice in task manager?\fP
  69. .IP \(bu 2
  70. \fI\%How can I view the history of changes?\fP
  71. .IP \(bu 2
  72. \fI\%Does the audit log contain every change?\fP
  73. .IP \(bu 2
  74. \fI\%Why does Syncthing connect to this unknown/suspicious address?\fP
  75. .IP \(bu 2
  76. \fI\%I am seeing the error message “folder marker missing”. What do I do?\fP
  77. .UNINDENT
  78. .IP \(bu 2
  79. \fI\%Usage\fP
  80. .INDENT 2.0
  81. .IP \(bu 2
  82. \fI\%What if there is a conflict?\fP
  83. .IP \(bu 2
  84. \fI\%How do I serve a folder from a read only filesystem?\fP
  85. .IP \(bu 2
  86. \fI\%I really hate the .stfolder directory, can I remove it?\fP
  87. .IP \(bu 2
  88. \fI\%Am I able to nest shared folders in Syncthing?\fP
  89. .IP \(bu 2
  90. \fI\%How do I rename/move a synced folder?\fP
  91. .IP \(bu 2
  92. \fI\%How do I configure multiple users on a single machine?\fP
  93. .IP \(bu 2
  94. \fI\%Does Syncthing support syncing between folders on the same system?\fP
  95. .IP \(bu 2
  96. \fI\%When I do have two distinct Syncthing\-managed folders on two hosts, how does Syncthing handle moving files between them?\fP
  97. .IP \(bu 2
  98. \fI\%Can I help initial sync by copying files manually?\fP
  99. .IP \(bu 2
  100. \fI\%Is Syncthing my ideal backup application?\fP
  101. .IP \(bu 2
  102. \fI\%How can I exclude files with brackets ([]) in the name?\fP
  103. .IP \(bu 2
  104. \fI\%How do I access the web GUI from another computer?\fP
  105. .IP \(bu 2
  106. \fI\%I don’t like the GUI or the theme. Can it be changed?\fP
  107. .IP \(bu 2
  108. \fI\%How do I upgrade Syncthing?\fP
  109. .IP \(bu 2
  110. \fI\%Where do I find the latest release?\fP
  111. .IP \(bu 2
  112. \fI\%How do I run Syncthing as a daemon process on Linux?\fP
  113. .IP \(bu 2
  114. \fI\%How do I increase the inotify limit to get my filesystem watcher to work?\fP
  115. .IP \(bu 2
  116. \fI\%How do I reset the GUI password?\fP
  117. .UNINDENT
  118. .UNINDENT
  119. .SH GENERAL
  120. .SS What is Syncthing?
  121. .sp
  122. Syncthing is an application that lets you synchronize your files across multiple
  123. devices. This means the creation, modification or deletion of files on one
  124. machine will automatically be replicated to your other devices. We believe your
  125. data is your data alone and you deserve to choose where it is stored. Therefore
  126. Syncthing does not upload your data to the cloud but exchanges your data across
  127. your machines as soon as they are online at the same time.
  128. .SS Is it “syncthing”, “Syncthing” or “SyncThing”?
  129. .sp
  130. It’s \fBSyncthing\fP, although the command and source repository is spelled
  131. \fBsyncthing\fP so it may be referred to in that way as well. It’s definitely not
  132. SyncThing, even though the abbreviation \fBst\fP is used in some
  133. circumstances and file names.
  134. .SS What things are synced?
  135. .sp
  136. The following things are \fIalways\fP synchronized:
  137. .INDENT 0.0
  138. .IP \(bu 2
  139. File contents
  140. .IP \(bu 2
  141. File modification times
  142. .UNINDENT
  143. .sp
  144. The following may be synchronized or not, depending:
  145. .INDENT 0.0
  146. .IP \(bu 2
  147. File permissions (when supported by file system; on Windows only the
  148. read only bit is synchronized)
  149. .IP \(bu 2
  150. Symbolic links (synced, except on Windows, but never followed)
  151. .IP \(bu 2
  152. File or directory owners and groups (when enabled)
  153. .IP \(bu 2
  154. Extended attributes (when enabled)
  155. .IP \(bu 2
  156. POSIX or NFS ACLs (as part of extended attributes)
  157. .UNINDENT
  158. .sp
  159. The following are \fInot\fP synchronized;
  160. .INDENT 0.0
  161. .IP \(bu 2
  162. Directory modification times (not preserved)
  163. .IP \(bu 2
  164. Hard links (followed, not preserved)
  165. .IP \(bu 2
  166. Windows junctions (synced as ordinary directories; require enabling in
  167. \fI\%the configuration\fP on a per\-folder
  168. basis)
  169. .IP \(bu 2
  170. Resource forks (not preserved)
  171. .IP \(bu 2
  172. Windows ACLs (not preserved)
  173. .IP \(bu 2
  174. Devices, FIFOs, and other specials (ignored)
  175. .IP \(bu 2
  176. Sparse file sparseness (will become sparse, when supported by the OS & filesystem)
  177. .IP \(bu 2
  178. Syncthing internal files and folders (e.g. \fB\&.stfolder\fP, \fB\&.stignore\fP,
  179. \fB\&.stversions\fP, \fI\%temporary files\fP, etc.)
  180. .UNINDENT
  181. .SS Is synchronization fast?
  182. .sp
  183. Syncthing segments files into pieces, called blocks, to transfer data from one
  184. device to another. Therefore, multiple devices can share the synchronization
  185. load, in a similar way to the torrent protocol. The more devices you have online,
  186. the faster an additional device will receive the data
  187. because small blocks will be fetched from all devices in parallel.
  188. .sp
  189. Syncthing handles renaming files and updating their metadata in an efficient
  190. manner. This means that renaming a file will not cause a retransmission of
  191. that file. Additionally, appending data to existing files should be handled
  192. efficiently as well.
  193. .sp
  194. \fI\%Temporary files\fP are used to store partial data
  195. downloaded from other devices. They are automatically removed whenever a file
  196. transfer has been completed or after the configured amount of time which is set
  197. in the configuration file (24 hours by default).
  198. .SS How does Syncthing differ from BitTorrent/Resilio Sync?
  199. .sp
  200. The two are different and not related. Syncthing and BitTorrent/Resilio Sync accomplish
  201. some of the same things, namely syncing files between two or more computers.
  202. .sp
  203. BitTorrent Sync, now called Resilio Sync, is a proprietary peer\-to\-peer file
  204. synchronization tool available for Windows, Mac, Linux, Android, iOS, Windows
  205. Phone, Amazon Kindle Fire and BSD. [1] Syncthing is an open source file
  206. synchronization tool.
  207. .sp
  208. Syncthing uses an open and documented protocol, and likewise the security
  209. mechanisms in use are well defined and visible in the source code. Resilio
  210. Sync uses an undocumented, closed protocol with unknown security properties.
  211. .IP [1] 5
  212. \fI\%https://en.wikipedia.org/wiki/Resilio_Sync\fP
  213. .SS Is there an iOS client?
  214. .sp
  215. There are no plans by the current Syncthing team to officially support iOS in the foreseeable future.
  216. .sp
  217. iOS has significant restrictions on background processing that make it very hard to
  218. run Syncthing reliably and integrate it into the system.
  219. .sp
  220. However, there is a commercial packaging of Syncthing for iOS that attempts to work within these limitations. [2]
  221. .IP [2] 5
  222. \fI\%https://www.mobiussync.com\fP
  223. .SS Should I keep my device IDs secret?
  224. .sp
  225. No. The IDs are not sensitive. Given a device ID it’s possible to find the IP
  226. address for that device, if global discovery is enabled on it. Knowing the device
  227. ID doesn’t help you actually establish a connection to that device or get a list
  228. of files, etc.
  229. .sp
  230. For a connection to be established, both devices need to know about the other’s
  231. device ID. It’s not possible (in practice) to forge a device ID. (To forge a
  232. device ID you need to create a TLS certificate with that specific SHA\-256 hash.
  233. If you can do that, you can spoof any TLS certificate. The world is your
  234. oyster!)
  235. .sp
  236. \fBSEE ALSO:\fP
  237. .INDENT 0.0
  238. .INDENT 3.5
  239. \fI\%Understanding Device IDs\fP
  240. .UNINDENT
  241. .UNINDENT
  242. .SH TROUBLESHOOTING
  243. .SS Where are the Syncthing logs?
  244. .sp
  245. Syncthing logs to stdout by default. On Windows Syncthing by default also
  246. creates \fBsyncthing.log\fP in Syncthing’s home directory (run \fBsyncthing
  247. \-\-paths\fP to see where that is). The command line option \fB\-\-logfile\fP can be
  248. used to specify a user\-defined logfile. If you only have access to a running
  249. instance’s GUI, check under the \fIActions\fP \- \fIAbout\fP menu item to see the used
  250. paths.
  251. .sp
  252. If you’re running a process manager like systemd, check there. If you’re
  253. using a GUI wrapper integration, it may keep the logs for you.
  254. .SS Why is the sync so slow?
  255. .sp
  256. When troubleshooting a slow sync, there are a number of things to check.
  257. .sp
  258. First of all, verify that you are not connected via a relay. In the “Remote
  259. Devices” list on the right side of the GUI, double check that you see
  260. “Address: <some address>” and \fInot\fP “Relay: <some address>”.
  261. [image]
  262. .sp
  263. If you are connected via a relay, this is because a direct connection could
  264. not be established. Double check and follow the suggestions in
  265. \fI\%Firewall Setup\fP to enable direct connections.
  266. .sp
  267. Second, if one of the devices is a very low powered machine (a Raspberry Pi,
  268. or a phone, or a NAS, or similar) you are likely constrained by the CPU on
  269. that device. See the next question for reasons Syncthing likes a faster CPU.
  270. .sp
  271. Third, verify that the network connection is OK. Tools such as iperf or just
  272. an Internet speed test can be used to verify the performance here.
  273. .SS Why does it use so much CPU?
  274. .INDENT 0.0
  275. .IP 1. 3
  276. When new or changed files are detected, or Syncthing starts for the
  277. first time, your files are hashed using SHA\-256.
  278. .IP 2. 3
  279. Data that is sent over the network is compressed (optionally) and
  280. encrypted (always). When receiving data it must be decrypted and then (if
  281. compressed) decompressed.
  282. .IP 3. 3
  283. There is a certain amount of housekeeping that must be done to track the
  284. current and available versions of each file in the index database.
  285. .IP 4. 3
  286. By default Syncthing uses periodic scanning every hour when watching for
  287. changes or every minute if that’s disabled to detect
  288. file changes. This means checking every file’s modification time and
  289. comparing it to the database. This can cause spikes of CPU usage for large
  290. folders.
  291. .UNINDENT
  292. .sp
  293. Hashing, compression and encryption cost CPU time. Also, using the GUI
  294. causes a certain amount of extra CPU usage to calculate the summary data it
  295. presents. Note however that once things are \fIin sync\fP CPU usage should be
  296. negligible.
  297. .sp
  298. To minimize the impact of this, Syncthing attempts to \fI\%lower the
  299. process priority\fP when starting up.
  300. .sp
  301. To further limit the amount of CPU used when syncing and scanning, set the
  302. environment variable \fBGOMAXPROCS\fP to the maximum number of CPU cores
  303. Syncthing should use at any given moment. For example, \fBGOMAXPROCS=2\fP on a
  304. machine with four cores will limit Syncthing to no more than half the
  305. system’s CPU power.
  306. .SS Why is the setup more complicated than BitTorrent/Resilio Sync?
  307. .sp
  308. Security over convenience. In Syncthing you have to setup both sides to
  309. connect two devices. An attacker can’t do much with a stolen device ID, because
  310. you have to add the device on the other side too. You have better control
  311. where your files are transferred.
  312. .sp
  313. This is an area that we are working to improve in the long term.
  314. .SS Why do I get “Host check error” in the GUI/API?
  315. .sp
  316. Since version 0.14.6 Syncthing does an extra security check when the GUI/API
  317. is bound to localhost \- namely that the browser is talking to localhost.
  318. This protects against most forms of \fI\%DNS rebinding attack\fP <\fBhttps://en.wikipedia.org/wiki/DNS_rebinding\fP> against the GUI.
  319. .sp
  320. To pass this test, ensure that you are accessing the GUI using an URL that
  321. begins with \fBhttp://localhost\fP, \fBhttp://127.0.0.1\fP or \fBhttp://[::1]\fP\&. HTTPS
  322. is fine too, of course.
  323. .sp
  324. If you are using a proxy in front of Syncthing you may need to disable this
  325. check, after ensuring that the proxy provides sufficient authentication to
  326. protect against unauthorized access. Either:
  327. .INDENT 0.0
  328. .IP \(bu 2
  329. Make sure the proxy sets a \fBHost\fP header containing \fBlocalhost\fP, or
  330. .IP \(bu 2
  331. Set \fI\%gui.insecureSkipHostcheck\fP in the advanced settings, or
  332. .IP \(bu 2
  333. Bind the GUI/API to a non\-localhost listen port.
  334. .UNINDENT
  335. .sp
  336. In all cases, username/password authentication and HTTPS should be used.
  337. .SS My Syncthing database is corrupt
  338. .sp
  339. This is almost always a result of bad RAM, storage device or other hardware.
  340. When the index database is found to be corrupt Syncthing cannot operate and will
  341. note this in the logs and exit. To overcome this delete the \fI\%database
  342. folder\fP inside Syncthing’s data directory and re\-start
  343. Syncthing. It will then need to perform a full re\-hashing of all shared
  344. folders. You should check your system in case the underlying cause is indeed
  345. faulty hardware which may put the system at risk of further data loss.
  346. .SS Why do I see Syncthing twice in task manager?
  347. .sp
  348. One process manages the other, to capture logs and manage restarts. This
  349. makes it easier to handle upgrades from within Syncthing itself, and also
  350. ensures that we get a nice log file to help us narrow down the cause for
  351. crashes and other bugs.
  352. .SS How can I view the history of changes?
  353. .sp
  354. The web GUI contains a \fBRecent Changes\fP button under the device list which
  355. displays changes since the last (re)start of Syncthing. With the \fB\-\-audit\fP
  356. option you can enable a persistent, detailed log of changes and most
  357. activities, which contains a JSON\-formatted sequence of events in the
  358. \fB~/.local/state/syncthing/audit\-_date_\-_time_.log\fP file.
  359. .SS Does the audit log contain every change?
  360. .sp
  361. The audit log (and the \fBRecent Changes\fP window) sees the changes that your
  362. Syncthing sees. When Syncthing is continuously connected it usually sees every change
  363. happening immediately and thus knows which node initiated the change.
  364. When topology gets complex or when your node reconnects after some time offline,
  365. Syncthing synchronises with its neighbours: It gets the latest synchronised state
  366. from the neighbour, which is the \fIresult\fP of all the changes between the last
  367. known state (before disconnect or network delay) and the current state at the
  368. neighbour, and if there were updates, deletes, creates, conflicts, which were
  369. overlapping we only see the \fIlatest change\fP for a given file or directory (and
  370. the node where that latest change occurred). When we connect to multiple neighbours
  371. Syncthing decides which neighbour has the latest state, or if the states conflict
  372. it initiates the conflict resolution procedure, which in the end results in a consistent
  373. up\-to\-date state with all the neighbours.
  374. .SS Why does Syncthing connect to this unknown/suspicious address?
  375. .sp
  376. If you see outgoing connections to odd and unexpected addresses these are
  377. most likely connections to \fI\%relay servers\fP\&. Relay servers
  378. are run by volunteers all over the world. They usually listen on ports 443 or
  379. 22067, though this is controlled by the user running it. You can compare the
  380. address you are concerned about with \fI\%the current list of active relays\fP <\fBhttps://relays.syncthing.net\fP>\&. Relays do not and can not see the data
  381. transmitted via them.
  382. .SS I am seeing the error message “folder marker missing”. What do I do?
  383. .sp
  384. Syncthing uses a specific marker usually called \fB\&.stfolder\fP to determine whether
  385. a folder is healthy. This is a safety check to ensure that your folder is properly
  386. readable and present on disk. For example, if you remove a USB drive from your computer
  387. or unmount a filesystem, then syncthing must know whether you have really deleted \fBall\fP of
  388. your files. Therefore, syncthing always checks that the \fB\&.stfolder\fP is present.
  389. .sp
  390. When this error appears, syncthing assumes that the folder has encountered some type of error
  391. and will stop syncing it until the \fB\&.stfolder\fP reappears. Once that happens, all changes made
  392. to the folder locally will be synced (i.e. missing files will be considered deletions).
  393. .INDENT 0.0
  394. .IP \(bu 2
  395. If you get this error message, check the folder in question on your storage. If you have
  396. unmounted the folder (or a parent of it), you must remount it for syncthing to resume syncing
  397. this folder.
  398. .IP \(bu 2
  399. If you have moved the folder, you must either move it back to its original location, or remove the
  400. folder from within the syncthing UI and re\-add it at its new location.
  401. .IP \(bu 2
  402. If the folder is present on disk, with all of its children files and directories, but the \fB\&.stfolder\fP
  403. is still missing:
  404. .sp
  405. It is possible that a file cleaning software has removed the \fB\&.stfolder\fP\&. Some software
  406. removes empty folders, and the \fB\&.stfolder\fP is often empty. This happens particularly often on Android.
  407. To remediate, recreate the \fB\&.stfolder\fP and add a dummy file in it, or add an exception to your
  408. cleaning software.
  409. .UNINDENT
  410. .sp
  411. If you are still unsure what has happened, you can remove the folder from within the syncthing UI and re\-add it
  412. at the same location. This causes syncthing to attempt an automatic re\-creation of the \fB\&.stfolder\fP\&. Next,
  413. it will also reset the database state of this folder. It will be considered a “new” folder, meaning that its files
  414. will be merged with files from remote devices.
  415. .sp
  416. Also see the \fI\%marker FAQ\fP for more information about the folder marker.
  417. .SH USAGE
  418. .SS What if there is a conflict?
  419. .sp
  420. \fBSEE ALSO:\fP
  421. .INDENT 0.0
  422. .INDENT 3.5
  423. \fI\%Conflicting Changes\fP
  424. .UNINDENT
  425. .UNINDENT
  426. .SS How do I serve a folder from a read only filesystem?
  427. .sp
  428. Syncthing requires a “folder marker” to indicate that the folder is present
  429. and healthy. By default this is a directory called \fB\&.stfolder\fP that is
  430. created by Syncthing when the folder is added. If this folder can’t be
  431. created (you are serving files from a CD or something) you can instead set
  432. the advanced config \fBMarker Name\fP to the name of some file or folder that
  433. you know will always exist in the folder.
  434. .SS I really hate the \fB\&.stfolder\fP directory, can I remove it?
  435. .sp
  436. See the previous question.
  437. .SS Am I able to nest shared folders in Syncthing?
  438. .sp
  439. Sharing a folder that is within an already shared folder is possible, but it has
  440. its caveats. What you must absolutely avoid are circular shares. This is just
  441. one example, there may be other undesired effects. Nesting shared folders is not
  442. supported, recommended or coded for, but it can be done successfully when you
  443. know what you’re doing \- you have been warned.
  444. .SS How do I rename/move a synced folder?
  445. .sp
  446. Syncthing doesn’t have a direct way to do this, as it’s potentially
  447. dangerous to do so if you’re not careful \- it may result in data loss if
  448. something goes wrong during the move and is synchronized to your other
  449. devices.
  450. .sp
  451. The easy way to rename or move a synced folder on the local system is to
  452. remove the folder in the Syncthing UI, move it on disk, then re\-add it using
  453. the new path.
  454. .sp
  455. It’s important to do this when the folder is already in sync between your
  456. devices, as it is otherwise unpredictable which changes will “win” after the
  457. move. Changes made on other devices may be overwritten, or changes made
  458. locally may be overwritten by those on other devices.
  459. .sp
  460. An alternative way is to shut down Syncthing, move the folder on disk (including
  461. the \fB\&.stfolder\fP marker), edit the path directly in \fBconfig.xml\fP in the
  462. configuration folder (see \fI\%Syncthing Configuration\fP) and then start Syncthing again.
  463. .SS How do I configure multiple users on a single machine?
  464. .sp
  465. Each user should run their own Syncthing instance. Be aware that you might need
  466. to configure listening ports such that they do not overlap (see \fI\%Syncthing Configuration\fP).
  467. .SS Does Syncthing support syncing between folders on the same system?
  468. .sp
  469. No. Syncthing is not designed to sync locally and the overhead involved in
  470. doing so using Syncthing’s method would be wasteful. There are better
  471. programs to achieve this such as \fI\%rsync\fP <\fBhttps://rsync.samba.org/\fP> or
  472. \fI\%Unison\fP <\fBhttps://www.cis.upenn.edu/~bcpierce/unison\fP>\&.
  473. .SS When I do have two distinct Syncthing\-managed folders on two hosts, how does Syncthing handle moving files between them?
  474. .sp
  475. Syncthing does not specially handle this case, and most files will most likely get
  476. re\-downloaded.
  477. .sp
  478. In detail, the behavior depends on the scan order. If you have folders A and B,
  479. and move files from A to B, if A gets scanned first, it will announce the removal of
  480. the files to others who will then remove the files. As you rescan B, B will
  481. announce the addition of new files, and other peers will have nowhere to get
  482. them from apart from re\-downloading them.
  483. .sp
  484. If B gets rescanned first, B will announce additions first, and remote
  485. peers will then reconstruct the files (not rename, more like copying block by
  486. block) from A, and then as A gets rescanned, it will remove the files from A.
  487. .sp
  488. A workaround would be to copy first from A to B, rescan B, wait for B to
  489. copy the files on the remote side, and then delete from A.
  490. .SS Can I help initial sync by copying files manually?
  491. .sp
  492. If you have a large folder that you want to keep in sync over a not\-so\-fast network, and you have the possibility to move all files to the remote device in a faster manner, here is a procedure to follow:
  493. .INDENT 0.0
  494. .IP \(bu 2
  495. Create the folder on the local device, but don’t share it with the remote device yet.
  496. .IP \(bu 2
  497. Copy the files from the local device to the remote device using regular file copy. If this takes a long time (perhaps requiring travelling there physically), it may be a good idea to make sure that the files on the local device are not updated while you are doing this.
  498. .IP \(bu 2
  499. Create the folder on the remote device, and copy the Folder ID from the folder on the local device, as we want the folders to be considered the same. Then wait until scanning the folder is done.
  500. .IP \(bu 2
  501. Now share the folder with the other device, on both sides. Syncthing will exchange file information, updating the database, but existing files will not be transferred. This may still take a while initially, be patient and wait until it settled.
  502. .UNINDENT
  503. .SS Is Syncthing my ideal backup application?
  504. .sp
  505. No. Syncthing is not a great backup application because all changes to your
  506. files (modifications, deletions, etc.) will be propagated to all your
  507. devices. You can enable versioning, but we encourage you to use other tools
  508. to keep your data safe from your (or our) mistakes.
  509. .SS How can I exclude files with brackets (\fB[]\fP) in the name?
  510. .sp
  511. The patterns in .stignore are glob patterns, where brackets are used to
  512. denote character ranges. That is, the pattern \fBq[abc]x\fP will match the
  513. files \fBqax\fP, \fBqbx\fP and \fBqcx\fP\&.
  514. .sp
  515. To match an actual file \fIcalled\fP \fBq[abc]x\fP the pattern needs to “escape”
  516. the brackets, like so: \fBq\e[abc\e]x\fP\&.
  517. .sp
  518. On Windows, escaping special characters is not supported as the \fB\e\fP
  519. character is used as a path separator.
  520. .SS How do I access the web GUI from another computer?
  521. .sp
  522. The default listening address is 127.0.0.1:8384, so you can only access the GUI
  523. from the same machine. This is for security reasons. To access it from another
  524. computer, change the \fBGUI listen address\fP option in the web GUI from
  525. \fB127.0.0.1:8384\fP to \fB0.0.0.0:8384\fP, or change the \fBconfig.xml\fP:
  526. .INDENT 0.0
  527. .INDENT 3.5
  528. .sp
  529. .nf
  530. .ft C
  531. <gui enabled=\(dqtrue\(dq tls=\(dqfalse\(dq>
  532. <address>127.0.0.1:8384</address>
  533. .ft P
  534. .fi
  535. .UNINDENT
  536. .UNINDENT
  537. .sp
  538. to
  539. .INDENT 0.0
  540. .INDENT 3.5
  541. .sp
  542. .nf
  543. .ft C
  544. <gui enabled=\(dqtrue\(dq tls=\(dqtrue\(dq>
  545. <address>0.0.0.0:8384</address>
  546. .ft P
  547. .fi
  548. .UNINDENT
  549. .UNINDENT
  550. .sp
  551. Then the GUI is accessible from everywhere. There is no filtering based on
  552. e.g. source address (use a firewall for that). You should set a password and
  553. enable HTTPS with this configuration. You can do this from inside the GUI.
  554. .sp
  555. If both your computers are Unix\-like (Linux, Mac, etc.) you can also leave the
  556. GUI settings at default and use an SSH port forward to access it. For example,
  557. .INDENT 0.0
  558. .INDENT 3.5
  559. .sp
  560. .nf
  561. .ft C
  562. $ ssh \-L 9090:127.0.0.1:8384 user@othercomputer.example.com
  563. .ft P
  564. .fi
  565. .UNINDENT
  566. .UNINDENT
  567. .sp
  568. will log you into \fBothercomputer.example.com\fP, and present the \fIremote\fP
  569. Syncthing GUI on \fI\%http://localhost:9090\fP on your \fIlocal\fP computer.
  570. .sp
  571. If you only want to access the remote GUI and don’t want the terminal session,
  572. use this example:
  573. .INDENT 0.0
  574. .INDENT 3.5
  575. .sp
  576. .nf
  577. .ft C
  578. $ ssh \-N \-L 9090:127.0.0.1:8384 user@othercomputer.example.com
  579. .ft P
  580. .fi
  581. .UNINDENT
  582. .UNINDENT
  583. .sp
  584. If only your remote computer is Unix\-like, you can still access it with SSH from
  585. Windows. Under Windows 10 or later you can use the same \fBssh\fP command if you
  586. \fI\%install the OpenSSH Client\fP <\fBhttps://learn.microsoft.com/windows-server/administration/openssh/openssh_install_firstuse\fP>\&.
  587. .SS I don’t like the GUI or the theme. Can it be changed?
  588. .sp
  589. You can change the theme in the settings. Syncthing ships with other themes
  590. than the default.
  591. .sp
  592. If you want a custom theme or a completely different GUI, you can add your
  593. own.
  594. By default, Syncthing will look for a directory \fBgui\fP inside the Syncthing
  595. home folder. To change the directory to look for themes, you need to set the
  596. STGUIASSETS environment variable. To get the concrete directory, run
  597. syncthing with the \fB\-\-paths\fP parameter. It will print all the relevant paths,
  598. including the “GUI override directory”.
  599. .sp
  600. To add e.g. a red theme, you can create the file \fBred/assets/css/theme.css\fP
  601. inside the GUI override directory to override the default CSS styles.
  602. .sp
  603. To create a whole new GUI, you should checkout the files at
  604. \fI\%https://github.com/syncthing/syncthing/tree/main/gui/default\fP
  605. to get an idea how to do that.
  606. .SS How do I upgrade Syncthing?
  607. .sp
  608. If you use a package manager such as Debian’s apt\-get, you should upgrade
  609. using the package manager. If you use the binary packages linked from
  610. Syncthing.net, you can use Syncthing’s built\-in automatic upgrade functionality.
  611. .INDENT 0.0
  612. .IP \(bu 2
  613. If automatic upgrades is enabled (which is the default), Syncthing will
  614. upgrade itself automatically within 24 hours of a new release.
  615. .IP \(bu 2
  616. The upgrade button appears in the web GUI when a new version has been
  617. released. Pressing it will perform an upgrade.
  618. .IP \(bu 2
  619. To force an upgrade from the command line, run \fBsyncthing \-\-upgrade\fP\&.
  620. .UNINDENT
  621. .sp
  622. Note that your system should have CA certificates installed which allows a
  623. secure connection to GitHub (e.g. FreeBSD requires \fBsudo pkg install
  624. ca_root_nss\fP). If \fBcurl\fP or \fBwget\fP works with normal HTTPS sites, then
  625. so should Syncthing.
  626. .SS Where do I find the latest release?
  627. .sp
  628. We release new versions through GitHub. The latest release is always found
  629. \fI\%on the release page\fP <\fBhttps://github.com/syncthing/syncthing/releases/latest\fP>\&. Unfortunately
  630. GitHub does not provide a single URL to automatically download the latest
  631. version. We suggest to use the \fI\%GitHub API\fP <\fBhttps://api.github.com/repos/syncthing/syncthing/releases/latest\fP> and parsing
  632. the JSON response.
  633. .SS How do I run Syncthing as a daemon process on Linux?
  634. .sp
  635. If you’re using systemd, runit, or upstart, we ship \fI\%example configurations\fP <\fBhttps://github.com/syncthing/syncthing/tree/main/etc\fP>\&.
  636. .sp
  637. If however you’re not using one of these tools, you have a couple of options.
  638. If your system has a tool called \fBstart\-stop\-daemon\fP installed (that’s the name
  639. of the command, not the package), look into the local documentation for that, it
  640. will almost certainly cover 100% of what you want to do. If you don’t have
  641. \fBstart\-stop\-daemon\fP, there are a bunch of other software packages you could use
  642. to do this. The most well known is called daemontools, and can be found in the
  643. standard package repositories for almost every modern Linux distribution.
  644. Other popular tools with similar functionality include S6 and the aforementioned
  645. runit.
  646. .SS How do I increase the inotify limit to get my filesystem watcher to work?
  647. .sp
  648. You are probably reading this because you encountered the following error with
  649. the filesystem watcher on linux:
  650. .INDENT 0.0
  651. .INDENT 3.5
  652. Failed to start filesystem watcher for folder yourLabel (yourID): failed to
  653. setup inotify handler. Please increase inotify limits, see \fI\%https://docs.syncthing.net/users/faq.html#inotify\-limits\fP
  654. .UNINDENT
  655. .UNINDENT
  656. .sp
  657. Linux typically restricts the number of watches per user (usually 8192). If
  658. you have many directories, you will need to adjust that number.
  659. .sp
  660. On many Linux distributions you can run the following to fix it:
  661. .INDENT 0.0
  662. .INDENT 3.5
  663. .sp
  664. .nf
  665. .ft C
  666. echo \(dqfs.inotify.max_user_watches=204800\(dq | sudo tee \-a /etc/sysctl.conf
  667. .ft P
  668. .fi
  669. .UNINDENT
  670. .UNINDENT
  671. .sp
  672. On Arch Linux and potentially others it is preferred to write this line into a
  673. separate file, i.e. you should run:
  674. .INDENT 0.0
  675. .INDENT 3.5
  676. .sp
  677. .nf
  678. .ft C
  679. echo \(dqfs.inotify.max_user_watches=204800\(dq | sudo tee \-a /etc/sysctl.d/90\-override.conf
  680. .ft P
  681. .fi
  682. .UNINDENT
  683. .UNINDENT
  684. .sp
  685. This only takes effect after a reboot. To adjust the limit immediately, run:
  686. .INDENT 0.0
  687. .INDENT 3.5
  688. .sp
  689. .nf
  690. .ft C
  691. echo 204800 | sudo tee /proc/sys/fs/inotify/max_user_watches
  692. .ft P
  693. .fi
  694. .UNINDENT
  695. .UNINDENT
  696. .SS How do I reset the GUI password?
  697. .sp
  698. If you’ve forgotten / lost the GUI password, you can reset it using the
  699. \fI\%\-\-gui\-password\fP (and possibly \fI\%\-\-gui\-user\fP) options to the
  700. \fBsyncthing generate\fP subcommand. This should be done while Syncthing is not
  701. running.
  702. .INDENT 0.0
  703. .IP 1. 3
  704. Stop Syncthing: \fBsyncthing cli operations shutdown\fP
  705. .IP 2. 3
  706. \fBsyncthing generate \-\-gui\-password=myNewPassword \-\-gui\-user=newUserName\fP
  707. .IP 3. 3
  708. Restart Syncthing as usual.
  709. .UNINDENT
  710. .sp
  711. \fIAlternatively, in step 2\fP, you can manually delete the \fI\%<user>\fP and \fI\%<password>\fP XML tags from the
  712. \fB<gui>\fP block in file \fBconfig.xml\fP\&. The location of the file depends on the
  713. OS and is described in the \fI\%configuration documentation\fP\&.
  714. .sp
  715. For example, the two emphasized lines below would be removed from the file.
  716. .INDENT 0.0
  717. .INDENT 3.5
  718. .sp
  719. .nf
  720. .ft C
  721. <gui enabled=\(dqtrue\(dq tls=\(dqfalse\(dq debugging=\(dqfalse\(dq>
  722. <address>127.0.0.1:8384</address>
  723. <user>syncguy</user>
  724. <password>$2a$10$s9wWHOQe...Cq7GPye69</password>
  725. <apikey>9RCKohqCAyrj5RjpyZdR2wXmQ9PyQFeN</apikey>
  726. <theme>default</theme>
  727. </gui>
  728. .ft P
  729. .fi
  730. .UNINDENT
  731. .UNINDENT
  732. .SH AUTHOR
  733. The Syncthing Authors
  734. .SH COPYRIGHT
  735. 2014-2019, The Syncthing Authors
  736. .\" Generated by docutils manpage writer.
  737. .