syncthing-faq.7 28 KB

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