syncthing-faq.7 26 KB

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