.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SYNCTHING-CONFIG" "5" "May 31, 2022" "v1.20.0" "Syncthing" .SH NAME syncthing-config \- Syncthing Configuration .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C $HOME/.config/syncthing $HOME/Library/Application Support/Syncthing %LOCALAPPDATA%\eSyncthing .ft P .fi .UNINDENT .UNINDENT .SH DESCRIPTION .sp New in version 1.5.0: Database and config can now be set separately. Previously the database was always located in the same directory as the config. .sp Syncthing uses a single directory to store configuration and crypto keys. Syncthing also has a database, which is often stored in this directory too. The config location defaults to \fB$HOME/.config/syncthing\fP (Unix\-like), \fB$HOME/Library/Application Support/Syncthing\fP (Mac), or \fB%LOCALAPPDATA%\eSyncthing\fP (Windows). It can be changed at runtime using the \fB\-\-config\fP flag. In this directory the following files are located: .INDENT 0.0 .TP .B \fBconfig.xml\fP The configuration file, in XML format. .TP .B \fBcert.pem\fP, \fBkey.pem\fP The device’s ECDSA public and private key. These form the basis for the device ID. The key must be kept private. .TP .B \fBhttps\-cert.pem\fP, \fBhttps\-key.pem\fP The certificate and key for HTTPS GUI connections. These may be replaced with a custom certificate for HTTPS as desired. .TP .B \fBcsrftokens.txt\fP A list of recently issued CSRF tokens (for protection against browser cross site request forgery). .UNINDENT .sp The database is stored either in the same directory as the config (usually the default), but may also be located in one of the following directories (Unix\-like platforms only): .INDENT 0.0 .IP \(bu 2 If a database exists in the old default location, that location is still used. .IP \(bu 2 If \fB$XDG_DATA_HOME\fP is set, use \fB$XDG_DATA_HOME/syncthing\fP\&. .IP \(bu 2 If \fB~/.local/share/syncthing\fP exists, use that location. .IP \(bu 2 Use the old default location (same as config). .UNINDENT .sp The location of the database can be changed using the \fB\-\-data\fP flag. The \fB\-\-home\fP flag sets both config and database locations at the same time. The database contains the following files: .INDENT 0.0 .TP .B \fBindex\-\fP\fI*\fP\fB\&.db\fP A directory holding the database with metadata and hashes of the files currently on disk and available from peers. .UNINDENT .SH CONFIG FILE FORMAT .sp The following shows an example of a default configuration file (IDs will differ): .sp \fBNOTE:\fP .INDENT 0.0 .INDENT 3.5 The config examples are present for illustration. Do \fBnot\fP copy them entirely to use as your config. They are likely out\-of\-date and the values may no longer correspond to the defaults. .UNINDENT .UNINDENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C basic 1 3600 basic 0 0 0 random false 0 0 \-1 false false false 25 .stfolder false 0 2 false standard standard false false
dynamic
false false 0 0 0 false 0
127.0.0.1:8384
k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1 default
default default true true 21027 [ff12::8384]:21027 0 0 60 true 10 true true 60 30 10 0 0 https://data.syncthing.net/newdata false 1800 true 12 false 24 false 5 false 1 https://upgrades.syncthing.net/meta.json false 10 authenticationUserAndPassword 0 true 0 https://crash.syncthing.net/newcrash true 180 20 default auto 0 true false 0 0 false basic 1 3600 basic 0 0 0 random false 0 0 10 false false false 25 .stfolder false 0 2 false standard standard false false
dynamic
false false 0 0 0 false 0
.ft P .fi .UNINDENT .UNINDENT .SH CONFIGURATION ELEMENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C .ft P .fi .UNINDENT .UNINDENT .sp This is the root element. It has one attribute: .INDENT 0.0 .TP .B version The config version. Increments whenever a change is made that requires migration from previous formats. .UNINDENT .sp It contains the elements described in the following sections and any number of this additional child element: .INDENT 0.0 .TP .B remoteIgnoredDevice Contains the ID of the device that should be ignored. Connection attempts from this device are logged to the console but never displayed in the web GUI. .UNINDENT .SH FOLDER ELEMENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C basic 1 3600 basic 0 0 0 random false 0 0 \-1 false false false 25 .stfolder false 0 2 false standard standard false false .ft P .fi .UNINDENT .UNINDENT .sp One or more \fBfolder\fP elements must be present in the file. Each element describes one folder. The following attributes may be set on the \fBfolder\fP element: .INDENT 0.0 .TP .B id (mandatory) The folder ID, which must be unique. .UNINDENT .INDENT 0.0 .TP .B label The label of a folder is a human readable and descriptive local name. May be different on each device, empty, and/or identical to other folder labels. (optional) .UNINDENT .INDENT 0.0 .TP .B filesystemType The internal file system implementation used to access this folder, detailed in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B path (mandatory) The path to the directory where the folder is stored on this device; not sent to other devices. .UNINDENT .INDENT 0.0 .TP .B type Controls how the folder is handled by Syncthing. Possible values are: .INDENT 7.0 .TP .B \fBsendreceive\fP The folder is in default mode. Sending local and accepting remote changes. Note that this type was previously called “readwrite” which is deprecated but still accepted in incoming configs. .TP .B \fBsendonly\fP The folder is in “send only” mode – it will not be modified by Syncthing on this device. Note that this type was previously called “readonly” which is deprecated but still accepted in incoming configs. .TP .B \fBreceiveonly\fP The folder is in “receive only” mode – it will not propagate changes to other devices. .TP .B \fBreceiveencrypted\fP Must be used on untrusted devices, where the data cannot be decrypted because no folder password was entered. See untrusted\&. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B rescanIntervalS The rescan interval, in seconds. Can be set to \fB0\fP to disable when external plugins are used to trigger rescans. .UNINDENT .INDENT 0.0 .TP .B fsWatcherEnabled If set to \fBtrue\fP, this detects changes to files in the folder and scans them. .UNINDENT .INDENT 0.0 .TP .B fsWatcherDelayS The duration during which changes detected are accumulated, before a scan is scheduled (only takes effect if \fI\%fsWatcherEnabled\fP is set to \fBtrue\fP). .UNINDENT .INDENT 0.0 .TP .B ignorePerms If \fBtrue\fP, files originating from this folder will be announced to remote devices with the “no permission bits” flag. The remote devices will use whatever their default permission setting is when creating the files. The primary use case is for file systems that do not support permissions, such as FAT, or environments where changing permissions is impossible. .UNINDENT .INDENT 0.0 .TP .B autoNormalize Automatically correct UTF\-8 normalization errors found in file names. The mechanism and how to set it up is described in a separate chapter\&. .UNINDENT .sp The following child elements may exist: .INDENT 0.0 .TP .B device These must have the \fBid\fP attribute and can have an \fBintroducedBy\fP attribute, identifying the device that introduced us to share this folder with the given device. If the original introducer unshares this folder with this device, our device will follow and unshare the folder (subject to \fI\%skipIntroductionRemovals\fP being \fBfalse\fP on the introducer device). .sp All mentioned devices are those that will be sharing the folder in question. Each mentioned device must have a separate \fBdevice\fP element later in the file. It is customary that the local device ID is included in all folders. Syncthing will currently add this automatically if it is not present in the configuration file. .sp The \fBencryptionPassword\fP sub\-element contains the secret needed to decrypt this folder’s data on the remote device. If left empty, the data is plainly accessible (but still protected by the transport encryption). The mechanism and how to set it up is described in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B minDiskFree The minimum required free space that should be available on the disk this folder resides. The folder will be stopped when the value drops below the threshold. The element content is interpreted according to the given \fBunit\fP attribute. Accepted \fBunit\fP values are \fB%\fP (percent of the disk / volume size), \fBkB\fP, \fBMB\fP, \fBGB\fP and \fBTB\fP\&. Set to zero to disable. .UNINDENT .INDENT 0.0 .TP .B versioning Specifies a versioning configuration. .sp \fBSEE ALSO:\fP .INDENT 7.0 .INDENT 3.5 versioning .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B copiers .TP .B hashers The number of copier and hasher routines to use, or \fB0\fP for the system determined optimums. These are low\-level performance options for advanced users only; do not change unless requested to or you’ve actually read and understood the code yourself. :) .UNINDENT .INDENT 0.0 .TP .B pullerMaxPendingKiB Controls when we stop sending requests to other devices once we’ve got this much unserved requests. The number of pullers is automatically adjusted based on this desired amount of outstanding request data. .UNINDENT .INDENT 0.0 .TP .B order The order in which needed files should be pulled from the cluster. It has no effect when the folder type is “send only”. The possibles values are: .INDENT 7.0 .TP .B \fBrandom\fP (default) Pull files in random order. This optimizes for balancing resources among the devices in a cluster. .TP .B \fBalphabetic\fP Pull files ordered by file name alphabetically. .TP .B \fBsmallestFirst\fP, \fBlargestFirst\fP Pull files ordered by file size; smallest and largest first respectively. .TP .B \fBoldestFirst\fP, \fBnewestFirst\fP Pull files ordered by modification time; oldest and newest first respectively. .UNINDENT .sp Note that the scanned files are sent in batches and the sorting is applied only to the already discovered files. This means the sync might start with a 1 GB file even if there is 1 KB file available on the source device until the 1 KB becomes known to the pulling device. .UNINDENT .INDENT 0.0 .TP .B ignoreDelete . \fBWARNING:\fP .INDENT 7.0 .INDENT 3.5 Enabling this is highly discouraged \- use at your own risk. You have been warned. .UNINDENT .UNINDENT .sp When set to \fBtrue\fP, this device will pretend not to see instructions to delete files from other devices. The mechanism is described in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B scanProgressIntervalS The interval in seconds with which scan progress information is sent to the GUI. Setting to \fB0\fP will cause Syncthing to use the default value of two. .UNINDENT .INDENT 0.0 .TP .B pullerPauseS Tweak for rate limiting the puller when it retries pulling files. Don’t change this unless you know what you’re doing. .UNINDENT .INDENT 0.0 .TP .B maxConflicts The maximum number of conflict copies to keep around for any given file. The default, \fB\-1\fP, means an unlimited number. Setting this to \fB0\fP disables conflict copies altogether. .UNINDENT .INDENT 0.0 .TP .B disableSparseFiles By default, blocks containing all zeros are not written, causing files to be sparse on filesystems that support this feature. When set to \fBtrue\fP, sparse files will not be created. .UNINDENT .INDENT 0.0 .TP .B disableTempIndexes By default, devices exchange information about blocks available in transfers that are still in progress, which allows other devices to download parts of files that are not yet fully downloaded on your own device, essentially making transfers more torrent like. When set to \fBtrue\fP, such information is not exchanged for this folder. .UNINDENT .INDENT 0.0 .TP .B paused True if this folder is (temporarily) suspended. .UNINDENT .INDENT 0.0 .TP .B weakHashThresholdPct Use weak hash if more than the given percentage of the file has changed. Set to \fB\-1\fP to always use weak hash. Default is \fB25\fP\&. .UNINDENT .INDENT 0.0 .TP .B markerName Name of a directory or file in the folder root to be used as marker\-faq\&. Default is \fB\&.stfolder\fP\&. .UNINDENT .INDENT 0.0 .TP .B copyOwnershipFromParent On Unix systems, tries to copy file/folder ownership from the parent directory (the directory it’s located in). Requires running Syncthing as a privileged user, or granting it additional capabilities (e.g. CAP_CHOWN on Linux). .UNINDENT .INDENT 0.0 .TP .B modTimeWindowS Allowed modification timestamp difference when comparing files for equivalence. To be used on file systems which have unstable modification timestamps that might change after being recorded during the last write operation. Default is \fB2\fP on Android when the folder is located on a FAT partition, and \fB0\fP otherwise. .UNINDENT .INDENT 0.0 .TP .B maxConcurrentWrites Maximum number of concurrent write operations while syncing. Increasing this might increase or decrease disk performance, depending on the underlying storage. Default is \fB2\fP\&. .UNINDENT .INDENT 0.0 .TP .B disableFsync . \fBWARNING:\fP .INDENT 7.0 .INDENT 3.5 This is a known insecure option \- use at your own risk. .UNINDENT .UNINDENT .sp Disables committing file operations to disk before recording them in the database. Disabling fsync can lead to data corruption. The mechanism is described in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B blockPullOrder Order in which the blocks of a file are downloaded. This option controls how quickly different parts of the file spread between the connected devices, at the cost of causing strain on the storage. .sp Available options: .INDENT 7.0 .TP .B \fBstandard\fP (default) The blocks of a file are split into N equal continuous sequences, where N is the number of connected devices. Each device starts downloading its own sequence, after which it picks other devices sequences at random. Provides acceptable data distribution and minimal spinning disk strain. .TP .B \fBrandom\fP The blocks of a file are downloaded in a random order. Provides great data distribution, but very taxing on spinning disk drives. .TP .B \fBinOrder\fP The blocks of a file are downloaded sequentially, from start to finish. Spinning disk drive friendly, but provides no improvements to data distribution. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B copyRangeMethod Provides a choice of method for copying data between files. This can be used to optimise copies on network filesystems, improve speed of large copies or clone the data using copy\-on\-write functionality if the underlying filesystem supports it. The mechanism is described in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B caseSensitiveFS Affects performance by disabling the extra safety checks for case insensitive filesystems. The mechanism and how to set it up is described in a separate chapter\&. .UNINDENT .INDENT 0.0 .TP .B junctionsAsDirs NTFS directory junctions are treated as ordinary directories, if this is set to \fBtrue\fP\&. .UNINDENT .SH DEVICE ELEMENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C
dynamic
false false 0 0 0 false 0
tcp://192.0.2.1:22001
true 192.168.0.0/16 false 100 100 65536 false 8384
.ft P .fi .UNINDENT .UNINDENT .sp One or more \fBdevice\fP elements must be present in the file. Each element describes a device participating in the cluster. It is customary to include a \fBdevice\fP element for the local device; Syncthing will currently add one if it is not present. The following attributes may be set on the \fBdevice\fP element: .INDENT 0.0 .TP .B id (mandatory) The device ID\&. .UNINDENT .INDENT 0.0 .TP .B name A friendly name for the device. (optional) .UNINDENT .INDENT 0.0 .TP .B compression Whether to use protocol compression when sending messages to this device. The possible values are: .INDENT 7.0 .TP .B \fBmetadata\fP Compress metadata packets, such as index information. Metadata is usually very compression friendly so this is a good default. .TP .B \fBalways\fP Compress all packets, including file data. This is recommended if the folders contents are mainly compressible data such as documents or text files. .TP .B \fBnever\fP Disable all compression. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B introducer Set to true if this device should be trusted as an introducer, i.e. we should copy their list of devices per folder when connecting. .sp \fBSEE ALSO:\fP .INDENT 7.0 .INDENT 3.5 introducer .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B skipIntroductionRemovals Set to true if you wish to follow only introductions and not de\-introductions. For example, if this is set, we would not remove a device that we were introduced to even if the original introducer is no longer listing the remote device as known. .UNINDENT .INDENT 0.0 .TP .B introducedBy Defines which device has introduced us to this device. Used only for following de\-introductions. .UNINDENT .INDENT 0.0 .TP .B certName The device certificate’s common name, if it is not the default “syncthing”. .UNINDENT .sp From the following child elements at least one \fBaddress\fP child must exist. .INDENT 0.0 .TP .B address (mandatory: At least one must be present.) Contains an address or host name to use when attempting to connect to this device. Entries other than \fBdynamic\fP need a protocol specific prefix. For the TCP protocol the prefixes \fBtcp://\fP (dual\-stack), \fBtcp4://\fP (IPv4 only) or \fBtcp6://\fP (IPv6 only) can be used. The prefixes for the QUIC protocol are analogous: \fBquic://\fP, \fBquic4://\fP and \fBquic6://\fP Note that IP addresses need not use IPv4 or IPv6 prefixes; these are optional. Accepted formats are: .INDENT 7.0 .TP .B IPv4 address (\fBtcp://192.0.2.42\fP) The default port (22000) is used. .TP .B IPv4 address and port (\fBtcp://192.0.2.42:12345\fP) The address and port is used as given. .TP .B IPv6 address (\fBtcp://[2001:db8::23:42]\fP) The default port (22000) is used. The address must be enclosed in square brackets. .TP .B IPv6 address and port (\fBtcp://[2001:db8::23:42]:12345\fP) The address and port is used as given. The address must be enclosed in square brackets. .TP .B Host name (\fBtcp6://fileserver\fP) The host name will be used on the default port (22000) and connections will be attempted only via IPv6. .TP .B Host name and port (\fBtcp://fileserver:12345\fP) The host name will be used on the given port and connections will be attempted via both IPv4 and IPv6, depending on name resolution. .TP .B \fBdynamic\fP The word \fBdynamic\fP (without any prefix) means to use local and global discovery to find the device. .UNINDENT .sp You can set multiple addresses \fIand\fP combine it with the \fBdynamic\fP keyword for example: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C
tcp://192.0.2.1:22001
quic://192.0.1.254:22000
dynamic
.ft P .fi .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B paused True if synchronization with this devices is (temporarily) suspended. .UNINDENT .INDENT 0.0 .TP .B allowedNetwork If given, this restricts connections to this device to only this network. The mechanism is described in detail in a separate chapter). .UNINDENT .INDENT 0.0 .TP .B autoAcceptFolders If \fBtrue\fP, folders shared from this remote device are automatically added and synced locally under the \fI\%default path\fP\&. For the folder name, Syncthing tries to use the label from the remote device, and if the same label already exists, it then tries to use the folder’s ID. If that exists as well, the folder is just offered to accept manually. A local folder already added with the same ID will just be shared rather than created separately. .UNINDENT .INDENT 0.0 .TP .B maxSendKbps Maximum send rate to use for this device. Unit is kibibytes/second, despite the config name looking like kilobits/second. .UNINDENT .INDENT 0.0 .TP .B maxRecvKbps Maximum receive rate to use for this device. Unit is kibibytes/second, despite the config name looking like kilobits/second. .UNINDENT .INDENT 0.0 .TP .B ignoredFolder Contains the ID of the folder that should be ignored. This folder will always be skipped when advertised from the containing remote device, i.e. this will be logged, but there will be no dialog shown in the web GUI. .UNINDENT .INDENT 0.0 .TP .B maxRequestKiB Maximum amount of data to have outstanding in requests towards this device. Unit is kibibytes. .UNINDENT .INDENT 0.0 .TP .B remoteGUIPort If set to a positive integer, the GUI will display an HTTP link to the IP address which is currently used for synchronization. Only the TCP port is exchanged for the value specified here. Note that any port forwarding or firewall settings need to be done manually and the link will probably not work for link\-local IPv6 addresses because of modern browser limitations. .UNINDENT .INDENT 0.0 .TP .B untrusted This boolean value marks a particular device as untrusted, which disallows ever sharing any unencrypted data with it. Every folder shared with that device then needs an encryption password set, or must already be of the “receive encrypted” type locally. Refer to the detailed explanation under untrusted\&. .UNINDENT .SH GUI ELEMENT .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C
127.0.0.1:8384
k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1 default
.ft P .fi .UNINDENT .UNINDENT .sp There must be exactly one \fBgui\fP element. The GUI configuration is also used by the /dev/rest and the /dev/events\&. The following attributes may be set on the \fBgui\fP element: .INDENT 0.0 .TP .B enabled If not \fBtrue\fP, the GUI and API will not be started. .UNINDENT .INDENT 0.0 .TP .B tls If set to \fBtrue\fP, TLS (HTTPS) will be enforced. Non\-HTTPS requests will be redirected to HTTPS. When set to \fBfalse\fP, TLS connections are still possible but not required. .UNINDENT .INDENT 0.0 .TP .B debugging This enables /users/profiling and additional endpoints in the REST API, see /rest/debug\&. .UNINDENT .sp The following child elements may be present: .INDENT 0.0 .TP .B address (mandatory: Exactly one element must be present.) Set the listen address. Allowed address formats are: .INDENT 7.0 .TP .B IPv4 address and port (\fB127.0.0.1:8384\fP) The address and port are used as given. .TP .B IPv6 address and port (\fB[::1]:8384\fP) The address and port are used as given. The address must be enclosed in square brackets. .TP .B Wildcard and port (\fB0.0.0.0:12345\fP, \fB[::]:12345\fP, \fB:12345\fP) These are equivalent and will result in Syncthing listening on all interfaces via both IPv4 and IPv6. .TP .B UNIX socket location (\fB/var/run/st.sock\fP) If the address is an absolute path it is interpreted as the path to a UNIX socket. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B unixSocketPermissions When \fBaddress\fP is set to a UNIX socket location, set this to an octal value to override the default permissions of the socket. .UNINDENT .INDENT 0.0 .TP .B user Set to require authentication. .UNINDENT .INDENT 0.0 .TP .B password Contains the bcrypt hash of the real password. .UNINDENT .INDENT 0.0 .TP .B apikey If set, this is the API key that enables usage of the REST interface. .UNINDENT .INDENT 0.0 .TP .B insecureAdminAccess If true, this allows access to the web GUI from outside (i.e. not localhost) without authorization. A warning will displayed about this setting on startup. .UNINDENT .INDENT 0.0 .TP .B insecureSkipHostcheck When the GUI / API is bound to localhost, we enforce that the \fBHost\fP header looks like localhost. This option bypasses that check. .UNINDENT .INDENT 0.0 .TP .B insecureAllowFrameLoading Allow rendering the GUI within an \fB