syncthing-config.5 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-CONFIG" "5" "September 23, 2015" "v0.11" "Syncthing"
  4. .SH NAME
  5. syncthing-config \- Syncthing Configuration
  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 SYNOPSIS
  34. .INDENT 0.0
  35. .INDENT 3.5
  36. .sp
  37. .nf
  38. .ft C
  39. $HOME/.config/syncthing
  40. $HOME/Library/Application Support/Syncthing
  41. %AppData%/Syncthing
  42. %localappdata%/Syncthing
  43. .ft P
  44. .fi
  45. .UNINDENT
  46. .UNINDENT
  47. .SH DESCRIPTION
  48. .sp
  49. Syncthing uses a single directory to store configuration, crypto keys
  50. and index caches. The location defaults to \fB$HOME/.config/syncthing\fP
  51. (Unix\-like), \fB$HOME/Library/Application Support/Syncthing\fP (Mac),
  52. \fB%AppData%/Syncthing\fP (Windows XP) or \fB%LocalAppData%/Syncthing\fP
  53. (Windows 7+). It can be changed at runtime using the \fB\-home\fP flag. In this
  54. directory the following files are located:
  55. .INDENT 0.0
  56. .TP
  57. .B \fBconfig.xml\fP
  58. The configuration file, in XML format.
  59. .TP
  60. .B \fBcert.pem\fP, \fBkey.pem\fP
  61. The device\(aqs RSA public and private key. These form the basis for the
  62. device ID. The key must be kept private.
  63. .TP
  64. .B \fBhttps\-cert.pem\fP, \fBhttps\-key.pem\fP
  65. The certificate and key for HTTPS GUI connections. These may be replaced
  66. with a custom certificate for HTTPS as desired.
  67. .TP
  68. .B \fBindex\-\fI*\fP\&.db\fP
  69. A directory holding the database with metadata and hashes of the files
  70. currently on disk and available from peers.
  71. .TP
  72. .B \fBcsrftokens.txt\fP
  73. A list of recently issued CSRF tokens (for protection against browser cross
  74. site request forgery).
  75. .UNINDENT
  76. .SH CONFIG FILE FORMAT
  77. .sp
  78. The following is shows the default configuration file:
  79. .INDENT 0.0
  80. .INDENT 3.5
  81. .sp
  82. .nf
  83. .ft C
  84. <configuration version="10">
  85. <folder id="default" path="/Users/jb/Sync" ro="false" rescanIntervalS="60" ignorePerms="false" autoNormalize="false">
  86. <device id="5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU"></device>
  87. <versioning></versioning>
  88. <copiers>0</copiers>
  89. <pullers>0</pullers>
  90. <hashers>0</hashers>
  91. <order>random</order>
  92. </folder>
  93. <device id="5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU" name="syno" compression="metadata" introducer="false">
  94. <address>dynamic</address>
  95. </device>
  96. <gui enabled="true" tls="false">
  97. <address>127.0.0.1:8384</address>
  98. <apikey>l7jSbCqPD95JYZ0g8vi4ZLAMg3ulnN1b</apikey>
  99. </gui>
  100. <options>
  101. <listenAddress>0.0.0.0:56847</listenAddress>
  102. <globalAnnounceServer>udp4://announce.syncthing.net:22026</globalAnnounceServer>
  103. <globalAnnounceServer>udp6://announce\-v6.syncthing.net:22026</globalAnnounceServer>
  104. <globalAnnounceEnabled>true</globalAnnounceEnabled>
  105. <localAnnounceEnabled>true</localAnnounceEnabled>
  106. <localAnnouncePort>21025</localAnnouncePort>
  107. <localAnnounceMCAddr>[ff32::5222]:21026</localAnnounceMCAddr>
  108. <maxSendKbps>0</maxSendKbps>
  109. <maxRecvKbps>0</maxRecvKbps>
  110. <reconnectionIntervalS>60</reconnectionIntervalS>
  111. <startBrowser>true</startBrowser>
  112. <upnpEnabled>true</upnpEnabled>
  113. <upnpLeaseMinutes>60</upnpLeaseMinutes>
  114. <upnpRenewalMinutes>30</upnpRenewalMinutes>
  115. <upnpTimeoutSeconds>10</upnpTimeoutSeconds>
  116. <urAccepted>0</urAccepted>
  117. <urUniqueID></urUniqueID>
  118. <restartOnWakeup>true</restartOnWakeup>
  119. <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
  120. <keepTemporariesH>24</keepTemporariesH>
  121. <cacheIgnoredFiles>true</cacheIgnoredFiles>
  122. <progressUpdateIntervalS>5</progressUpdateIntervalS>
  123. <symlinksEnabled>true</symlinksEnabled>
  124. <limitBandwidthInLan>false</limitBandwidthInLan>
  125. <databaseBlockCacheMiB>0</databaseBlockCacheMiB>
  126. </options>
  127. </configuration>
  128. .ft P
  129. .fi
  130. .UNINDENT
  131. .UNINDENT
  132. .SH CONFIGURATION ELEMENT
  133. .sp
  134. This is the root element.
  135. .INDENT 0.0
  136. .TP
  137. .B version
  138. The config version. Increments whenever a change is made that requires
  139. migration from previous formats.
  140. .UNINDENT
  141. .SH FOLDER ELEMENT
  142. .INDENT 0.0
  143. .INDENT 3.5
  144. .sp
  145. .nf
  146. .ft C
  147. <folder id="default" path="/Users/jb/Sync" ro="false" rescanIntervalS="60" ignorePerms="false" autoNormalize="false">
  148. <device id="5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU"></device>
  149. <versioning></versioning>
  150. <copiers>0</copiers>
  151. <pullers>0</pullers>
  152. <hashers>0</hashers>
  153. <order>random</order>
  154. </folder>
  155. .ft P
  156. .fi
  157. .UNINDENT
  158. .UNINDENT
  159. .sp
  160. One or more \fBfolder\fP elements must be present in the file. Each element
  161. describes one folder. The following attributes may be set on the \fBfolder\fP
  162. element:
  163. .INDENT 0.0
  164. .TP
  165. .B id
  166. The folder ID, must be unique. (mandatory)
  167. .TP
  168. .B path
  169. The oath to the directory where the folder is stored on this
  170. device; not sent to other devices. (mandatory)
  171. .TP
  172. .B ro
  173. True if the folder is read only (Master mode; will not be modified by
  174. Syncthing) on this device.
  175. .TP
  176. .B rescanIntervalS
  177. The rescan interval, in seconds.
  178. .TP
  179. .B ignorePerms
  180. True if the folder should ignore permissions.
  181. .TP
  182. .B autoNormalize
  183. Automatically correct UTF\-8 normalization errors found in file names.
  184. .UNINDENT
  185. .sp
  186. The following child elements may exist:
  187. .INDENT 0.0
  188. .TP
  189. .B device
  190. These must have the \fBid\fP attribute and nothing else. Mentioned devices
  191. are those that will be sharing the folder in question. Each mentioned
  192. device must have a separate \fBdevice\fP element later in the file. It is
  193. customary that the local device ID is included in all repositories.
  194. Syncthing will currently add this automatically if it is not present in
  195. the configuration file.
  196. .TP
  197. .B versioning
  198. Specifies a versioning configuration.
  199. .UNINDENT
  200. .sp
  201. \fBSEE ALSO:\fP
  202. .INDENT 0.0
  203. .INDENT 3.5
  204. versioning
  205. .UNINDENT
  206. .UNINDENT
  207. .INDENT 0.0
  208. .TP
  209. .B copiers, pullers, hashers
  210. The number of copier, puller and hasher routines to use, or zero for the
  211. system determined optimum. These are low level performance options for
  212. advanced users only; do not change unless requested to or you\(aqve actually
  213. read and understood the code yourself. :)
  214. .TP
  215. .B order
  216. The order in which needed files should be pulled from the cluster.
  217. The possibles values are:
  218. .INDENT 7.0
  219. .TP
  220. .B random
  221. Pull files in random order. This optimizes for balancing resources among
  222. the devices in a cluster.
  223. .TP
  224. .B alphabetic
  225. Pull files ordered by file name alphabetically.
  226. .TP
  227. .B smallestFirst, largestFirst
  228. Pull files ordered by file size; smallest and largest first respectively.
  229. .TP
  230. .B oldestFirst, newestFirst
  231. Pull files ordered by modification time; oldest and newest first
  232. respectively.
  233. .UNINDENT
  234. .UNINDENT
  235. .SH DEVICE ELEMENT
  236. .INDENT 0.0
  237. .INDENT 3.5
  238. .sp
  239. .nf
  240. .ft C
  241. <device id="5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU" name="syno" compression="metadata" introducer="false">
  242. <address>dynamic</address>
  243. </device>
  244. .ft P
  245. .fi
  246. .UNINDENT
  247. .UNINDENT
  248. .sp
  249. One or more \fBdevice\fP elements must be present in the file. Each element
  250. describes a device participating in the cluster. It is customary to include a
  251. \fBdevice\fP element for the local device; Syncthing will currently add one if
  252. it is not present. The following attributes may be set on the \fBdevice\fP
  253. element:
  254. .INDENT 0.0
  255. .TP
  256. .B id
  257. The device ID. This must be written in canonical form, that is without any
  258. spaces or dashes. (mandatory)
  259. .TP
  260. .B name
  261. A friendly name for the device. (optional)
  262. .TP
  263. .B compression
  264. Whether to use protocol compression when sending messages to this device.
  265. The possible values are:
  266. .INDENT 7.0
  267. .TP
  268. .B metadata
  269. Compress metadata packets, such as index information. Metadata is
  270. usually very compression friendly so this is a good default.
  271. .TP
  272. .B always
  273. Compress all packets, including file data. This is recommended if the
  274. folders contents are mainly compressible data such as documents or
  275. text files.
  276. .TP
  277. .B never
  278. Disable all compression.
  279. .UNINDENT
  280. .TP
  281. .B introducer
  282. Set to true if this device should be trusted as an introducer, i.e. we
  283. should copy their list of devices per folder when connecting.
  284. .UNINDENT
  285. .sp
  286. In addition, one or more \fBaddress\fP child elements must be present. Each
  287. contains an address to use when attempting to connect to this device and will
  288. be tried in order. Accepted formats are:
  289. .INDENT 0.0
  290. .TP
  291. .B IPv4 address (\fB192.0.2.42\fP)
  292. The default port (22000) is used.
  293. .TP
  294. .B IPv4 address and port (\fB192.0.2.42:12345\fP)
  295. The address and port is used as given.
  296. .TP
  297. .B IPv6 address (\fB2001:db8::23:42\fP)
  298. The default port (22000) is used.
  299. .TP
  300. .B IPv6 address and port (\fB[2001:db8::23:42]:12345\fP)
  301. The address and port is used as given. The address must be enclosed in
  302. square brackets.
  303. .TP
  304. .B \fBdynamic\fP
  305. The word \fBdynamic\fP means to use local and global discovery to find the
  306. device.
  307. .UNINDENT
  308. .SH GUI ELEMENT
  309. .INDENT 0.0
  310. .INDENT 3.5
  311. .sp
  312. .nf
  313. .ft C
  314. <gui enabled="true" tls="false">
  315. <address>127.0.0.1:8384</address>
  316. <apikey>l7jSbCqPD95JYZ0g8vi4ZLAMg3ulnN1b</apikey>
  317. </gui>
  318. .ft P
  319. .fi
  320. .UNINDENT
  321. .UNINDENT
  322. .sp
  323. There must be exactly one \fBgui\fP element. The GUI configuration is also used
  324. by the rest\-api and the event\-api\&. The following attributes may
  325. be set on the \fBgui\fP element:
  326. .INDENT 0.0
  327. .TP
  328. .B enabled
  329. If not \fBtrue\fP, the GUI and API will not be started.
  330. .TP
  331. .B tls
  332. If set to \fBtrue\fP, TLS (HTTPS) will be enforced. Non\-HTTPS requests will
  333. be redirected to HTTPS. When this is set to \fBfalse\fP, TLS connections are
  334. still possible but it is not mandatory.
  335. .UNINDENT
  336. .sp
  337. The following child elements may be present:
  338. .INDENT 0.0
  339. .TP
  340. .B address
  341. Set the listen addresses. One or more address elements must be present.
  342. Allowed address formats are:
  343. .INDENT 7.0
  344. .TP
  345. .B IPv4 address and port (\fB127.0.0.1:8384\fP)
  346. The address and port is used as given.
  347. .TP
  348. .B IPv6 address and port (\fB[::1]:8384\fP)
  349. The address and port is used as given. The address must be enclosed in
  350. square brackets.
  351. .TP
  352. .B Wildcard and port (\fB0.0.0.0:12345\fP, \fB[::]:12345\fP, \fB:12345\fP)
  353. These are equivalent and will result in Syncthing listening on all
  354. interfaces and both IPv4 and IPv6.
  355. .UNINDENT
  356. .TP
  357. .B username
  358. Set to require authentication.
  359. .TP
  360. .B password
  361. Contains the bcrypt hash of the real password.
  362. .TP
  363. .B apikey
  364. If set, this is the API key that enables usage of the REST interface.
  365. .UNINDENT
  366. .SH OPTIONS ELEMENT
  367. .INDENT 0.0
  368. .INDENT 3.5
  369. .sp
  370. .nf
  371. .ft C
  372. <options>
  373. <listenAddress>0.0.0.0:56847</listenAddress>
  374. <globalAnnounceServer>udp4://announce.syncthing.net:22026</globalAnnounceServer>
  375. <globalAnnounceServer>udp6://announce\-v6.syncthing.net:22026</globalAnnounceServer>
  376. <globalAnnounceEnabled>true</globalAnnounceEnabled>
  377. <localAnnounceEnabled>true</localAnnounceEnabled>
  378. <localAnnouncePort>21025</localAnnouncePort>
  379. <localAnnounceMCAddr>[ff32::5222]:21026</localAnnounceMCAddr>
  380. <maxSendKbps>0</maxSendKbps>
  381. <maxRecvKbps>0</maxRecvKbps>
  382. <reconnectionIntervalS>60</reconnectionIntervalS>
  383. <startBrowser>true</startBrowser>
  384. <upnpEnabled>true</upnpEnabled>
  385. <upnpLeaseMinutes>60</upnpLeaseMinutes>
  386. <upnpRenewalMinutes>30</upnpRenewalMinutes>
  387. <upnpTimeoutSeconds>10</upnpTimeoutSeconds>
  388. <urAccepted>0</urAccepted>
  389. <urUniqueID></urUniqueID>
  390. <restartOnWakeup>true</restartOnWakeup>
  391. <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
  392. <keepTemporariesH>24</keepTemporariesH>
  393. <cacheIgnoredFiles>true</cacheIgnoredFiles>
  394. <progressUpdateIntervalS>5</progressUpdateIntervalS>
  395. <symlinksEnabled>true</symlinksEnabled>
  396. <limitBandwidthInLan>false</limitBandwidthInLan>
  397. <databaseBlockCacheMiB>0</databaseBlockCacheMiB>
  398. <pingTimeoutS>60</pingTimeoutS>
  399. <pingIdleTimeS>120</pingIdleTimeS>
  400. </options>
  401. .ft P
  402. .fi
  403. .UNINDENT
  404. .UNINDENT
  405. .sp
  406. The \fBoptions\fP element contains all other global configuration options.
  407. .INDENT 0.0
  408. .TP
  409. .B listenAddress
  410. The listen address for incoming sync connections. See the \fBaddress\fP
  411. element under the \fI\%GUI Element\fP for allowed syntax.
  412. .TP
  413. .B globalAnnounceServer
  414. A URI to a global announce (discovery) server. Allowed protocol prefixes
  415. are \fBudp4://\fP (UDP over IPv4), \fBudp6://\fP (UDP over IPv6) and
  416. \fBudp://\fP (UDP over any available protocol).
  417. .TP
  418. .B globalAnnounceEnabled
  419. Whether to announce this device to the global announce (discovery) server,
  420. and also use it to look up other device.
  421. .TP
  422. .B localAnnounceEnabled
  423. Whether to send announcements to the local LAN, also use such
  424. announcements to find other devices.
  425. .TP
  426. .B localAnnouncePort
  427. The port on which to listen and send IPv4 broadcast announcements to.
  428. .TP
  429. .B localAnnounceMCAddr
  430. The group address and port to join and send IPv6 multicast announcements on.
  431. .TP
  432. .B maxSendKbps
  433. Outgoing data rate limit, in kibibits per second.
  434. .TP
  435. .B maxRecvKbps
  436. Incoming data rate limits, in kibibits per second.
  437. .TP
  438. .B reconnectionIntervalS
  439. The number of seconds to wait between each attempt to connect to currently
  440. unconnected devices.
  441. .TP
  442. .B startBrowser
  443. Whether to attempt to start a browser to show the GUI when Syncthing starts.
  444. .TP
  445. .B upnpEnabled
  446. Whether to attempt to perform an UPnP port mapping for incoming sync
  447. connections.
  448. .TP
  449. .B upnpLeaseMinutes
  450. Request a lease for this many minutes; zero to request a permanent lease.
  451. .TP
  452. .B upnpRenewalMinutes
  453. Attempt to renew the lease after this many minutes.
  454. .TP
  455. .B upnpTimeoutSeconds
  456. When scanning for UPnP devices, wait this long for responses.
  457. .TP
  458. .B urAccepted
  459. Whether the user as accepted to submit anonymous usage data. The default,
  460. \fB0\fP, mean the user has not made a choice, and Syncthing will ask at some
  461. point in the future. \fB\-1\fP means no, a number above zero means that that
  462. version of usage reporting has been accepted.
  463. .TP
  464. .B urUniqueID
  465. The unique ID sent together with the usage report. Generated when usage
  466. reporting is enabled.
  467. .TP
  468. .B restartOnWakeup
  469. Whether to perform a restart of Syncthing when it is detected that we are
  470. waking from sleep mode (i.e. a folded up laptop).
  471. .TP
  472. .B autoUpgradeIntervalH
  473. Check for a newer version after this many hours. Set to zero to disable
  474. automatic upgrades.
  475. .TP
  476. .B keepTemporariesH
  477. Keep temporary failed transfers for this many hours. While the temporaries
  478. are kept, the data they contain need not be transferred again.
  479. .TP
  480. .B cacheIgnoredFiles
  481. Whether to cache the results of ignore pattern evaluation. Performance at
  482. the price of memory.
  483. .TP
  484. .B progressUpdateIntervalS
  485. .
  486. \fBNOTE:\fP
  487. .INDENT 7.0
  488. .INDENT 3.5
  489. Requires explanation.
  490. .UNINDENT
  491. .UNINDENT
  492. .TP
  493. .B symlinksEnabled
  494. Whether to sync symlinks, if supported by the system.
  495. .TP
  496. .B limitBandwidthInLan
  497. Whether to apply bandwidth limits to devices in the same broadcast domain
  498. as the local device.
  499. .TP
  500. .B databaseBlockCacheMiB
  501. Override the automatically calculated database block cache size. Don\(aqt,
  502. unless you\(aqre very short on memory, in which case you want to set this to
  503. \fB8\fP\&.
  504. .TP
  505. .B pingTimeoutS
  506. Ping\-timeout in seconds. Don\(aqt change it unless you are having issues due to
  507. slow response time (slow connection/cpu) and large index exchanges
  508. .TP
  509. .B pingIdleTimeS
  510. ping interval in seconds. Don\(aqt change it unless you feel it\(aqs necessary.
  511. .UNINDENT
  512. .SH AUTHOR
  513. The Syncthing Authors
  514. .SH COPYRIGHT
  515. 2015, The Syncthing Authors
  516. .\" Generated by docutils manpage writer.
  517. .