1SYNCTHING-CONFIG(5)                Syncthing               SYNCTHING-CONFIG(5)
2
3
4

NAME

6       syncthing-config - Syncthing Configuration
7

SYNOPSIS

9          $HOME/.config/syncthing
10          $HOME/Library/Application Support/Syncthing
11          %LOCALAPPDATA%\Syncthing
12

DESCRIPTION

14       New  in  version  1.5.0: Database and config can now be set separately.
15       Previously the database was always located in the same directory as the
16       config.
17
18
19       Syncthing  uses  a  single  directory to store configuration and crypto
20       keys.  Syncthing also has a database, which is  often  stored  in  this
21       directory too.  The config location defaults to $HOME/.config/syncthing
22       (Unix-like),  $HOME/Library/Application  Support/Syncthing  (Mac),   or
23       %LOCALAPPDATA%\Syncthing  (Windows). It can be changed at runtime using
24       the -config flag. In this directory the following files are located:
25
26       config.xml
27              The configuration file, in XML format.
28
29       cert.pem, key.pem
30              The device’s ECDSA public and private key. These form the  basis
31              for the device ID. The key must be kept private.
32
33       https-cert.pem, https-key.pem
34              The  certificate and key for HTTPS GUI connections. These may be
35              replaced with a custom certificate for HTTPS as desired.
36
37       csrftokens.txt
38              A list of recently issued CSRF tokens  (for  protection  against
39              browser cross site request forgery).
40
41       The database is stored either in the same directory as the config (usu‐
42       ally the default), but may also be located  in  one  of  the  following
43       directories (Unix-like platforms only):
44
45       · If  a  database  exists in the old default location, that location is
46         still used.
47
48       · If $XDG_DATA_HOME is set, use $XDG_DATA_HOME/syncthing.
49
50       · If ~/.local/share/syncthing exists, use that location.
51
52       · Use the old default location (same as config).
53
54       The location of the database can be changed using the -data  flag.  The
55       -home  flag  sets  both config and database locations at the same time.
56       The database contains the following files:
57
58       index-*.db
59              A directory holding the database with metadata and hashes of the
60              files currently on disk and available from peers.
61

CONFIG FILE FORMAT

63       The  following  shows an example of the default configuration file (IDs
64       will differ):
65
66          <configuration version="30">
67              <folder id="default" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
68                  <filesystemType>basic</filesystemType>
69                  <device id="3LT2GA5-CQI4XJM-WTZ264P-MLOGMHL-MCRLDNT-MZV4RD3-KA745CL-OGAERQZ"></device>
70                  <minDiskFree unit="%">1</minDiskFree>
71                  <versioning></versioning>
72                  <copiers>0</copiers>
73                  <pullerMaxPendingKiB>0</pullerMaxPendingKiB>
74                  <hashers>0</hashers>
75                  <order>random</order>
76                  <ignoreDelete>false</ignoreDelete>
77                  <scanProgressIntervalS>0</scanProgressIntervalS>
78                  <pullerPauseS>0</pullerPauseS>
79                  <maxConflicts>-1</maxConflicts>
80                  <disableSparseFiles>false</disableSparseFiles>
81                  <disableTempIndexes>false</disableTempIndexes>
82                  <paused>false</paused>
83                  <weakHashThresholdPct>25</weakHashThresholdPct>
84                  <markerName>.stfolder</markerName>
85                  <copyOwnershipFromParent>false</copyOwnershipFromParent>
86                  <modTimeWindowS>0</modTimeWindowS>
87                  <maxConcurrentWrites>2</maxConcurrentWrites>
88                  <disableFsync>false</disableFsync>
89                  <blockPullOrder>standard</blockPullOrder>
90                  <copyRangeMethod>standard</copyRangeMethod>
91              </folder>
92              <device id="3LT2GA5-CQI4XJM-WTZ264P-MLOGMHL-MCRLDNT-MZV4RD3-KA745CL-OGAERQZ" name="syno" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
93                  <address>dynamic</address>
94                  <paused>false</paused>
95                  <autoAcceptFolders>false</autoAcceptFolders>
96                  <maxSendKbps>0</maxSendKbps>
97                  <maxRecvKbps>0</maxRecvKbps>
98                  <maxRequestKiB>0</maxRequestKiB>
99                  <remoteGUIPort>0</remoteGUIPort>
100              </device>
101              <gui enabled="true" tls="false" debugging="false">
102                  <address>127.0.0.1:8384</address>
103                  <apikey>k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1</apikey>
104                  <theme>default</theme>
105              </gui>
106              <ldap></ldap>
107              <options>
108                  <listenAddress>tcp://0.0.0.0:8384</listenAddress>
109                  <listenAddress>dynamic+https://relays.syncthing.net/endpoint</listenAddress>
110                  <globalAnnounceServer>default</globalAnnounceServer>
111                  <globalAnnounceEnabled>true</globalAnnounceEnabled>
112                  <localAnnounceEnabled>true</localAnnounceEnabled>
113                  <localAnnouncePort>21027</localAnnouncePort>
114                  <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
115                  <maxSendKbps>0</maxSendKbps>
116                  <maxRecvKbps>0</maxRecvKbps>
117                  <reconnectionIntervalS>60</reconnectionIntervalS>
118                  <relaysEnabled>true</relaysEnabled>
119                  <relayReconnectIntervalM>10</relayReconnectIntervalM>
120                  <startBrowser>true</startBrowser>
121                  <natEnabled>true</natEnabled>
122                  <natLeaseMinutes>60</natLeaseMinutes>
123                  <natRenewalMinutes>30</natRenewalMinutes>
124                  <natTimeoutSeconds>10</natTimeoutSeconds>
125                  <urAccepted>0</urAccepted>
126                  <urSeen>0</urSeen>
127                  <urUniqueID></urUniqueID>
128                  <urURL>https://data.syncthing.net/newdata</urURL>
129                  <urPostInsecurely>false</urPostInsecurely>
130                  <urInitialDelayS>1800</urInitialDelayS>
131                  <restartOnWakeup>true</restartOnWakeup>
132                  <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
133                  <upgradeToPreReleases>false</upgradeToPreReleases>
134                  <keepTemporariesH>24</keepTemporariesH>
135                  <cacheIgnoredFiles>false</cacheIgnoredFiles>
136                  <progressUpdateIntervalS>5</progressUpdateIntervalS>
137                  <limitBandwidthInLan>false</limitBandwidthInLan>
138                  <minHomeDiskFree unit="%">1</minHomeDiskFree>
139                  <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
140                  <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
141                  <tempIndexMinBlocks>10</tempIndexMinBlocks>
142                  <trafficClass>0</trafficClass>
143                  <defaultFolderPath>~</defaultFolderPath>
144                  <setLowPriority>true</setLowPriority>
145                  <maxFolderConcurrency>0</maxFolderConcurrency>
146                  <crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
147                  <crashReportingEnabled>true</crashReportingEnabled>
148                  <stunKeepaliveStartS>180</stunKeepaliveStartS>
149                  <stunKeepaliveMinS>20</stunKeepaliveMinS>
150                  <stunServer>default</stunServer>
151                  <databaseTuning>auto</databaseTuning>
152                  <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
153              </options>
154          </configuration>
155

