syncthing-faq.7 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-FAQ" "7" "Jan 08, 2019" "v1" "Syncthing"
  4. .SH NAME
  5. syncthing-faq \- Frequently Asked Questions
  6. .
  7. .nr rst2man-indent-level 0
  8. .
  9. .de1 rstReportMargin
  10. \\$1 \\n[an-margin]
  11. level \\n[rst2man-indent-level]
  12. level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
  13. -
  14. \\n[rst2man-indent0]
  15. \\n[rst2man-indent1]
  16. \\n[rst2man-indent2]
  17. ..
  18. .de1 INDENT
  19. .\" .rstReportMargin pre:
  20. . RS \\$1
  21. . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
  22. . nr rst2man-indent-level +1
  23. .\" .rstReportMargin post:
  24. ..
  25. .de UNINDENT
  26. . RE
  27. .\" indent \\n[an-margin]
  28. .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
  29. .nr rst2man-indent-level -1
  30. .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
  31. .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
  32. ..
  33. .SH WHAT IS SYNCTHING?
  34. .sp
  35. Syncthing is an application that lets you synchronize your files across multiple
  36. devices. This means the creation, modification or deletion of files on one
  37. machine will automatically be replicated to your other devices. We believe your
  38. data is your data alone and you deserve to choose where it is stored. Therefore
  39. Syncthing does not upload your data to the cloud but exchanges your data across
  40. your machines as soon as they are online at the same time.
  41. .SH IS IT “SYNCTHING”, “SYNCTHING” OR “SYNCTHING”?
  42. .sp
  43. It’s \fBSyncthing\fP, although the command and source repository is spelled
  44. \fBsyncthing\fP so it may be referred to in that way as well. It’s definitely not
  45. SyncThing, even though the abbreviation \fBst\fP is used in some
  46. circumstances and file names.
  47. .SH HOW DOES SYNCTHING DIFFER FROM BITTORRENT/RESILIO SYNC?
  48. .sp
  49. The two are different and not related. Syncthing and BitTorrent/Resilio Sync accomplish
  50. some of the same things, namely syncing files between two or more computers.
  51. .sp
  52. BitTorrent Sync, now called Resilio Sync, is a proprietary peer\-to\-peer file
  53. synchronization tool available for Windows, Mac, Linux, Android, iOS, Windows
  54. Phone, Amazon Kindle Fire and BSD. [1] Syncthing is an open source file
  55. synchronization tool.
  56. .sp
  57. Syncthing uses an open and documented protocol, and likewise the security
  58. mechanisms in use are well defined and visible in the source code. Resilio
  59. Sync uses an undocumented, closed protocol with unknown security properties.
  60. .IP [1] 5
  61. \fI\%https://en.wikipedia.org/wiki/Resilio_Sync\fP
  62. .SH WHAT THINGS ARE SYNCED?
  63. .sp
  64. The following things are \fIalways\fP synchronized:
  65. .INDENT 0.0
  66. .IP \(bu 2
  67. File Contents
  68. .IP \(bu 2
  69. File Modification Times
  70. .UNINDENT
  71. .sp
  72. The following may be synchronized or not, depending:
  73. .INDENT 0.0
  74. .IP \(bu 2
  75. File Permissions (When supported by file system. On Windows, only the
  76. read only bit is synchronized.)
  77. .IP \(bu 2
  78. Symbolic Links (synced, except on Windows, but never followed.)
  79. .UNINDENT
  80. .sp
  81. The following are \fInot\fP synchronized;
  82. .INDENT 0.0
  83. .IP \(bu 2
  84. File or Directory Owners and Groups (not preserved)
  85. .IP \(bu 2
  86. Directory Modification Times (not preserved)
  87. .IP \(bu 2
  88. Hard Links (followed, not preserved)
  89. .IP \(bu 2
  90. Extended Attributes, Resource Forks (not preserved)
  91. .IP \(bu 2
  92. Windows, POSIX or NFS ACLs (not preserved)
  93. .IP \(bu 2
  94. Devices, FIFOs, and Other Specials (ignored)
  95. .IP \(bu 2
  96. Sparse file sparseness (will become sparse, when supported by the OS & filesystem)
  97. .UNINDENT
  98. .SH IS SYNCHRONIZATION FAST?
  99. .sp
  100. Syncthing segments files into pieces, called blocks, to transfer data from one
  101. device to another. Therefore, multiple devices can share the synchronization
  102. load, in a similar way to the torrent protocol. The more devices you have online,
  103. the faster an additional device will receive the data
  104. because small blocks will be fetched from all devices in parallel.
  105. .sp
  106. Syncthing handles renaming files and updating their metadata in an efficient
  107. manner. This means that renaming a large file will not cause a retransmission of
  108. that file. Additionally, appending data to existing large files should be
  109. handled efficiently as well.
  110. .sp
  111. Temporary files are used to store partial data
  112. downloaded from other devices. They are automatically removed whenever a file
  113. transfer has been completed or after the configured amount of time which is set
  114. in the configuration file (24 hours by default).
  115. .SH WHY IS THE SYNC SO SLOW?
  116. .sp
  117. When troubleshooting a slow sync, there are a number of things to check.
  118. .sp
  119. First of all, verify that you are not connected via a relay. In the “Remote
  120. Devices” list on the right side of the GUI, double check that you see
  121. “Address: <some address>” and \fInot\fP “Relay: <some address>”.
  122. [image]
  123. .sp
  124. If you are connected via a relay, this is because a direct connection could
  125. not be established. Double check and follow the suggestions in
  126. firewall\-setup to enable direct connections.
  127. .sp
  128. Second, if one of the devices is a very low powered machine (a Raspberry Pi,
  129. or a phone, or a NAS, or similar) you are likely constrained by the CPU on
  130. that device. See the next question for reasons Syncthing likes a faster CPU.
  131. You can verify this by looking at the CPU utilization in the GUI. If it is
  132. constantly at or close to 100%, you are limited by the CPU speed. In some
  133. cases a lower CPU usage number can also indicate being limited by the CPU \-
  134. for example constant 25% usage on a four core CPU likely means that
  135. Syncthing is doing something that is not parallellizable and thus limited to
  136. a single CPU core.
  137. .sp
  138. Third, verify that the network connection is OK. Tools such as iperf or just
  139. an Internet speed test can be used to verify the performance here.
  140. .SH WHY DOES IT USE SO MUCH CPU?
  141. .INDENT 0.0
  142. .IP 1. 3
  143. When new or changed files are detected, or Syncthing starts for the
  144. first time, your files are hashed using SHA\-256.
  145. .IP 2. 3
  146. Data that is sent over the network is compressed (optionally) and
  147. encrypted (always). When receiving data it must be decrypted and then (if
  148. compressed) decompressed.
  149. .IP 3. 3
  150. There is a certain amount of housekeeping that must be done to track the
  151. current and available versions of each file in the index database.
  152. .IP 4. 3
  153. By default Syncthing uses periodic scanning every 60 seconds to detect
  154. file changes. This means checking every file’s modification time and
  155. comparing it to the database. This can cause spikes of CPU usage for large
  156. folders.
  157. .UNINDENT
  158. .sp
  159. Hashing, compression and encryption cost CPU time. Also, using the GUI
  160. causes a certain amount of extra CPU usage to calculate the summary data it
  161. presents. Note however that once things are \fIin sync\fP CPU usage should be
  162. negligible.
  163. .sp
  164. To minimize the impact of this, Syncthing attempts to lower the
  165. process priority when starting up.
  166. .sp
  167. To further limit the amount of CPU used when syncing and scanning, set the
  168. environment variable \fBGOMAXPROCS\fP to the maximum number of CPU cores
  169. Syncthing should use at any given moment. For example, \fBGOMAXPROCS=2\fP on a
  170. machine with four cores will limit Syncthing to no more than half the
  171. system’s CPU power.
  172. .sp
  173. To reduce CPU spikes from scanning activity, use a filesystem notifications
  174. plugin. This is delivered by default via Synctrayzor, Syncthing\-GTK and on
  175. Android. For other setups, consider using \fI\%syncthing\-inotify\fP <\fBhttps://github.com/syncthing/syncthing-inotify\fP>\&.
  176. .SH SHOULD I KEEP MY DEVICE IDS SECRET?
  177. .sp
  178. No. The IDs are not sensitive. Given a device ID it’s possible to find the IP
  179. address for that device, if global discovery is enabled on it. Knowing the device
  180. ID doesn’t help you actually establish a connection to that device or get a list
  181. of files, etc.
  182. .sp
  183. For a connection to be established, both devices need to know about the other’s
  184. device ID. It’s not possible (in practice) to forge a device ID. (To forge a
  185. device ID you need to create a TLS certificate with that specific SHA\-256 hash.
  186. If you can do that, you can spoof any TLS certificate. The world is your
  187. oyster!)
  188. .sp
  189. \fBSEE ALSO:\fP
  190. .INDENT 0.0
  191. .INDENT 3.5
  192. device\-ids
  193. .UNINDENT
  194. .UNINDENT
  195. .SH WHAT IF THERE IS A CONFLICT?
  196. .sp
  197. Syncthing does recognize conflicts. When a file has been modified on two devices
  198. simultaneously and the content actually differs, one of the files will be
  199. renamed to \fB<filename>.sync\-conflict\-<date>\-<time>.<ext>\fP\&. The file with the
  200. older modification time will be marked as the conflicting file and thus be
  201. renamed. If the modification times are equal, the file originating from the
  202. device which has the larger value of the first 63 bits for his device ID will be
  203. marked as the conflicting file.
  204. If the conflict is between a modification and a deletion of the file, the
  205. modified file always wins and is resurrected without renaming on the
  206. device where it was deleted.
  207. .sp
  208. Beware that the \fB<filename>.sync\-conflict\-<date>\-<time>.<ext>\fP files are
  209. treated as normal files after they are created, so they are propagated between
  210. devices. We do this because the conflict is detected and resolved on one device,
  211. creating the \fBsync\-conflict\fP file, but it’s just as much of a conflict
  212. everywhere else and we don’t know which of the conflicting files is the “best”
  213. from the user point of view. Moreover, if there’s something that automatically
  214. causes a conflict on change you’ll end up with \fBsync\-conflict\-...sync\-conflict
  215. \-...\-sync\-conflict\fP files.
  216. .SH HOW DO I SERVE A FOLDER FROM A READ ONLY FILESYSTEM?
  217. .sp
  218. Syncthing requires a “folder marker” to indicate that the folder is present
  219. and healthy. By default this is a directory called \fB\&.stfolder\fP that is
  220. created by Syncthing when the folder is added. If this folder can’t be
  221. created (you are serving files from a CD or something) you can instead set
  222. the advanced config \fBMarker Name\fP to the name of some file or folder that
  223. you know will always exist in the folder.
  224. .SH I REALLY HATE THE .STFOLDER DIRECTORY, CAN I REMOVE IT?
  225. .sp
  226. See the previous question.
  227. .SH AM I ABLE TO NEST SHARED FOLDERS IN SYNCTHING?
  228. .sp
  229. Do not share a folder which is inside another shared folder. This behaviour
  230. is in no way supported, recommended or coded for in any way, and comes with
  231. many pitfalls.
  232. .SH HOW DO I RENAME/MOVE A SYNCED FOLDER?
  233. .sp
  234. Syncthing doesn’t have a direct way to do this, as it’s potentially
  235. dangerous to do so if you’re not careful \- it may result in data loss if
  236. something goes wrong during the move and is synchronized to your other
  237. devices.
  238. .sp
  239. The easy way to rename or move a synced folder on the local system is to
  240. remove the folder in the Syncthing UI, move it on disk, then re\-add it using
  241. the new path.
  242. .sp
  243. It’s best to do this when the folder is already in sync between your
  244. devices, as it is otherwise unpredictable which changes will “win” after the
  245. move. Changes made on other devices may be overwritten, or changes made
  246. locally may be overwritten by those on other devices.
  247. .sp
  248. An alternative way is to shut down Syncthing, move the folder on disk (including
  249. the \fB\&.stfolder\fP marker), edit the path directly in \fBconfig.xml\fP in the
  250. configuration folder (see config) and then start Syncthing again.
  251. .SH HOW DO I CONFIGURE MULTIPLE USERS ON A SINGLE MACHINE?
  252. .sp
  253. Each user should run their own Syncthing instance. Be aware that you might need
  254. to configure listening ports such that they do not overlap (see config).
  255. .SH DOES SYNCTHING SUPPORT SYNCING BETWEEN FOLDERS ON THE SAME SYSTEM?
  256. .sp
  257. No. Syncthing is not designed to sync locally and the overhead involved in
  258. doing so using Syncthing’s method would be wasteful. There are better
  259. programs to achieve this such as rsync or Unison.
  260. .SH WHEN I DO HAVE TWO DISTINCT SYNCTHING-MANAGED FOLDERS ON TWO HOSTS, HOW DOES SYNCTHING HANDLE MOVING FILES BETWEEN THEM?
  261. .sp
  262. Syncthing does not specially handle this case, and most files most likely get
  263. re\-downloaded.
  264. .sp
  265. In detail, the behavior depends on the scan order. If you have folder A and B,
  266. and move files from A to B, if A gets scanned first, it will announce removal of
  267. the files to others who will remove the files. As you rescan B, B will
  268. announce addition of new files, and other peers will have nowhere to get
  269. them from apart from re\-downloading them.
  270. .sp
  271. If B gets rescanned first, B will announce additions first, remote
  272. peers will reconstruct the files (not rename, more like copy block by
  273. block) from A, and then as A gets rescanned remove the files from A.
  274. .sp
  275. A workaround would be to copy first from A to B, rescan B, wait for B to
  276. rebuild on remote ends, and then delete from A.
  277. .SH IS SYNCTHING MY IDEAL BACKUP APPLICATION?
  278. .sp
  279. No. Syncthing is not a great backup application because all changes to your
  280. files (modifications, deletions, etc.) will be propagated to all your
  281. devices. You can enable versioning, but we encourage the use of other tools
  282. to keep your data safe from your (or our) mistakes.
  283. .SH WHY IS THERE NO IOS CLIENT?
  284. .sp
  285. There is an alternative implementation of Syncthing (using the same network
  286. protocol) called \fBfsync()\fP\&. There are no plans by the current Syncthing
  287. team to support iOS in the foreseeable future, as the code required to do so
  288. would be quite different from what Syncthing is today.
  289. .SH HOW CAN I EXCLUDE FILES WITH BRACKETS ([]) IN THE NAME?
  290. .sp
  291. The patterns in .stignore are glob patterns, where brackets are used to
  292. denote character ranges. That is, the pattern \fBq[abc]x\fP will match the
  293. files \fBqax\fP, \fBqbx\fP and \fBqcx\fP\&.
  294. .sp
  295. To match an actual file \fIcalled\fP \fBq[abc]x\fP the pattern needs to “escape”
  296. the brackets, like so: \fBq\e[abc\e]x\fP\&.
  297. .sp
  298. On Windows, escaping special characters is not supported as the \fB\e\fP
  299. character is used as a path separator. On the other hand, special characters
  300. such as \fB[\fP and \fB?\fP are not allowed in file names on Windows.
  301. .SH 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. .SH HOW DO I ACCESS THE WEB GUI FROM ANOTHER COMPUTER?
  310. .sp
  311. The default listening address is 127.0.0.1:8384, so you can only access the
  312. GUI from the same machine. This is for security reasons. Change the \fBGUI
  313. listen address\fP through the web UI from \fB127.0.0.1:8384\fP to
  314. \fB0.0.0.0:8384\fP or change the config.xml:
  315. .INDENT 0.0
  316. .INDENT 3.5
  317. .sp
  318. .nf
  319. .ft C
  320. <gui enabled="true" tls="false">
  321. <address>127.0.0.1:8384</address>
  322. .ft P
  323. .fi
  324. .UNINDENT
  325. .UNINDENT
  326. .sp
  327. to
  328. .INDENT 0.0
  329. .INDENT 3.5
  330. .sp
  331. .nf
  332. .ft C
  333. <gui enabled="true" tls="false">
  334. <address>0.0.0.0:8384</address>
  335. .ft P
  336. .fi
  337. .UNINDENT
  338. .UNINDENT
  339. .sp
  340. Then the GUI is accessible from everywhere. You should set a password and
  341. enable HTTPS with this configuration. You can do this from inside the GUI.
  342. .sp
  343. If both your computers are Unix\-like (Linux, Mac, etc.) you can also leave the
  344. GUI settings at default and use an ssh port forward to access it. For
  345. example,
  346. .INDENT 0.0
  347. .INDENT 3.5
  348. .sp
  349. .nf
  350. .ft C
  351. $ ssh \-L 9090:127.0.0.1:8384 [email protected]
  352. .ft P
  353. .fi
  354. .UNINDENT
  355. .UNINDENT
  356. .sp
  357. will log you into othercomputer.example.com, and present the \fIremote\fP
  358. Syncthing GUI on \fI\%http://localhost:9090\fP on your \fIlocal\fP computer.
  359. .sp
  360. If you only want to access the remote gui and don’t want the terminal
  361. session, use this example,
  362. .INDENT 0.0
  363. .INDENT 3.5
  364. .sp
  365. .nf
  366. .ft C
  367. $ ssh \-N \-L 9090:127.0.0.1:8384 [email protected]
  368. .ft P
  369. .fi
  370. .UNINDENT
  371. .UNINDENT
  372. .sp
  373. If only your remote computer is Unix\-like,
  374. you can still access it with ssh from Windows.
  375. .sp
  376. Under Windows 10 (64 bit) you can use the same ssh command if you install
  377. the Windows Subsystem for Linux.
  378. \fI\%https://msdn.microsoft.com/en\-gb/commandline/wsl/install_guide\fP
  379. .sp
  380. Another Windows way to run ssh is to install gow.
  381. (Gnu On Windows) \fI\%https://github.com/bmatzelle/gow\fP
  382. .sp
  383. The easiest way to install gow is with chocolatey.
  384. \fI\%https://chocolatey.org/\fP
  385. .SH WHY DO I GET “HOST CHECK ERROR” IN THE GUI/API?
  386. .sp
  387. Since version 0.14.6 Syncthing does an extra security check when the GUI/API
  388. is bound to localhost \- namely that the browser is talking to localhost.
  389. This protects against most forms of \fI\%DNS rebinding attack\fP <\fBhttps://en.wikipedia.org/wiki/DNS_rebinding\fP> against the GUI.
  390. .sp
  391. To pass this test, ensure that you are accessing the GUI using an URL that
  392. begins with \fIhttp://localhost\fP, \fIhttp://127.0.0.1\fP or \fIhttp://[::1]\fP\&. HTTPS
  393. is fine too, of course.
  394. .sp
  395. If you are using a proxy in front of Syncthing you may need to disable this
  396. check, after ensuring that the proxy provides sufficient authentication to
  397. protect against unauthorized access. Either:
  398. .INDENT 0.0
  399. .IP \(bu 2
  400. Make sure the proxy sets a \fIHost\fP header containing \fIlocalhost\fP, or
  401. .IP \(bu 2
  402. Set \fIinsecureSkipHostcheck\fP in the advanced settings, or
  403. .IP \(bu 2
  404. Bind the GUI/API to a non\-localhost listen port.
  405. .UNINDENT
  406. .sp
  407. In all cases, username/password authentication and HTTPS should be used.
  408. .SH MY SYNCTHING DATABASE IS CORRUPT
  409. .sp
  410. This is almost always a result of bad RAM, storage device or other hardware. When the index database is found to be corrupt Syncthing cannot operate and will note this in the logs and exit. To overcome this delete the \fI\%database folder\fP <\fBhttps://docs.syncthing.net/users/config.html#description\fP> inside Syncthing’s home directory and re\-start Syncthing. It will then need to perform a full re\-hashing of all shared folders. You should check your system in case the underlying cause is indeed faulty hardware which may put the system at risk of further data loss.
  411. .SH I DON’T LIKE THE GUI OR THE THEME. CAN IT BE CHANGED?
  412. .sp
  413. You can change the theme in the settings. Syncthing ships with other themes
  414. than the default.
  415. .sp
  416. If you want a custom theme or a completely different GUI, you can add your
  417. own.
  418. By default, Syncthing will look for a directory \fBgui\fP inside the Syncthing
  419. home folder. To change the directory to look for themes, you need to set the
  420. STGUIASSETS environment variable. To get the concrete directory, run
  421. syncthing with the \fB\-paths\fP parameter. It will print all the relevant paths,
  422. including the “GUI override directory”.
  423. .sp
  424. To add e.g. a red theme, you can create the file \fBred/assets/css/theme.css\fP
  425. inside the GUI override directory to override the default CSS styles.
  426. .sp
  427. To create a whole new GUI, you should checkout the files at
  428. \fI\%https://github.com/syncthing/syncthing/tree/master/gui/default\fP
  429. to get an idea how to do that.
  430. .SH WHY DO I SEE SYNCTHING TWICE IN TASK MANAGER?
  431. .sp
  432. One process manages the other, to capture logs and manage restarts. This
  433. makes it easier to handle upgrades from within Syncthing itself, and also
  434. ensures that we get a nice log file to help us narrow down the cause for
  435. crashes and other bugs.
  436. .SH WHERE DO SYNCTHING LOGS GO TO?
  437. .sp
  438. Syncthing logs to stdout by default. On Windows Syncthing by default also
  439. creates \fBsyncthing.log\fP in Syncthing’s home directory (run \fBsyncthing
  440. \-paths\fP to see where that is). Command line option \fB\-logfile\fP can be used
  441. to specify a user\-defined logfile.
  442. .SH HOW CAN I VIEW THE HISTORY OF CHANGES?
  443. .sp
  444. The web GUI contains a \fBGlobal Changes\fP button under the device list which
  445. displays changes since the last (re)start of Syncthing. With the \fB\-audit\fP
  446. option you can enable a persistent, detailed log of changes and most
  447. activities, which contains a \fBJSON\fP formatted sequence of events in the
  448. \fB~/.config/syncthing/audit\-_date_\-_time_.log\fP file.
  449. .SH DOES THE AUDIT LOG CONTAIN EVERY CHANGE?
  450. .sp
  451. The audit log (and the \fBGlobal Changes\fP window) sees the changes that your
  452. Syncthing sees. When Syncthing is continuously connected it usually sees every change
  453. happening immediately and thus knows which node initiated the change.
  454. When topology gets complex or when your node reconnects after some time offline,
  455. Syncthing synchronises with its neighbours: It gets the latest synchronised state
  456. from the neighbour, which is the \fIresult\fP of all the changes between the last
  457. known state (before disconnect or network delay) and the current state at the
  458. neighbour, and if there were updates, deletes, creates, conflicts, which were
  459. overlapping we only see the \fIlatest change\fP for a given file or directory (and
  460. the node where that latest change occurred). When we connect to multiple neighbours
  461. Syncthing decides which neighbor has the latest state, or if the states conflict
  462. it initiates the conflict resolution procedure, which in the end results in a consistent
  463. up\-to\-date state with all the neighbours.
  464. .SH HOW DO I UPGRADE SYNCTHING?
  465. .sp
  466. If you use a package manager such as Debian’s apt\-get, you should upgrade
  467. using the package manager. If you use the binary packages linked from
  468. Syncthing.net, you can use Syncthing built in automatic upgrades.
  469. .INDENT 0.0
  470. .IP \(bu 2
  471. If automatic upgrades is enabled (which is the default), Syncthing will
  472. upgrade itself automatically within 24 hours of a new release.
  473. .IP \(bu 2
  474. The upgrade button appears in the web GUI when a new version has been
  475. released. Pressing it will perform an upgrade.
  476. .IP \(bu 2
  477. To force an upgrade from the command line, run \fBsyncthing \-upgrade\fP\&.
  478. .UNINDENT
  479. .sp
  480. Note that your system should have CA certificates installed which allow a
  481. secure connection to GitHub (e.g. FreeBSD requires \fBsudo pkg install
  482. ca_root_nss\fP). If \fBcurl\fP or \fBwget\fP works with normal HTTPS sites, then
  483. so should Syncthing.
  484. .SH WHERE DO I FIND THE LATEST RELEASE?
  485. .sp
  486. We release new versions through GitHub. The latest release is always found
  487. \fI\%on the release page\fP <\fBhttps://github.com/syncthing/syncthing/releases/latest\fP>\&. Unfortunately
  488. GitHub does not provide a single URL to automatically download the latest
  489. version. We suggest to use the GitHub API at
  490. \fI\%https://api.github.com/repos/syncthing/syncthing/releases/latest\fP and parsing
  491. the JSON response.
  492. .SH HOW DO I RUN SYNCTHING AS A DAEMON PROCESS ON LINUX?
  493. .sp
  494. If you’re using systemd, runit, or upstart, we already ship examples, check
  495. \fI\%https://github.com/syncthing/syncthing/tree/master/etc\fP for example
  496. configurations.
  497. .sp
  498. If however you’re not using one of these tools, you have a couple of options.
  499. If your system has a tool called \fBstart\-stop\-daemon\fP installed (that’s the name
  500. of the command, not the package), look into the local documentation for that, it
  501. will almost certainly cover 100% of what you want to do. If you don’t have
  502. \fBstart\-stop\-daemon\fP, there are a bunch of other software packages you could use
  503. to do this. The most well known is called daemontools, and can be found in the
  504. standard package repositories for almost every modern Linux distribution.
  505. Other popular tools with similar functionality include S6 and the aforementioned
  506. runit.
  507. .SH HOW DO I INCREASE THE INOTIFY LIMIT TO GET MY FILESYSTEM WATCHER TO WORK?
  508. .sp
  509. You are probably reading this because you encountered the following error with
  510. the filesystem watcher on linux:
  511. .INDENT 0.0
  512. .INDENT 3.5
  513. Failed to start filesystem watcher for folder yourLabel (yourID): failed to
  514. setup inotify handler. Please increase inotify limits, see
  515. \fI\%https://docs.syncthing.net/users/faq.html#inotify\-limits\fP
  516. .UNINDENT
  517. .UNINDENT
  518. .sp
  519. Linux typically restricts the amount of watches per user (usually 8192). When
  520. you have more directories you need to adjust that number.
  521. .sp
  522. On many Linux distributions you can run the following to fix it:
  523. .INDENT 0.0
  524. .INDENT 3.5
  525. .sp
  526. .nf
  527. .ft C
  528. echo "fs.inotify.max_user_watches=204800" | sudo tee \-a /etc/sysctl.conf
  529. .ft P
  530. .fi
  531. .UNINDENT
  532. .UNINDENT
  533. .sp
  534. On Arch Linux and potentially others it is preferred to write this line into a
  535. separate file, i.e. you should run:
  536. .INDENT 0.0
  537. .INDENT 3.5
  538. .sp
  539. .nf
  540. .ft C
  541. echo "fs.inotify.max_user_watches=204800" | sudo tee \-a /etc/sysctl.d/90\-override.conf
  542. .ft P
  543. .fi
  544. .UNINDENT
  545. .UNINDENT
  546. .sp
  547. This only takes effect after a reboot. To adjust the limit immediately, run:
  548. .INDENT 0.0
  549. .INDENT 3.5
  550. .sp
  551. .nf
  552. .ft C
  553. sudo sh \-c \(aqecho 204800 > /proc/sys/fs/inotify/max_user_watches\(aq
  554. .ft P
  555. .fi
  556. .UNINDENT
  557. .UNINDENT
  558. .SH AUTHOR
  559. The Syncthing Authors
  560. .SH COPYRIGHT
  561. 2014-2018, The Syncthing Authors
  562. .\" Generated by docutils manpage writer.
  563. .