syncthing-config.5 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984
  1. .\" Man page generated from reStructuredText.
  2. .
  3. .TH "SYNCTHING-CONFIG" "5" "Apr 24, 2020" "v1" "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’s ECDSA 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\-\fP\fI*\fP\fB\&.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 shows an example of the default configuration file (IDs will differ):
  79. .INDENT 0.0
  80. .INDENT 3.5
  81. .sp
  82. .nf
  83. .ft C
  84. <configuration version="26">
  85. <folder id="zj2AA\-q55a7" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="60" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
  86. <device id="3LT2GA5\-CQI4XJM\-WTZ264P\-MLOGMHL\-MCRLDNT\-MZV4RD3\-KA745CL\-OGAERQZ"></device>
  87. <filesystemType>basic</filesystemType>
  88. <minDiskFree unit="%">1</minDiskFree>
  89. <versioning></versioning>
  90. <copiers>0</copiers>
  91. <pullers>0</pullers>
  92. <hashers>0</hashers>
  93. <order>random</order>
  94. <ignoreDelete>false</ignoreDelete>
  95. <scanProgressIntervalS>0</scanProgressIntervalS>
  96. <pullerPauseS>0</pullerPauseS>
  97. <maxConflicts>\-1</maxConflicts>
  98. <disableSparseFiles>false</disableSparseFiles>
  99. <disableTempIndexes>false</disableTempIndexes>
  100. <paused>false</paused>
  101. <weakHashThresholdPct>25</weakHashThresholdPct>
  102. <markerName>.stfolder</markerName>
  103. </folder>
  104. <device id="3LT2GA5\-CQI4XJM\-WTZ264P\-MLOGMHL\-MCRLDNT\-MZV4RD3\-KA745CL\-OGAERQZ" name="syno" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
  105. <address>dynamic</address>
  106. <paused>false</paused>
  107. </device>
  108. <gui enabled="true" tls="false" debugging="false">
  109. <address>127.0.0.1:8384</address>
  110. <apikey>k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1</apikey>
  111. <theme>default</theme>
  112. </gui>
  113. <options>
  114. <listenAddress>default</listenAddress>
  115. <globalAnnounceServer>default</globalAnnounceServer>
  116. <globalAnnounceEnabled>true</globalAnnounceEnabled>
  117. <localAnnounceEnabled>true</localAnnounceEnabled>
  118. <localAnnouncePort>21027</localAnnouncePort>
  119. <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
  120. <maxSendKbps>0</maxSendKbps>
  121. <maxRecvKbps>0</maxRecvKbps>
  122. <reconnectionIntervalS>60</reconnectionIntervalS>
  123. <relaysEnabled>true</relaysEnabled>
  124. <relayReconnectIntervalM>10</relayReconnectIntervalM>
  125. <startBrowser>true</startBrowser>
  126. <natEnabled>true</natEnabled>
  127. <natLeaseMinutes>60</natLeaseMinutes>
  128. <natRenewalMinutes>30</natRenewalMinutes>
  129. <natTimeoutSeconds>10</natTimeoutSeconds>
  130. <urAccepted>0</urAccepted>
  131. <urSeen>0</urSeen>
  132. <urUniqueID>LFWe2vn3</urUniqueID>
  133. <urURL>https://data.syncthing.net/newdata</urURL>
  134. <urPostInsecurely>false</urPostInsecurely>
  135. <urInitialDelayS>1800</urInitialDelayS>
  136. <restartOnWakeup>true</restartOnWakeup>
  137. <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
  138. <upgradeToPreReleases>false</upgradeToPreReleases>
  139. <keepTemporariesH>24</keepTemporariesH>
  140. <cacheIgnoredFiles>false</cacheIgnoredFiles>
  141. <progressUpdateIntervalS>5</progressUpdateIntervalS>
  142. <limitBandwidthInLan>false</limitBandwidthInLan>
  143. <minHomeDiskFree unit="%">1</minHomeDiskFree>
  144. <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
  145. <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
  146. <tempIndexMinBlocks>10</tempIndexMinBlocks>
  147. <trafficClass>0</trafficClass>
  148. <stunServer>default</stunServer>
  149. <stunKeepaliveSeconds>24</stunKeepaliveSeconds>
  150. <defaultFolderPath>~</defaultFolderPath>
  151. <minHomeDiskFreePct>0</minHomeDiskFreePct>
  152. <setLowPriority>true</setLowPriority>
  153. </options>
  154. </configuration>
  155. .ft P
  156. .fi
  157. .UNINDENT
  158. .UNINDENT
  159. .SH CONFIGURATION ELEMENT
  160. .INDENT 0.0
  161. .INDENT 3.5
  162. .sp
  163. .nf
  164. .ft C
  165. <configuration version="26">
  166. <folder></folder>
  167. <device></device>
  168. <gui></gui>
  169. <options></options>
  170. <ignoredDevice>5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU</ignoredDevice>
  171. <ignoredFolder>bd7q3\-zskm5</ignoredFolder>
  172. </configuration>
  173. .ft P
  174. .fi
  175. .UNINDENT
  176. .UNINDENT
  177. .sp
  178. This is the root element. It has one attribute:
  179. .INDENT 0.0
  180. .TP
  181. .B version
  182. The config version. Increments whenever a change is made that requires
  183. migration from previous formats.
  184. .UNINDENT
  185. .sp
  186. It contains the elements described in the following sections and these two
  187. additional child elements:
  188. .INDENT 0.0
  189. .TP
  190. .B ignoredDevice
  191. Contains the ID of the device that should be ignored. Connection attempts
  192. from this device are logged to the console but never displayed in the web
  193. GUI.
  194. .TP
  195. .B ignoredFolder
  196. Contains the ID of the folder that should be ignored. This folder will
  197. always be skipped when advertised from a remote device, i.e. this will be
  198. logged, but there will be no dialog about it in the web GUI.
  199. .UNINDENT
  200. .SH FOLDER ELEMENT
  201. .INDENT 0.0
  202. .INDENT 3.5
  203. .sp
  204. .nf
  205. .ft C
  206. <folder id="zj2AA\-q55a7" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="60" fsWatcherEnabled="false" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
  207. <device id="3LT2GA5\-CQI4XJM\-WTZ264P\-MLOGMHL\-MCRLDNT\-MZV4RD3\-KA745CL\-OGAERQZ"></device>
  208. <filesystemType>basic</filesystemType>
  209. <minDiskFree unit="%">1</minDiskFree>
  210. <versioning></versioning>
  211. <copiers>0</copiers>
  212. <pullers>0</pullers>
  213. <hashers>0</hashers>
  214. <order>random</order>
  215. <ignoreDelete>false</ignoreDelete>
  216. <scanProgressIntervalS>0</scanProgressIntervalS>
  217. <pullerPauseS>0</pullerPauseS>
  218. <maxConflicts>\-1</maxConflicts>
  219. <disableSparseFiles>false</disableSparseFiles>
  220. <disableTempIndexes>false</disableTempIndexes>
  221. <paused>false</paused>
  222. <weakHashThresholdPct>25</weakHashThresholdPct>
  223. <markerName>.stfolder</markerName>
  224. </folder>
  225. .ft P
  226. .fi
  227. .UNINDENT
  228. .UNINDENT
  229. .sp
  230. One or more \fBfolder\fP elements must be present in the file. Each element
  231. describes one folder. The following attributes may be set on the \fBfolder\fP
  232. element:
  233. .INDENT 0.0
  234. .TP
  235. .B id
  236. The folder ID, must be unique. (mandatory)
  237. .TP
  238. .B label
  239. The label of a folder is a human readable and descriptive local name. May
  240. be different on each device, empty, and/or identical to other folder
  241. labels. (optional)
  242. .TP
  243. .B path
  244. The path to the directory where the folder is stored on this
  245. device; not sent to other devices. (mandatory)
  246. .TP
  247. .B type
  248. Controls how the folder is handled by Syncthing. Possible values are:
  249. .INDENT 7.0
  250. .TP
  251. .B sendreceive
  252. The folder is in default mode. Sending local and accepting remote changes.
  253. Note that this type was previously called “readwrite” which is deprecated
  254. but still accepted in incoming configs.
  255. .TP
  256. .B sendonly
  257. The folder is in “send only” mode – it will not be modified by
  258. Syncthing on this device.
  259. Note that this type was previously called “readonly” which is deprecated
  260. but still accepted in incoming configs.
  261. .TP
  262. .B receiveonly
  263. The folder is in “receive only” mode – it will not propagate
  264. changes to other devices.
  265. .UNINDENT
  266. .TP
  267. .B rescanIntervalS
  268. The rescan interval, in seconds. Can be set to zero to disable when external
  269. plugins are used to trigger rescans.
  270. .TP
  271. .B fsWatcherEnabled
  272. If enabled this detects changes to files in the folder and scans them.
  273. .UNINDENT
  274. .INDENT 0.0
  275. .TP
  276. .B fsWatcherDelayS
  277. The duration during which changes detected are accumulated, before a scan is
  278. scheduled (only takes effect if \fBfsWatcherEnabled\fP is true).
  279. .TP
  280. .B ignorePerms
  281. True if the folder should ignore permissions.
  282. .TP
  283. .B autoNormalize
  284. Automatically correct UTF\-8 normalization errors found in file names.
  285. .UNINDENT
  286. .sp
  287. The following child elements may exist:
  288. .INDENT 0.0
  289. .TP
  290. .B device
  291. These must have the \fBid\fP attribute and can have an \fBintroducedBy\fP attribute,
  292. identifying the device that introduced us to share this folder with the given device.
  293. If the original introducer unshares this folder with this device, our device will follow
  294. and unshare the folder (subject to skipIntroductionRemovals being false on the introducer device).
  295. All mentioned devices are those that will be sharing the folder in question.
  296. Each mentioned device must have a separate \fBdevice\fP element later in the file.
  297. It is customary that the local device ID is included in all folders.
  298. Syncthing will currently add this automatically if it is not present in
  299. the configuration file.
  300. .TP
  301. .B minDiskFree
  302. The minimum required free space that should be available on the disk this folder
  303. resides. The folder will be stopped when the value drops below the threshold. Accepted units are
  304. \fB%\fP, \fBkB\fP, \fBMB\fP, \fBGB\fP and \fBTB\fP\&. Set to zero to disable.
  305. .TP
  306. .B versioning
  307. Specifies a versioning configuration.
  308. .UNINDENT
  309. .sp
  310. \fBSEE ALSO:\fP
  311. .INDENT 0.0
  312. .INDENT 3.5
  313. versioning
  314. .UNINDENT
  315. .UNINDENT
  316. .INDENT 0.0
  317. .TP
  318. .B copiers, pullers, hashers
  319. The number of copier, puller and hasher routines to use, or zero for the
  320. system determined optimum. These are low level performance options for
  321. advanced users only; do not change unless requested to or you’ve actually
  322. read and understood the code yourself. :)
  323. .TP
  324. .B order
  325. The order in which needed files should be pulled from the cluster.
  326. The possibles values are:
  327. .INDENT 7.0
  328. .TP
  329. .B random
  330. Pull files in random order. This optimizes for balancing resources among
  331. the devices in a cluster.
  332. .TP
  333. .B alphabetic
  334. Pull files ordered by file name alphabetically.
  335. .TP
  336. .B smallestFirst, largestFirst
  337. Pull files ordered by file size; smallest and largest first respectively.
  338. .TP
  339. .B oldestFirst, newestFirst
  340. Pull files ordered by modification time; oldest and newest first
  341. respectively.
  342. .UNINDENT
  343. .sp
  344. Note that the scanned files are sent in batches and the sorting is applied
  345. only to the already discovered files. This means the sync might start with
  346. a 1 GB file even if there is 1 KB file available on the source device until
  347. the 1 KB becomes known to the pulling device.
  348. .TP
  349. .B ignoreDelete
  350. When set to true, this device will pretend not to see instructions to
  351. delete files from other devices.
  352. .TP
  353. .B scanProgressIntervalS
  354. The interval with which scan progress information is sent to the GUI. Zero
  355. means the default value (two seconds).
  356. .TP
  357. .B pullerPauseS
  358. Tweak for rate limiting the puller when it retries pulling files. Don’t
  359. change these unless you know what you’re doing.
  360. .TP
  361. .B maxConflicts
  362. The maximum number of conflict copies to keep around for any given file.
  363. The default, \-1, means an unlimited number. Setting this to zero disables
  364. conflict copies altogether.
  365. .TP
  366. .B disableSparseFiles
  367. By default, blocks containing all zeroes are not written, causing files
  368. to be sparse on filesystems that support the concept. When set to true,
  369. sparse files will not be created.
  370. .TP
  371. .B disableTempIndexes
  372. By default, devices exchange information about blocks available in
  373. transfers that are still in progress. When set to true, such information
  374. is not exchanged for this folder.
  375. .TP
  376. .B paused
  377. True if this folder is (temporarily) suspended.
  378. .TP
  379. .B weakHashThresholdPct
  380. Use weak hash if more than the given percentage of the file has changed. Set
  381. to \-1 to always use weak hash. Default value is 25.
  382. .TP
  383. .B markerName
  384. Name of a directory or file in the folder root to be used as
  385. marker\-faq\&. Default is “.stfolder”.
  386. .TP
  387. .B fsync
  388. Deprecated since version v0.14.37.
  389. .sp
  390. Transfer updated (from other devices) files to permanent storage before
  391. committing the changes to the internal database.
  392. .TP
  393. .B pullerSleepS
  394. Deprecated since version v0.14.41.
  395. .sp
  396. Tweak for rate limiting the puller. Don’t change these unless you know
  397. what you’re doing.
  398. .UNINDENT
  399. .SH DEVICE ELEMENT
  400. .INDENT 0.0
  401. .INDENT 3.5
  402. .sp
  403. .nf
  404. .ft C
  405. <device id="5SYI2FS\-LW6YAXI\-JJDYETS\-NDBBPIO\-256MWBO\-XDPXWVG\-24QPUM4\-PDW4UQU" name="syno" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="2CYF2WQ\-AKZO2QZ\-JAKWLYD\-AGHMQUM\-BGXUOIS\-GYILW34\-HJG3DUK\-LRRYQAR">
  406. <address>dynamic</address>
  407. </device>
  408. <device id="2CYF2WQ\-AKZO2QZ\-JAKWLYD\-AGHMQUM\-BGXUOIS\-GYILW34\-HJG3DUK\-LRRYQAR" name="syno local" compression="metadata" introducer="false">
  409. <address>tcp://192.0.2.1:22001</address>
  410. <paused>true<paused>
  411. <allowedNetwork>192.168.0.0/16</allowedNetwork>
  412. <autoAcceptFolders>false</autoAcceptFolders>
  413. <maxSendKbps>100</maxSendKbps>
  414. <maxRecvKbps>100</maxRecvKbps>
  415. <maxRequestKiB>65536</maxRequestKiB>
  416. </device>
  417. .ft P
  418. .fi
  419. .UNINDENT
  420. .UNINDENT
  421. .sp
  422. One or more \fBdevice\fP elements must be present in the file. Each element
  423. describes a device participating in the cluster. It is customary to include a
  424. \fBdevice\fP element for the local device; Syncthing will currently add one if
  425. it is not present. The following attributes may be set on the \fBdevice\fP
  426. element:
  427. .INDENT 0.0
  428. .TP
  429. .B id
  430. The device ID. This must be written in canonical form, that is without any
  431. spaces or dashes. (mandatory)
  432. .TP
  433. .B name
  434. A friendly name for the device. (optional)
  435. .TP
  436. .B compression
  437. Whether to use protocol compression when sending messages to this device.
  438. The possible values are:
  439. .INDENT 7.0
  440. .TP
  441. .B metadata
  442. Compress metadata packets, such as index information. Metadata is
  443. usually very compression friendly so this is a good default.
  444. .TP
  445. .B always
  446. Compress all packets, including file data. This is recommended if the
  447. folders contents are mainly compressible data such as documents or
  448. text files.
  449. .TP
  450. .B never
  451. Disable all compression.
  452. .UNINDENT
  453. .TP
  454. .B introducer
  455. Set to true if this device should be trusted as an introducer, i.e. we
  456. should copy their list of devices per folder when connecting.
  457. .UNINDENT
  458. .sp
  459. \fBSEE ALSO:\fP
  460. .INDENT 0.0
  461. .INDENT 3.5
  462. introducer
  463. .UNINDENT
  464. .UNINDENT
  465. .INDENT 0.0
  466. .TP
  467. .B skipIntroductionRemovals
  468. Set to true if you wish to follow only introductions and not de\-introductions.
  469. For example, if this is set, we would not remove a device that we were introduced
  470. to even if the original introducer is no longer listing the remote device as known.
  471. .TP
  472. .B introducedBy
  473. Defines which device has introduced us to this device. Used only for following de\-introductions.
  474. .TP
  475. .B certName
  476. The device certificate common name, if it is not the default “syncthing”.
  477. .UNINDENT
  478. .sp
  479. From following child elements at least one \fBaddress\fP child must exist.
  480. .INDENT 0.0
  481. .TP
  482. .B address
  483. Contains an address or host name to use when attempting to connect to this device.
  484. Entries other than \fBdynamic\fP must be prefixed with \fBtcp://\fP (dual\-stack),
  485. \fBtcp4://\fP (IPv4 only) or \fBtcp6://\fP (IPv6 only). Note that IP addresses need
  486. not use tcp4/tcp6; these are optional. Accepted formats are:
  487. .INDENT 7.0
  488. .TP
  489. .B IPv4 address (\fBtcp://192.0.2.42\fP)
  490. The default port (22000) is used.
  491. .TP
  492. .B IPv4 address and port (\fBtcp://192.0.2.42:12345\fP)
  493. The address and port is used as given.
  494. .TP
  495. .B IPv6 address (\fBtcp://[2001:db8::23:42]\fP)
  496. The default port (22000) is used. The address must be enclosed in
  497. square brackets.
  498. .TP
  499. .B IPv6 address and port (\fBtcp://[2001:db8::23:42]:12345\fP)
  500. The address and port is used as given. The address must be enclosed in
  501. square brackets.
  502. .TP
  503. .B Host name (\fBtcp6://fileserver\fP)
  504. The host name will be used on the default port (22000) and connections
  505. will be attempted only via IPv6.
  506. .TP
  507. .B Host name and port (\fBtcp://fileserver:12345\fP)
  508. The host name will be used on the given port and connections will be
  509. attempted via both IPv4 and IPv6, depending on name resolution.
  510. .TP
  511. .B \fBdynamic\fP
  512. The word \fBdynamic\fP (without \fBtcp://\fP prefix) means to use local and
  513. global discovery to find the device.
  514. .UNINDENT
  515. .sp
  516. You can set multiple addresses \fIand\fP combine it with the \fBdynamic\fP keyword
  517. for example:
  518. .INDENT 7.0
  519. .INDENT 3.5
  520. .sp
  521. .nf
  522. .ft C
  523. <device id="...">
  524. <address>tcp://192.0.2.1:22001</address>
  525. <address>tcp://192.0.1.254:22000</address>
  526. <address>dynamic</address>
  527. </device>
  528. .ft P
  529. .fi
  530. .UNINDENT
  531. .UNINDENT
  532. .TP
  533. .B paused
  534. True if synchronization with this devices is (temporarily) suspended.
  535. .TP
  536. .B allowedNetwork
  537. If given, this restricts connections to this device to only this network
  538. (see allowed\-networks).
  539. .TP
  540. .B maxSendKbps
  541. Maximum send rate to use for this device. Unit is kibibytes/second, despite
  542. the config name looking like kilobits/second.
  543. .TP
  544. .B maxRecvKbps
  545. Maximum receive rate to use for this device. Unit is kibibytes/second,
  546. despite the config name looking like kilobits/second.
  547. .TP
  548. .B maxRequestKiB
  549. Maximum amount of data to have outstanding in requests towards this device.
  550. Unit is kibibytes.
  551. .UNINDENT
  552. .SH GUI ELEMENT
  553. .INDENT 0.0
  554. .INDENT 3.5
  555. .sp
  556. .nf
  557. .ft C
  558. <gui enabled="true" tls="false" debugging="false">
  559. <address>127.0.0.1:8384</address>
  560. <apikey>l7jSbCqPD95JYZ0g8vi4ZLAMg3ulnN1b</apikey>
  561. <theme>default</theme>
  562. </gui>
  563. .ft P
  564. .fi
  565. .UNINDENT
  566. .UNINDENT
  567. .sp
  568. There must be exactly one \fBgui\fP element. The GUI configuration is also used
  569. by the rest\-api and the event\-api\&. The following attributes may
  570. be set on the \fBgui\fP element:
  571. .INDENT 0.0
  572. .TP
  573. .B enabled
  574. If not \fBtrue\fP, the GUI and API will not be started.
  575. .TP
  576. .B tls
  577. If set to \fBtrue\fP, TLS (HTTPS) will be enforced. Non\-HTTPS requests will
  578. be redirected to HTTPS. When this is set to \fBfalse\fP, TLS connections are
  579. still possible but it is not mandatory.
  580. .TP
  581. .B debugging
  582. This enables profiling and additional debugging endpoints in the rest\-api\&.
  583. .UNINDENT
  584. .sp
  585. The following child elements may be present:
  586. .INDENT 0.0
  587. .TP
  588. .B address
  589. Set the listen address. One address element must be present. Allowed address formats are:
  590. .INDENT 7.0
  591. .TP
  592. .B IPv4 address and port (\fB127.0.0.1:8384\fP)
  593. The address and port is used as given.
  594. .TP
  595. .B IPv6 address and port (\fB[::1]:8384\fP)
  596. The address and port is used as given. The address must be enclosed in
  597. square brackets.
  598. .TP
  599. .B Wildcard and port (\fB0.0.0.0:12345\fP, \fB[::]:12345\fP, \fB:12345\fP)
  600. These are equivalent and will result in Syncthing listening on all
  601. interfaces via both IPv4 and IPv6.
  602. .TP
  603. .B UNIX socket location (\fB/var/run/st.sock\fP)
  604. If the address is an absolute path it is interpreted as the path to a UNIX socket.
  605. (Added in v0.14.52.)
  606. .UNINDENT
  607. .TP
  608. .B unixSocketPermissions
  609. In the case that a UNIX socket location is used for \fBaddress\fP, set this to an octal to override the default permissions of the socket.
  610. .TP
  611. .B user
  612. Set to require authentication.
  613. .TP
  614. .B password
  615. Contains the bcrypt hash of the real password.
  616. .TP
  617. .B apikey
  618. If set, this is the API key that enables usage of the REST interface.
  619. .TP
  620. .B insecureAdminAccess
  621. If true, this allows access to the web GUI from outside (i.e. not localhost)
  622. without authorization. A warning will displayed about this setting on startup.
  623. .TP
  624. .B theme
  625. The name of the theme to use.
  626. .TP
  627. .B authMode
  628. Authentication mode to use. If not present authentication mode (static)
  629. is controlled by presence of user/passward fields for backward compatibility.
  630. .INDENT 7.0
  631. .TP
  632. .B static
  633. Authentication using user and password.
  634. .TP
  635. .B ldap
  636. LDAP authentication. Requires ldap top level config section to be present.
  637. .UNINDENT
  638. .UNINDENT
  639. .SH LDAP ELEMENT
  640. .INDENT 0.0
  641. .INDENT 3.5
  642. .sp
  643. .nf
  644. .ft C
  645. <ldap>
  646. <address>localhost:389</address>
  647. <bindDN>cn=%s,ou=users,dc=syncthing,dc=net</bindDN>
  648. <transport>nontls</transport>
  649. <insecureSkipVerify>false</insecureSkipVerify>
  650. </ldap>
  651. .ft P
  652. .fi
  653. .UNINDENT
  654. .UNINDENT
  655. .sp
  656. The \fBldap\fP element contains LDAP configuration options.
  657. .INDENT 0.0
  658. .TP
  659. .B address
  660. LDAP server address (server:port).
  661. .TP
  662. .B bindDN
  663. BindDN for user authentication.
  664. Special %s variable shoild be used to pass username to LDAP.
  665. .UNINDENT
  666. .sp
  667. transport
  668. .INDENT 0.0
  669. .INDENT 3.5
  670. .INDENT 0.0
  671. .TP
  672. .B nontls
  673. Non secure connection.
  674. .TP
  675. .B tls
  676. TLS secured connection.
  677. .TP
  678. .B starttls
  679. StartTLS connection mode.
  680. .UNINDENT
  681. .UNINDENT
  682. .UNINDENT
  683. .INDENT 0.0
  684. .TP
  685. .B insecureSkipVerify
  686. Skip verification (true or false).
  687. .UNINDENT
  688. .SH OPTIONS ELEMENT
  689. .INDENT 0.0
  690. .INDENT 3.5
  691. .sp
  692. .nf
  693. .ft C
  694. <options>
  695. <listenAddress>default</listenAddress>
  696. <globalAnnounceServer>default</globalAnnounceServer>
  697. <globalAnnounceEnabled>true</globalAnnounceEnabled>
  698. <localAnnounceEnabled>true</localAnnounceEnabled>
  699. <localAnnouncePort>21027</localAnnouncePort>
  700. <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
  701. <maxSendKbps>0</maxSendKbps>
  702. <maxRecvKbps>0</maxRecvKbps>
  703. <reconnectionIntervalS>60</reconnectionIntervalS>
  704. <relaysEnabled>true</relaysEnabled>
  705. <relayReconnectIntervalM>10</relayReconnectIntervalM>
  706. <startBrowser>true</startBrowser>
  707. <natEnabled>true</natEnabled>
  708. <natLeaseMinutes>60</natLeaseMinutes>
  709. <natRenewalMinutes>30</natRenewalMinutes>
  710. <natTimeoutSeconds>10</natTimeoutSeconds>
  711. <urAccepted>0</urAccepted>
  712. <urUniqueID></urUniqueID>
  713. <urURL>https://data.syncthing.net/newdata</urURL>
  714. <urPostInsecurely>false</urPostInsecurely>
  715. <urInitialDelayS>1800</urInitialDelayS>
  716. <restartOnWakeup>true</restartOnWakeup>
  717. <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
  718. <keepTemporariesH>24</keepTemporariesH>
  719. <cacheIgnoredFiles>false</cacheIgnoredFiles>
  720. <progressUpdateIntervalS>5</progressUpdateIntervalS>
  721. <limitBandwidthInLan>false</limitBandwidthInLan>
  722. <minHomeDiskFree unit="%">1</minHomeDiskFree>
  723. <releasesURL>https://api.github.com/repos/syncthing/syncthing/releases?per_page=30</releasesURL>
  724. <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
  725. <tempIndexMinBlocks>10</tempIndexMinBlocks>
  726. <defaultFolderPath>~</defaultFolderPath>
  727. </options>
  728. .ft P
  729. .fi
  730. .UNINDENT
  731. .UNINDENT
  732. .sp
  733. The \fBoptions\fP element contains all other global configuration options.
  734. .INDENT 0.0
  735. .TP
  736. .B listenAddress
  737. The listen address for incoming sync connections. See
  738. \fI\%Listen Addresses\fP for allowed syntax.
  739. .TP
  740. .B globalAnnounceServer
  741. A URI to a global announce (discovery) server, or the word \fBdefault\fP to
  742. include the default servers. Any number of globalAnnounceServer elements
  743. may be present. The syntax for non\-default entries is that of a HTTP or
  744. HTTPS URL. A number of options may be added as query options to the URL:
  745. \fBinsecure\fP to prevent certificate validation (required for HTTP URLs)
  746. and \fBid=<device ID>\fP to perform certificate pinning. The device ID to
  747. use is printed by the discovery server on startup.
  748. .TP
  749. .B globalAnnounceEnabled
  750. Whether to announce this device to the global announce (discovery) server,
  751. and also use it to look up other devices.
  752. .TP
  753. .B localAnnounceEnabled
  754. Whether to send announcements to the local LAN, also use such
  755. announcements to find other devices.
  756. .TP
  757. .B localAnnouncePort
  758. The port on which to listen and send IPv4 broadcast announcements to.
  759. .TP
  760. .B localAnnounceMCAddr
  761. The group address and port to join and send IPv6 multicast announcements on.
  762. .TP
  763. .B maxSendKbps
  764. Outgoing data rate limit, in kibibytes per second.
  765. .TP
  766. .B maxRecvKbps
  767. Incoming data rate limits, in kibibytes per second.
  768. .TP
  769. .B reconnectionIntervalS
  770. The number of seconds to wait between each attempt to connect to currently
  771. unconnected devices.
  772. .TP
  773. .B relaysEnabled
  774. When true, relays will be connected to and potentially used for device to device connections.
  775. .TP
  776. .B relayReconnectIntervalM
  777. Sets the interval, in minutes, between relay reconnect attempts.
  778. .TP
  779. .B startBrowser
  780. Whether to attempt to start a browser to show the GUI when Syncthing starts.
  781. .TP
  782. .B natEnabled
  783. Whether to attempt to perform a UPnP and NAT\-PMP port mapping for
  784. incoming sync connections.
  785. .TP
  786. .B natLeaseMinutes
  787. Request a lease for this many minutes; zero to request a permanent lease.
  788. .TP
  789. .B natRenewalMinutes
  790. Attempt to renew the lease after this many minutes.
  791. .TP
  792. .B natTimeoutSeconds
  793. When scanning for UPnP devices, wait this long for responses.
  794. .TP
  795. .B urAccepted
  796. Whether the user has accepted to submit anonymous usage data. The default,
  797. \fB0\fP, mean the user has not made a choice, and Syncthing will ask at some
  798. point in the future. \fB\-1\fP means no, a number above zero means that that
  799. version of usage reporting has been accepted.
  800. .TP
  801. .B urSeen
  802. The highest usage reporting version that has already been shown in the web GUI.
  803. .TP
  804. .B urUniqueID
  805. The unique ID sent together with the usage report. Generated when usage
  806. reporting is enabled.
  807. .TP
  808. .B urURL
  809. The URL to post usage report data to, when enabled.
  810. .TP
  811. .B urPostInsecurely
  812. When true, the UR URL can be http instead of https, or have a self\-signed
  813. certificate. The default is \fBfalse\fP\&.
  814. .TP
  815. .B urInitialDelayS
  816. The time to wait from startup to the first usage report being sent. Allows
  817. the system to stabilize before reporting statistics.
  818. .TP
  819. .B restartOnWakeup
  820. Whether to perform a restart of Syncthing when it is detected that we are
  821. waking from sleep mode (i.e. a folded up laptop).
  822. .TP
  823. .B autoUpgradeIntervalH
  824. Check for a newer version after this many hours. Set to zero to disable
  825. automatic upgrades.
  826. .TP
  827. .B upgradeToPreReleases
  828. If true, automatic upgrades include release candidates (see
  829. release\-channels).
  830. .TP
  831. .B keepTemporariesH
  832. Keep temporary failed transfers for this many hours. While the temporaries
  833. are kept, the data they contain need not be transferred again.
  834. .TP
  835. .B cacheIgnoredFiles
  836. Whether to cache the results of ignore pattern evaluation. Performance
  837. at the price of memory. Defaults to \fBfalse\fP as the cost for evaluating
  838. ignores is usually not significant.
  839. .TP
  840. .B progressUpdateIntervalS
  841. How often in seconds the progress of ongoing downloads is made available to
  842. the GUI.
  843. .TP
  844. .B limitBandwidthInLan
  845. Whether to apply bandwidth limits to devices in the same broadcast domain
  846. as the local device.
  847. .TP
  848. .B minHomeDiskFree
  849. The minimum required free space that should be available on the
  850. partition holding the configuration and index. Accepted units are \fB%\fP, \fBkB\fP,
  851. \fBMB\fP, \fBGB\fP and \fBTB\fP\&.
  852. .TP
  853. .B releasesURL
  854. The URL from which release information is loaded, for automatic upgrades.
  855. .TP
  856. .B alwaysLocalNet
  857. Network that should be considered as local given in CIDR notation.
  858. .TP
  859. .B overwriteRemoteDeviceNamesOnConnect
  860. If set, device names will always be overwritten with the name given by
  861. remote on each connection. By default, the name that the remote device
  862. announces will only be adopted when a name has not already been set.
  863. .TP
  864. .B tempIndexMinBlocks
  865. When exchanging index information for incomplete transfers, only take
  866. into account files that have at least this many blocks.
  867. .TP
  868. .B unackedNotificationID
  869. ID of a notification to be displayed in the web GUI. Will be removed once
  870. the user acknowledged it (e.g. an transition notice on an upgrade).
  871. .TP
  872. .B trafficClass
  873. Specify a type of service (TOS)/traffic class of outgoing packets.
  874. .TP
  875. .B stunServer
  876. Server to be used for STUN, given as ip:port. The keyword \fBdefault\fP gets
  877. expanded to
  878. \fBstun.callwithus.com:3478\fP, \fBstun.counterpath.com:3478\fP,
  879. \fBstun.counterpath.net:3478\fP, \fBstun.ekiga.net:3478\fP,
  880. \fBstun.ideasip.com:3478\fP, \fBstun.internetcalls.com:3478\fP,
  881. \fBstun.schlund.de:3478\fP, \fBstun.sipgate.net:10000\fP,
  882. \fBstun.sipgate.net:3478\fP, \fBstun.voip.aebc.com:3478\fP,
  883. \fBstun.voiparound.com:3478\fP, \fBstun.voipbuster.com:3478\fP,
  884. \fBstun.voipstunt.com:3478\fP and \fBstun.xten.com:3478\fP (this is the default).
  885. .TP
  886. .B stunKeepaliveSeconds
  887. Interval in seconds between contacting a STUN server to
  888. maintain NAT mapping. Default is \fB24\fP and you can set it to \fB0\fP to
  889. disable contacting STUN servers.
  890. .TP
  891. .B defaultFolderPath
  892. The UI will propose to create new folders at this path. This can be disabled by
  893. setting this to an empty string.
  894. .UNINDENT
  895. .INDENT 0.0
  896. .TP
  897. .B setLowPriority
  898. Syncthing will attempt to lower its process priority at startup.
  899. Specifically: on Linux, set itself to a separate process group, set the
  900. niceness level of that process group to nine and the I/O priority to
  901. best effort level five; on other Unixes, set the process niceness level
  902. to nine; on Windows, set the process priority class to below normal. To
  903. disable this behavior, for example to control process priority yourself
  904. as part of launching Syncthing, set this option to \fBfalse\fP\&.
  905. .UNINDENT
  906. .SS Listen Addresses
  907. .sp
  908. The following address types are accepted in sync protocol listen addresses. If you want Syncthing to listen on multiple addresses, you can have multiple \fB<listenAddress>\fP tags. The same is achieved in the GUI by entering several addresses separated by comma.
  909. .INDENT 0.0
  910. .TP
  911. .B Default listen addresses (\fBdefault\fP)
  912. This is equivalent to \fBtcp://0.0.0.0:22000\fP, \fBquic://0.0.0.0:22000\fP
  913. and \fBdynamic+https://relays.syncthing.net/endpoint\fP\&.
  914. .TP
  915. .B TCP wildcard and port (\fBtcp://0.0.0.0:22000\fP, \fBtcp://:22000\fP)
  916. These are equivalent and will result in Syncthing listening on all
  917. interfaces, IPv4 and IPv6, on the specified port.
  918. .TP
  919. .B TCP IPv4 wildcard and port (\fBtcp4://0.0.0.0:22000\fP, \fBtcp4://:22000\fP)
  920. These are equivalent and will result in Syncthing listening on all
  921. interfaces via IPv4 only.
  922. .TP
  923. .B TCP IPv4 address and port (\fBtcp4://192.0.2.1:22000\fP)
  924. This results in Syncthing listening on the specified address and port, IPv4
  925. only.
  926. .TP
  927. .B TCP IPv6 wildcard and port (\fBtcp6://[::]:22000\fP, \fBtcp6://:22000\fP)
  928. These are equivalent and will result in Syncthing listening on all
  929. interfaces via IPv6 only.
  930. .TP
  931. .B TCP IPv6 address and port (\fBtcp6://[2001:db8::42]:22000\fP)
  932. This results in Syncthing listening on the specified address and port, IPv6
  933. only.
  934. .TP
  935. .B QUIC address and port (e.g. \fBquic://0.0.0.0:22000\fP)
  936. Syntax is the same as for TCP, also \fBquic4\fP and \fBquic6\fP can be used.
  937. .TP
  938. .B Static relay address (\fBrelay://192.0.2.42:22067?id=abcd123...\fP)
  939. Syncthing will connect to and listen for incoming connections via the
  940. specified relay address.
  941. .INDENT 7.0
  942. .INDENT 3.5
  943. .SS Todo
  944. .sp
  945. Document available URL parameters.
  946. .UNINDENT
  947. .UNINDENT
  948. .TP
  949. .B Dynamic relay pool (\fBdynamic+https://192.0.2.42/relays\fP)
  950. Syncthing will fetch the specified HTTPS URL, parse it for a JSON payload
  951. describing relays, select a relay from the available ones and listen via
  952. that as if specified as a static relay above.
  953. .INDENT 7.0
  954. .INDENT 3.5
  955. .SS Todo
  956. .sp
  957. Document available URL parameters.
  958. .UNINDENT
  959. .UNINDENT
  960. .UNINDENT
  961. .SH SYNCING CONFIGURATION FILES
  962. .sp
  963. Syncing configuration files between devices (such that multiple devices are
  964. using the same configuration files) can cause issues. This is easy to do
  965. accidentally if you sync your home folder between devices. A common symptom
  966. of syncing configuration files is two devices ending up with the same Device ID.
  967. .sp
  968. If you want to use Syncthing to backup your configuration files, it is recommended
  969. that the files you are backing up are in a folder\-sendonly to prevent other
  970. devices from overwriting the per device configuration. The folder on the remote
  971. device(s) should not be used as configuration for the remote devices.
  972. .sp
  973. If you’d like to sync your home folder in non\-send only mode, you may add the
  974. folder that stores the configuration files to the ignore list\&.
  975. If you’d also like to backup your configuration files, add another folder in
  976. send only mode for just the configuration folder.
  977. .SH AUTHOR
  978. The Syncthing Authors
  979. .SH COPYRIGHT
  980. 2014-2019, The Syncthing Authors
  981. .\" Generated by docutils manpage writer.
  982. .