CONFIGURATION ELEMENT

157          <configuration version="30">
158              <folder></folder>
159              <device></device>
160              <gui></gui>
161              <ldap></ldap>
162              <options></options>
163              <ignoredDevice>5SYI2FS-LW6YAXI-JJDYETS-NDBBPIO-256MWBO-XDPXWVG-24QPUM4-PDW4UQU</ignoredDevice>
164              <ignoredFolder>bd7q3-zskm5</ignoredFolder>
165          </configuration>
166
167       This is the root element. It has one attribute:
168
169       version
170              The config version. Increments whenever a change  is  made  that
171              requires migration from previous formats.
172
173       It  contains the elements described in the following sections and these
174       two additional child elements:
175
176       ignoredDevice
177              Contains the ID of the device that should be ignored. Connection
178              attempts  from  this  device are logged to the console but never
179              displayed in the web GUI.
180
181       ignoredFolder
182              Contains the ID of the  folder  that  should  be  ignored.  This
183              folder  will  always  be  skipped  when advertised from a remote
184              device, i.e. this will be logged, but there will  be  no  dialog
185              about it in the web GUI.
186

FOLDER ELEMENT

188          <folder id="default" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
189              <filesystemType>basic</filesystemType>
190              <device id="3LT2GA5-CQI4XJM-WTZ264P-MLOGMHL-MCRLDNT-MZV4RD3-KA745CL-OGAERQZ"></device>
191              <minDiskFree unit="%">1</minDiskFree>
192              <versioning></versioning>
193              <copiers>0</copiers>
194              <pullerMaxPendingKiB>0</pullerMaxPendingKiB>
195              <hashers>0</hashers>
196              <order>random</order>
197              <ignoreDelete>false</ignoreDelete>
198              <scanProgressIntervalS>0</scanProgressIntervalS>
199              <pullerPauseS>0</pullerPauseS>
200              <maxConflicts>-1</maxConflicts>
201              <disableSparseFiles>false</disableSparseFiles>
202              <disableTempIndexes>false</disableTempIndexes>
203              <paused>false</paused>
204              <weakHashThresholdPct>25</weakHashThresholdPct>
205              <markerName>.stfolder</markerName>
206              <copyOwnershipFromParent>false</copyOwnershipFromParent>
207              <modTimeWindowS>0</modTimeWindowS>
208              <maxConcurrentWrites>2</maxConcurrentWrites>
209              <disableFsync>false</disableFsync>
210              <blockPullOrder>standard</blockPullOrder>
211              <copyRangeMethod>standard</copyRangeMethod>
212          </folder>
213
214       One  or  more folder elements must be present in the file. Each element
215       describes one folder. The following attributes may be set on the folder
216       element:
217
218       id     The folder ID, must be unique. (mandatory)
219
220       label  The  label of a folder is a human readable and descriptive local
221              name. May be different on each device, empty,  and/or  identical
222              to other folder labels. (optional)
223
224       path   The  path  to  the  directory where the folder is stored on this
225              device; not sent to other devices. (mandatory)
226
227       type   Controls how the folder is handled by Syncthing. Possible values
228              are:
229
230              sendreceive
231                     The  folder is in default mode. Sending local and accept‐
232                     ing remote changes.  Note that this type  was  previously
233                     called “readwrite” which is deprecated but still accepted
234                     in incoming configs.
235
236              sendonly
237                     The folder is in “send only” mode – it will not be  modi‐
238                     fied  by  Syncthing  on this device.  Note that this type
239                     was previously called “readonly” which is deprecated  but
240                     still accepted in incoming configs.
241
242              receiveonly
243                     The folder is in “receive only” mode – it will not propa‐
244                     gate changes to other devices.
245
246       rescanIntervalS
247              The rescan interval, in seconds. Can be set to zero  to  disable
248              when external plugins are used to trigger rescans.
249
250       fsWatcherEnabled
251              If enabled this detects changes to files in the folder and scans
252              them.
253
254       fsWatcherDelayS
255              The duration during  which  changes  detected  are  accumulated,
256              before  a  scan  is scheduled (only takes effect if fsWatcherEn‐
257              abled is true).
258
259       ignorePerms
260              True if the folder should ignore permissions.
261
262       autoNormalize
263              Automatically correct UTF-8 normalization errors found  in  file
264              names.
265
266       The following child elements may exist:
267
268       device These  must  have  the id attribute and can have an introducedBy
269              attribute, identifying the device that introduced  us  to  share
270              this  folder  with the given device.  If the original introducer
271              unshares this folder with this device, our  device  will  follow
272              and  unshare  the  folder  (subject  to skipIntroductionRemovals
273              being false on the introducer device).   All  mentioned  devices
274              are  those  that  will  be sharing the folder in question.  Each
275              mentioned device must have a separate device  element  later  in
276              the  file.  It is customary that the local device ID is included
277              in all folders.  Syncthing will currently add this automatically
278              if it is not present in the configuration file.
279
280       minDiskFree
281              The  minimum required free space that should be available on the
282              disk this folder resides. The folder will be  stopped  when  the
283              value  drops  below the threshold. Accepted units are %, kB, MB,
284              GB and TB. Set to zero to disable.
285
286       versioning
287              Specifies a versioning configuration.
288
289       SEE ALSO:
290          versioning
291
292       copiers, pullers, hashers
293              The number of copier, puller and hasher routines to use, or zero
294              for  the  system determined optimum. These are low level perfor‐
295              mance options for advanced users  only;  do  not  change  unless
296              requested  to  or  you’ve  actually read and understood the code
297              yourself. :)
298
299       order  The order in which needed files should be pulled from the  clus‐
300              ter.  The possibles values are:
301
302              random Pull  files in random order. This optimizes for balancing
303                     resources among the devices in a cluster.
304
305              alphabetic
306                     Pull files ordered by file name alphabetically.
307
308              smallestFirst, largestFirst
309                     Pull files ordered by file  size;  smallest  and  largest
310                     first respectively.
311
312              oldestFirst, newestFirst
313                     Pull  files ordered by modification time; oldest and new‐
314                     est first respectively.
315
316              Note that the scanned files are sent in batches and the  sorting
317              is  applied only to the already discovered files. This means the
318              sync might start with a 1 GB file even if there  is  1  KB  file
319              available  on  the source device until the 1 KB becomes known to
320              the pulling device.
321
322       ignoreDelete
323              WARNING:
324                 Enabling this is highly not recommended -  use  at  your  own
325                 risk.
326
327              When  set  to true, this device will pretend not to see instruc‐
328              tions to delete files from other devices.
329
330       scanProgressIntervalS
331              The interval with which scan progress information is sent to the
332              GUI. Zero means the default value (two seconds).
333
334       pullerPauseS
335              Tweak  for  rate  limiting  the  puller  when it retries pulling
336              files. Don’t change these unless you know what you’re doing.
337
338       maxConflicts
339              The maximum number of conflict copies to  keep  around  for  any
340              given file.  The default, -1, means an unlimited number. Setting
341              this to zero disables conflict copies altogether.
342
343       disableSparseFiles
344              By default, blocks containing all zeroes are not written,  caus‐
345              ing  files to be sparse on filesystems that support the concept.
346              When set to true, sparse files will not be created.
347
348       disableTempIndexes
349              By default, devices exchange information about blocks  available
350              in  transfers  that  are  still  in progress, which allows other
351              devices to download parts of files that are not yet fully  down‐
352              loaded  on  your  own  device, essentially making transfers more
353              torrent  like.  When  set  to  true,  such  information  is  not
354              exchanged for this folder.
355
356       paused True if this folder is (temporarily) suspended.
357
358       weakHashThresholdPct
359              Use  weak hash if more than the given percentage of the file has
360              changed. Set to -1 to always use weak hash. Default value is 25.
361
362       markerName
363              Name of a directory or file in the folder root  to  be  used  as
364              marker-faq. Default is “.stfolder”.
365
366       copyOwnershipFromParent
367              On  Unix  systems,  tries to copy file/folder ownership from the
368              parent directory (the directory it’s located in).  Requires run‐
369              ning  Syncthing  as  privileged  user, or granting it additional
370              capabilities (e.g. CAP_CHOWN on Linux).
371
372       modTimeWindowS
373              Allowed modification timestamp difference when  comparing  files
374              for  equivalence. To be used on file systems which have unstable
375              modification timestamps that might change after  being  recorded
376              during  the  last write operation. Defaults to 2 on Android when
377              the folder is located on a FAT partition, and always to 0  else‐
378              where.
379
380       maxConcurrentWrites
381              Maximum  number  of  concurrent  write operations while syncing.
382              Defaults to 2. Increasing this might increase or  decrease  disk
383              performance, depending on the underlying storage.
384
385       disableFsync
386
387          WARNING:
388              This is a known insecure option - use at your own risk.
389
390          Disables committing file operations to disk before recording them in
391          the database.  Disabling fsync can lead to data corruption.
392
393       blockPullOrder
394              Order in which the blocks of a file are downloaded. This  option
395              controls  how quickly different parts of the file spread between
396              the connected devices, at the cost  of  causing  strain  on  the
397              storage.
398
399              Available options:
400
401              standard (default):
402                     The  blocks  of  a file are split into N equal continuous
403                     sequences, where N is the number  of  connected  devices.
404                     Each  device  starts downloading it’s own sequence, after
405                     which it picks other devices sequences  at  random.  Pro‐
406                     vides  acceptable  data distribution and minimal spinning
407                     disk strain.
408
409              random:
410                     The blocks of a file are downloaded in  a  random  order.
411                     Provides  great  data  distribution,  but  very taxing on
412                     spinning disk drives.
413
414              inOrder:
415                     The blocks of a file are  downloaded  sequentially,  from
416                     start  to  finish. Spinning disk drive friendly, but pro‐
417                     vides no improvements to data distribution.
418
419       copyRangeMethod
420              Provides a choice of method for copying data between files. This
421              can  be  used to optimise copies on network filesystems, improve
422              speed of large copies or  clone  the  data  using  copy-on-write
423              functionality if the underlying filesystem supports it.
424
425              See folder-copyRangeMethod for details.
426

DEVICE ELEMENT

428          <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">
429              <address>dynamic</address>
430              <paused>false</paused>
431              <autoAcceptFolders>false</autoAcceptFolders>
432              <maxSendKbps>0</maxSendKbps>
433              <maxRecvKbps>0</maxRecvKbps>
434              <maxRequestKiB>0</maxRequestKiB>
435              <remoteGUIPort>0</remoteGUIPort>
436          </device>
437          <device id="2CYF2WQ-AKZO2QZ-JAKWLYD-AGHMQUM-BGXUOIS-GYILW34-HJG3DUK-LRRYQAR" name="syno local" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
438              <address>tcp://192.0.2.1:22001</address>
439              <paused>true</paused>
440              <allowedNetwork>192.168.0.0/16</allowedNetwork>
441              <autoAcceptFolders>false</autoAcceptFolders>
442              <maxSendKbps>100</maxSendKbps>
443              <maxRecvKbps>100</maxRecvKbps>
444              <maxRequestKiB>65536</maxRequestKiB>
445              <remoteGUIPort>8384</remoteGUIPort>
446          </device>
447
448       One  or  more device elements must be present in the file. Each element
449       describes a device participating in the cluster.  It  is  customary  to
450       include a device element for the local device; Syncthing will currently
451       add one if it is not present. The following attributes may  be  set  on
452       the device element:
453
454       id     The device ID. (mandatory)
455
456       name   A friendly name for the device. (optional)
457
458       compression
459              Whether  to  use  protocol  compression when sending messages to
460              this device.  The possible values are:
461
462              metadata
463                     Compress metadata packets,  such  as  index  information.
464                     Metadata  is usually very compression friendly so this is
465                     a good default.
466
467              always Compress all packets, including file data. This is recom‐
468                     mended  if  the  folders contents are mainly compressible
469                     data such as documents or text files.
470
471              never  Disable all compression.
472
473       introducer
474              Set to true if this device should be trusted as  an  introducer,
475              i.e.  we  should copy their list of devices per folder when con‐
476              necting.
477
478       SEE ALSO:
479          introducer
480
481       skipIntroductionRemovals
482              Set to true if you wish to follow  only  introductions  and  not
483              de-introductions.   For  example,  if  this is set, we would not
484              remove a device that we were introduced to even if the  original
485              introducer is no longer listing the remote device as known.
486
487       introducedBy
488              Defines which device has introduced us to this device. Used only
489              for following de-introductions.
490
491       certName
492              The device certificate common name, if it  is  not  the  default
493              “syncthing”.
494
495       From following child elements at least one address child must exist.
496
497       address
498              Contains  an address or host name to use when attempting to con‐
499              nect to this device.  Entries other than dynamic  must  be  pre‐
500              fixed  with  tcp:// (dual-stack), tcp4:// (IPv4 only) or tcp6://
501              (IPv6 only). Note that IP  addresses  need  not  use  tcp4/tcp6;
502              these are optional. Accepted formats are:
503
504              IPv4 address (tcp://192.0.2.42)
505                     The default port (22000) is used.
506
507              IPv4 address and port (tcp://192.0.2.42:12345)
508                     The address and port is used as given.
509
510              IPv6 address (tcp://[2001:db8::23:42])
511                     The  default  port  (22000)  is used. The address must be
512                     enclosed in square brackets.
513
514              IPv6 address and port (tcp://[2001:db8::23:42]:12345)
515                     The address and port is used as given. The  address  must
516                     be enclosed in square brackets.
517
518              Host name (tcp6://fileserver)
519                     The  host  name  will be used on the default port (22000)
520                     and connections will be attempted only via IPv6.
521
522              Host name and port (tcp://fileserver:12345)
523                     The host name will be used on the given port and  connec‐
524                     tions will be attempted via both IPv4 and IPv6, depending
525                     on name resolution.
526
527              dynamic
528                     The word dynamic (without tcp://  prefix)  means  to  use
529                     local and global discovery to find the device.
530
531              You  can  set multiple addresses and combine it with the dynamic
532              keyword for example:
533
534                 <device id="...">
535                     <address>tcp://192.0.2.1:22001</address>
536                     <address>tcp://192.0.1.254:22000</address>
537                     <address>dynamic</address>
538                 </device>
539
540       paused True if synchronization with this devices is (temporarily)  sus‐
541              pended.
542
543       allowedNetwork
544              If given, this restricts connections to this device to only this
545              network (see allowed-networks).
546
547       maxSendKbps
548              Maximum send rate to use for this device. Unit is kibibytes/sec‐
549              ond, despite the config name looking like kilobits/second.
550
551       maxRecvKbps
552              Maximum   receive   rate   to  use  for  this  device.  Unit  is
553              kibibytes/second, despite the config  name  looking  like  kilo‐
554              bits/second.
555
556       maxRequestKiB
557              Maximum  amount  of data to have outstanding in requests towards
558              this device.  Unit is kibibytes.
559
560       remoteGUIPort
561              If set to a positive integer, the GUI will display an HTTP  link
562              to  the  IP address which is currently used for synchronization.
563              Only the TCP port is exchanged for  the  value  specified  here.
564              Note  that  any  port forwarding or firewall settings need to be
565              done manually and the link will probably not work for link-local
566              IPv6 addresses because of modern browser limitations.
567

GUI ELEMENT

569          <gui enabled="true" tls="false" debugging="false">
570              <address>127.0.0.1:8384</address>
571              <apikey>l7jSbCqPD95JYZ0g8vi4ZLAMg3ulnN1b</apikey>
572              <theme>default</theme>
573          </gui>
574
575       There  must  be  exactly one gui element. The GUI configuration is also
576       used by the rest-api and the event-api. The following attributes may be
577       set on the gui element:
578
579       enabled
580              If not true, the GUI and API will not be started.
581
582       tls    If set to true, TLS (HTTPS) will be enforced. Non-HTTPS requests
583              will be redirected to HTTPS. When this is set to false, TLS con‐
584              nections are still possible but it is not mandatory.
585
586       debugging
587              This enables profiling and additional debugging endpoints in the
588              rest-api.
589
590       The following child elements may be present:
591
592       address
593              Set the listen address. One address  element  must  be  present.
594              Allowed address formats are:
595
596              IPv4 address and port (127.0.0.1:8384)
597                     The address and port is used as given.
598
599              IPv6 address and port ([::1]:8384)
600                     The  address  and port is used as given. The address must
601                     be enclosed in square brackets.
602
603              Wildcard and port (0.0.0.0:12345, [::]:12345, :12345)
604                     These are equivalent and will result in Syncthing listen‐
605                     ing on all interfaces via both IPv4 and IPv6.
606
607              UNIX socket location (/var/run/st.sock)
608                     If  the  address is an absolute path it is interpreted as
609                     the path to a UNIX socket.  (Added in v0.14.52.)
610
611       unixSocketPermissions
612              In the case that a UNIX socket location is used for address, set
613              this  to  an  octal  to  override the default permissions of the
614              socket.
615
616       user   Set to require authentication.
617
618       password
619              Contains the bcrypt hash of the real password.
620
621       apikey If set, this is the API key  that  enables  usage  of  the  REST
622              interface.
623
624       insecureAdminAccess
625              If  true,  this  allows access to the web GUI from outside (i.e.
626              not localhost) without authorization. A warning  will  displayed
627              about this setting on startup.
628
629       theme  The name of the theme to use.
630
631       authMode
632              Authentication  mode  to use. If not present authentication mode
633              (static) is controlled by presence of user/password  fields  for
634              backward compatibility.
635
636              static Authentication using user and password.
637
638              ldap   LDAP  authentication. Requires ldap top level config sec‐
639                     tion to be present.
640

LDAP ELEMENT

642          <ldap>
643              <address>localhost:389</address>
644              <bindDN>cn=%s,ou=users,dc=syncthing,dc=net</bindDN>
645              <transport>nontls</transport>
646              <insecureSkipVerify>false</insecureSkipVerify>
647          </ldap>
648
649       The ldap element contains LDAP configuration options.
650
651       address
652              LDAP server address (server:port).
653
654       bindDN BindDN for user authentication.  Special %s variable  should  be
655              used to pass username to LDAP.
656
657       transport
658
659          nontls Non secure connection.
660
661          tls    TLS secured connection.
662
663          starttls
664                 StartTLS connection mode.
665
666       insecureSkipVerify
667              Skip verification (true or false).
668

OPTIONS ELEMENT

670          <options>
671              <listenAddress>tcp://0.0.0.0:8384</listenAddress>
672              <listenAddress>dynamic+https://relays.syncthing.net/endpoint</listenAddress>
673              <globalAnnounceServer>default</globalAnnounceServer>
674              <globalAnnounceEnabled>true</globalAnnounceEnabled>
675              <localAnnounceEnabled>true</localAnnounceEnabled>
676              <localAnnouncePort>21027</localAnnouncePort>
677              <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>
678              <maxSendKbps>0</maxSendKbps>
679              <maxRecvKbps>0</maxRecvKbps>
680              <reconnectionIntervalS>60</reconnectionIntervalS>
681              <relaysEnabled>true</relaysEnabled>
682              <relayReconnectIntervalM>10</relayReconnectIntervalM>
683              <startBrowser>true</startBrowser>
684              <natEnabled>true</natEnabled>
685              <natLeaseMinutes>60</natLeaseMinutes>
686              <natRenewalMinutes>30</natRenewalMinutes>
687              <natTimeoutSeconds>10</natTimeoutSeconds>
688              <urAccepted>0</urAccepted>
689              <urSeen>0</urSeen>
690              <urUniqueID></urUniqueID>
691              <urURL>https://data.syncthing.net/newdata</urURL>
692              <urPostInsecurely>false</urPostInsecurely>
693              <urInitialDelayS>1800</urInitialDelayS>
694              <restartOnWakeup>true</restartOnWakeup>
695              <autoUpgradeIntervalH>12</autoUpgradeIntervalH>
696              <upgradeToPreReleases>false</upgradeToPreReleases>
697              <keepTemporariesH>24</keepTemporariesH>
698              <cacheIgnoredFiles>false</cacheIgnoredFiles>
699              <progressUpdateIntervalS>5</progressUpdateIntervalS>
700              <limitBandwidthInLan>false</limitBandwidthInLan>
701              <minHomeDiskFree unit="%">1</minHomeDiskFree>
702              <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>
703              <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>
704              <tempIndexMinBlocks>10</tempIndexMinBlocks>
705              <trafficClass>0</trafficClass>
706              <defaultFolderPath>~</defaultFolderPath>
707              <setLowPriority>true</setLowPriority>
708              <maxFolderConcurrency>0</maxFolderConcurrency>
709              <crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>
710              <crashReportingEnabled>true</crashReportingEnabled>
711              <stunKeepaliveStartS>180</stunKeepaliveStartS>
712              <stunKeepaliveMinS>20</stunKeepaliveMinS>
713              <stunServer>default</stunServer>
714              <databaseTuning>auto</databaseTuning>
715              <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>
716          </options>
717
718       The options element contains all other global configuration options.
719
720       listenAddress
721              The  listen  address  for  incoming sync connections. See Listen
722              Addresses for allowed syntax.
723
724       globalAnnounceServer
725              A URI to a global  announce  (discovery)  server,  or  the  word
726              default  to include the default servers. Any number of globalAn‐
727              nounceServer elements may be present. The syntax for non-default
728              entries  is that of a HTTP or HTTPS URL. A number of options may
729              be added as query options to the URL: insecure to  prevent  cer‐
730              tificate  validation (required for HTTP URLs) and id=<device ID>
731              to perform certificate pinning. The device ID to use is  printed
732              by the discovery server on startup.
733
734       globalAnnounceEnabled
735              Whether  to announce this device to the global announce (discov‐
736              ery) server, and also use it to look up other devices.
737
738       localAnnounceEnabled
739              Whether to send announcements to the local LAN,  also  use  such
740              announcements to find other devices.
741
742       localAnnouncePort
743              The  port  on  which to listen and send IPv4 broadcast announce‐
744              ments to.
745
746       localAnnounceMCAddr
747              The group address and port  to  join  and  send  IPv6  multicast
748              announcements on.
749
750       maxSendKbps
751              Outgoing data rate limit, in kibibytes per second.
752
753       maxRecvKbps
754              Incoming data rate limits, in kibibytes per second.
755
756       reconnectionIntervalS
757              The number of seconds to wait between each attempt to connect to
758              currently unconnected devices.
759
760       relaysEnabled
761              When true, relays will be connected to and potentially used  for
762              device to device connections.
763
764       relayReconnectIntervalM
765              Sets the interval, in minutes, between relay reconnect attempts.
766
767       startBrowser
768              Whether to attempt to start a browser to show the GUI when Sync‐
769              thing starts.
770
771       natEnabled
772              Whether to attempt to perform a UPnP and  NAT-PMP  port  mapping
773              for incoming sync connections.
774
775       natLeaseMinutes
776              Request  a lease for this many minutes; zero to request a perma‐
777              nent lease.
778
779       natRenewalMinutes
780              Attempt to renew the lease after this many minutes.
781
782       natTimeoutSeconds
783              When scanning for UPnP devices, wait this long for responses.
784
785       urAccepted
786              Whether the user has accepted to submit  anonymous  usage  data.
787              The  default,  0, mean the user has not made a choice, and Sync‐
788              thing will ask at some point in the future. -1 means no, a  num‐
789              ber  above  zero  means that that version of usage reporting has
790              been accepted.
791
792       urSeen The highest usage reporting version that has already been  shown
793              in the web GUI.
794
795       urUniqueID
796              The  unique  ID  sent  together with the usage report. Generated
797              when usage reporting is enabled.
798
799       urURL  The URL to post usage report data to, when enabled.
800
801       urPostInsecurely
802              When true, the UR URL can be http instead of https,  or  have  a
803              self-signed certificate. The default is false.
804
805       urInitialDelayS
806              The  time  to  wait from startup to the first usage report being
807              sent. Allows the system to stabilize  before  reporting  statis‐
808              tics.
809
810       restartOnWakeup
811              Whether  to  perform  a restart of Syncthing when it is detected
812              that we are waking from sleep mode (i.e. a folded up laptop).
813
814       autoUpgradeIntervalH
815              Check for a newer version after this many hours. Set to zero  to
816              disable automatic upgrades.
817
818       upgradeToPreReleases
819              If  true,  automatic  upgrades  include  release candidates (see
820              releases).
821
822       keepTemporariesH
823              Keep temporary failed transfers for this many hours.  While  the
824              temporaries  are  kept, the data they contain need not be trans‐
825              ferred again.
826
827       cacheIgnoredFiles
828              Whether to cache the results of ignore pattern evaluation.  Per‐
829              formance  at  the price of memory. Defaults to false as the cost
830              for evaluating ignores is usually not significant.
831
832       progressUpdateIntervalS
833              How often in seconds the progress of ongoing downloads  is  made
834              available to the GUI.
835
836       limitBandwidthInLan
837              Whether  to apply bandwidth limits to devices in the same broad‐
838              cast domain as the local device.
839
840       minHomeDiskFree
841              The minimum required free space that should be available on  the
842              partition  holding  the  configuration and index. Accepted units
843              are %, kB, MB, GB and TB.
844
845       releasesURL
846              The URL from which release information is loaded, for  automatic
847              upgrades.
848
849       alwaysLocalNet
850              Network  that  should be considered as local given in CIDR nota‐
851              tion.
852
853       overwriteRemoteDeviceNamesOnConnect
854              If set, device names will always be overwritten  with  the  name
855              given  by  remote  on each connection. By default, the name that
856              the remote device announces will only be adopted when a name has
857              not already been set.
858
859       tempIndexMinBlocks
860              When exchanging index information for incomplete transfers, only
861              take into account files that have at least this many blocks.
862
863       unackedNotificationID
864              ID of a notification to be displayed in the  web  GUI.  Will  be
865              removed once the user acknowledged it (e.g. an transition notice
866              on an upgrade).
867
868       trafficClass
869              Specify a type of service (TOS)/traffic class of outgoing  pack‐
870              ets.
871
872       stunServer
873              Server  to  be  used  for  STUN,  given  as ip:port. The keyword
874              default gets expanded to stun.callwithus.com:3478, stun.counter‐
875              path.com:3478,  stun.counterpath.net:3478,  stun.ekiga.net:3478,
876              stun.ideasip.com:3478,              stun.internetcalls.com:3478,
877              stun.schlund.de:3478,      stun.sipgate.net:10000,     stun.sip‐
878              gate.net:3478,                          stun.voip.aebc.com:3478,
879              stun.voiparound.com:3478,  stun.voipbuster.com:3478,  stun.voip‐
880              stunt.com:3478 and stun.xten.com:3478 (this is the default).
881
882       stunKeepaliveSeconds
883              Interval in seconds between contacting a STUN server to maintain
884              NAT  mapping.  Default  is 24 and you can set it to 0 to disable
885              contacting STUN servers.
886
887       defaultFolderPath
888              The UI will propose to create new folders at this path. This can
889              be disabled by setting this to an empty string.
890
891       setLowPriority
892              Syncthing will attempt to lower its process priority at startup.
893              Specifically: on Linux, set itself to a separate process  group,
894              set the niceness level of that process group to nine and the I/O
895              priority to best effort level five; on  other  Unixes,  set  the
896              process niceness level to nine; on Windows, set the process pri‐
897              ority class to below normal. To disable this behavior, for exam‐
898              ple  to  control  process priority yourself as part of launching
899              Syncthing, set this option to false.
900
901   Listen Addresses
902       The following address  types  are  accepted  in  sync  protocol  listen
903       addresses.  If  you want Syncthing to listen on multiple addresses, you
904       can either: add multiple <listenAddress> tags in the configuration file
905       or enter several addresses separated by commas in the GUI.
906
907       Default listen addresses (default)
908              This  is equivalent to tcp://0.0.0.0:22000, quic://0.0.0.0:22000
909              and dynamic+https://relays.syncthing.net/endpoint.
910
911       TCP wildcard and port (tcp://0.0.0.0:22000, tcp://:22000)
912              These are equivalent and will result in Syncthing  listening  on
913              all interfaces, IPv4 and IPv6, on the specified port.
914
915       TCP IPv4 wildcard and port (tcp4://0.0.0.0:22000, tcp4://:22000)
916              These  are  equivalent and will result in Syncthing listening on
917              all interfaces via IPv4 only.
918
919       TCP IPv4 address and port (tcp4://192.0.2.1:22000)
920              This results in Syncthing listening on the specified address and
921              port, IPv4 only.
922
923       TCP IPv6 wildcard and port (tcp6://[::]:22000, tcp6://:22000)
924              These  are  equivalent and will result in Syncthing listening on
925              all interfaces via IPv6 only.
926
927       TCP IPv6 address and port (tcp6://[2001:db8::42]:22000)
928              This results in Syncthing listening on the specified address and
929              port, IPv6 only.
930
931       QUIC address and port (e.g. quic://0.0.0.0:22000)
932              Syntax is the same as for TCP, also quic4 and quic6 can be used.
933
934       Static relay address (relay://192.0.2.42:22067?id=abcd123...)
935              Syncthing  will  connect  to and listen for incoming connections
936              via the specified relay address.
937
938   Todo
939       Document available URL parameters.
940
941       Dynamic relay pool (dynamic+https://192.0.2.42/relays)
942              Syncthing will fetch the specified HTTPS URL,  parse  it  for  a
943              JSON  payload  describing relays, select a relay from the avail‐
944              able ones and listen via that as if specified as a static  relay
945              above.
946
947   Todo
948       Document available URL parameters.
949

SYNCING CONFIGURATION FILES

951       Syncing configuration files between devices (such that multiple devices
952       are using the same configuration files) can cause issues. This is  easy
953       to do accidentally if you sync your home folder between devices. A com‐
954       mon symptom of syncing configuration files is  two  devices  ending  up
955       with the same Device ID.
956
957       If  you want to use Syncthing to backup your configuration files, it is
958       recommended that the files you are backing up are in a  folder-sendonly
959       to prevent other devices from overwriting the per device configuration.
960       The folder on the remote device(s) should not be used as  configuration
961       for the remote devices.
962
963       If  you’d  like to sync your home folder in non-send only mode, you may
964       add the folder that stores the configuration files to the ignore  list.
965       If  you’d  also  like  to  backup your configuration files, add another
966       folder in send only mode for just the configuration folder.
967

AUTHOR

969       The Syncthing Authors
970
972       2014-2019, The Syncthing Authors
973
974
975
976
977v1                               Feb 17, 2021              SYNCTHING-CONFIG(5)
Impressum