swaynag

title: swaynag(5)

text:
# swaynag(5)

## NAME
swaynag - swaynag configuration file

## SYNOPSIS
$HOME/.swaynag/config, $XDG_CONFIG_HOME/swaynag/config, SYSCONFDIR/swaynag/config

## CONFIG FILE
At the top of the config file, swaynag options can be set using the format long-option=value. These will be used as default values if swaynag is not given the option. This can be useful for setting a preferred font, output, and edge.

Below the options, custom types may be defined. To define a type, use the following format:

```
[name-of-type]
option=value
```

All colors may be given in the form RRGGBB or RRGGBBAA. The following colors can be set:

background=<color>

The background color for swaynag.

border=<color>

The color to use for borders of buttons.

border-bottom=<color>

The color of the border line at the bottom of swaynag.

button-background=<color>

The background color for the buttons.

text=<color>

The color of the text.

button-text=<color>

The color of the button text.

The following sizing options can also be set:

border-bottom-size=<size>

Set the thickness of the bottom border.

message-padding=<padding>

Set the padding for the message.

details-background=<color>

The background color for the details.

details-border-size=<size>

Set the thickness for the details border.

button-border-size=<size>

Set the thickness for the button border.

button-gap=<gap>

Set the size of the gap between buttons.

button-dismiss-gap=<gap>

Set the size of the gap between the dismiss button and another button.

button-margin-right=<margin>

Set the margin from the right of the dismiss button to edge.

button-padding=<padding>

Set the padding for the button text.

Additionally, the following options can be assigned a default per-type:

edge=top|bottom

Set the edge to use.

layer=overlay|top|bottom|background

Set the layer to use.

font=<font>

Set the font to use.

output=<output>

Set the output to use. This should be the name of a xdg_output.

## EXAMPLE

```
font=Monospace 12
edge=bottom
[green]
edge=top
background=00AA00
border=006600
border-bottom=004400
text=FFFFFF
button-background=00CC00
message-padding=10
```

## SEE
swaynag(1)


swtpm-localca.conf

package: swtpm-tools

title: swtpm-localca.conf(5)

summary: Configuration file for swtpm_localca

text:
# swtpm-localca.conf(5)

## NAME
swtpm-localca.conf - Configuration file for swtpm_localca

## DESCRIPTION
The file /etc/swtpm-localca.conf contains configuration variables for the swtpm_localca program.

Entries may contain environment variables that will be resolved. All environment variables must be formatted like this: '${varname}'.

Users may write their own configuration into ${XDG_CONFIG_HOME}/swtpm-localca.conf or if XDG_CONFIG_HOME is not set it may be in ${HOME}/.config/swtpm-localca.conf.

The following configuration variables are supported:

statedir

The name of a directory where to store data into. A lock will be created in this directory.

signinkey

The file containing the key used for signing the certificates. Provide a key in PEM format or a pkcs11 URI.

signingkey_password

The password to use for the signing key.

issuercert

The file containing the certificate for this CA. Provide a certificate in PEM format.

certserial

The name of file containing the serial number for the next certificate.

TSS_TCSD_HOSTNAME

This variable can be set to the host where tcsd is running on in case the signing key is a GnuTLS TPM 1.2 key. By default localhost will be used.

TSS_TCSD_PORT

This variable can be set to the port on which tcsd is listening for connections. By default port 30003 will be used.

env:<environment variable name=<value>>

Environment variables, that are needed by pkcs11 modules, can be set using this format. An example for such an environment variable may look like this:

```
    env:MY_MODULE_PKCS11_CONFIG = /tmp/mymodule-pkcs11.conf

```

The line must not contain any trailing spaces.

## EXAMPLE
An example swtpm-localca.conf file may look as follows:

```
 statedir = /var/lib/swtpm_localca
 signingkey = /var/lib/swtpm_localca/signkey.pem
 issuercert = /var/lib/swtpm_localca/issuercert.pem
 certserial = /var/lib/swtpm_localca/certserial
```

With a PKCS11 URI it may look like this:

```
 statedir = /var/lib/swtpm-localca
 signingkey = pkcs11:model=SoftHSM%20v2;manufacturer=SoftHSM%20project;serial=891b99c169e41301;token=mylabel;id=%00;object=mykey;type=public
 issuercert = /var/lib/swtpm-localca/swtpm-localca-tpmca-cert.pem
 certserial = /var/lib/swtpm-localca/certserial
 SWTPM_PKCS11_PIN = 1234
```

## SEE ALSO
swtpm_localca

## REPORTING BUGS
Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com>


swtpm-localca.options

title: swtpm-localca.options(5)

summary: Options file for swtpm_localca

text:
# swtpm-localca.options(5)

## NAME
swtpm-localca.options - Options file for swtpm_localca

## DESCRIPTION
The file /etc/swtpm-localca.options contains command line options to pass to the swtpm_cert program and should hold options that apply to the creation of all TPM Endorsement Key (EK) and platform certificates.

Users may write their own options into ${XDG_CONFIG_HOME}/swtpm-localca.options or if XDG_CONFIG_HOME is not set it may be in ${HOME}/.config/swtpm-localca.options.

## EXAMPLE
An example swtpm-localca.options file may look as follows:

```
  --platform-manufacturer Fedora
  --platform-version 2.1
  --platform-model QEMU
```

## SEE ALSO
swtpm_localca

## REPORTING BUGS
Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com>


title: swtpm_setup.conf(5)

summary: Configuration file for swtpm_setup

text:
# swtpm_setup.conf(5)

## NAME
swtpm_setup.conf - Configuration file for swtpm_setup

## DESCRIPTION
The file /etc/swtpm_setup.conf contains configuration information for swtpm_setup. It must only contain one configuration keyword per line, followed by an equals sign (=) and then followed by appropriate configuration information. A comment at the end of the line may be introduced by a hash (#) sign.

Users may write their own configuration into ${XDG_CONFIG_HOME}/swtpm_setup.conf or if XDG_CONFIG_HOME is not set it may be in ${HOME}/.config/swtpm_setup.conf.

The following keywords are recognized:

create_certs_tool

This keyword is to be followed by the name of an executable or executable script used for creating various TPM certificates. The tool will be called with the following options

--type type

This parameter indicates the type of certificate to create. The type parameter may be one of the following: ek, or platform

--dir dir

This parameter indicates the directory into which the certificate is to be stored. It is expected that the EK certificate is stored in this directory under the name ek.cert and the platform certificate under the name platform.cert.

--ek ek

This parameter indicates the modulus of the public key of the endorsement key (EK). The public key is provided as a sequence of ASCII hex digits.

--vmid ID

This parameter indicates the ID of the VM for which to create the certificate.

--logfile <logfile>

The log file to log output to; by default logging goes to stdout and stderr on the console.

--configfile <configuration file>

The configuration file to use. This file typically contains configuration information for the invoked program. If omitted, the program must use its default configuration file.

--optsfile <options file>

The options file to use. This file typically contains options that the invoked program uses. If omitted, the program must use its default options file.

--tpm-spec-family <family>, --tpm-spec-level <level>, --tpm-spec-revision <revision>

These 3 options describe the TPM specification that was followed for the implementation of the TPM and will be part of the EK certificate.

--tpm2

This option is passed in case a TPM 2 compliant certificate needs to be created.

create_certs_tool_config

This keyword is to be followed by the name of a configuration file that will be passed to the invoked program using the --configfile option described above. If omitted, the invoked program will use the default configuration file.

create_certs_tool_options

This keyword is to be followed by the name of an options file that will be passed to the invoked program using the --optsfile option described above. If omitted, the invoked program will use the default options file.

active_pcr_banks (since v0.7)

This keyword is to be followed by a comma-separated list of names of PCR banks. The list must not contain any spaces. Valid PCR bank names are sha1, sha256, sha384, and sha512.

## SEE ALSO
swtpm_setup

## REPORTING BUGS
Report bugs to Stefan Berger <stefanb@linux.vnet.ibm.com>


syncthing-config

package: syncthing

title: syncthing-config(5)

summary: Syncthing Configuration

text:
# syncthing-config(5)

## NAME
syncthing-config - Syncthing Configuration

## SYNOPSIS

```
$XDG_STATE_HOME/syncthing
$HOME/.local/state/syncthing
$HOME/Library/Application Support/Syncthing
%LOCALAPPDATA%\Syncthing
```

## DESCRIPTION
Changed in version 1.27.0: The default location of the configuration and database directory on Unix-like systems was changed to $XDG_STATE_HOME/syncthing or $HOME/.local/state/syncthing. Previously the default config location was $XDG_CONFIG_HOME/syncthing or $HOME/.config/syncthing. The database directory was previously $HOME/.config/syncthing or, if the environment variable was set, $XDG_DATA_HOME/syncthing. Existing installations may still use these directories instead of the newer defaults.

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.

Syncthing uses a single directory to store configuration and crypto keys. Syncthing also keeps an index database with file metadata which is by default stored in the same directory, though this can be overridden.

The location defaults to $XDG_STATE_HOME/syncthing or $HOME/.local/state/syncthing (Unix-like), $HOME/Library/Application Support/Syncthing (Mac), or %LOCALAPPDATA%\Syncthing (Windows). It can be changed at runtime using the --config or --home flags or the corresponding environment variables ($STCONFDIR or STHOMEDIR). The following files are located in this directory:

config.xml

The configuration file, in XML format.

cert.pem, key.pem

The device’s ECDSA public and private key. These form the basis for the device ID. The key must be kept private.

https-cert.pem, https-key.pem

The certificate and key for HTTPS GUI connections. These may be replaced with a custom certificate for HTTPS as desired.

The database is by default stored in the same directory as the config, but the location may be overridden by the --data or --home flags or the corresponding environment varibles ($STDATADIR or STHOMEDIR).

The database directory contains the following files, among others:

index-*.db

A directory holding the database with metadata and hashes of the files currently on disk and available from peers.

syncthing.log

Log output, on some systems.

audit-*.log

Audit log data, when enabled.

panic-*.log

Crash log data, when required.

## CONFIG FILE FORMAT
The following shows an example of a default configuration file (IDs will differ):

NOTE:

The config examples are present for illustration. Do not copy them entirely to use as your config. They are likely out-of-date and the values may no longer correspond to the defaults.

```
<configuration version="37">

    <folder id="default" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">

        <filesystemType>basic</filesystemType>

        <device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" introducedBy="">

            <encryptionPassword></encryptionPassword>

        </device>

        <minDiskFree unit="%">1</minDiskFree>

        <versioning>

            <cleanupIntervalS>3600</cleanupIntervalS>

            <fsPath></fsPath>

            <fsType>basic</fsType>

        </versioning>

        <copiers>0</copiers>

        <pullerMaxPendingKiB>0</pullerMaxPendingKiB>

        <hashers>0</hashers>

        <order>random</order>

        <ignoreDelete>false</ignoreDelete>

        <scanProgressIntervalS>0</scanProgressIntervalS>

        <pullerPauseS>0</pullerPauseS>

        <maxConflicts>-1</maxConflicts>

        <disableSparseFiles>false</disableSparseFiles>

        <disableTempIndexes>false</disableTempIndexes>

        <paused>false</paused>

        <weakHashThresholdPct>25</weakHashThresholdPct>

        <markerName>.stfolder</markerName>

        <copyOwnershipFromParent>false</copyOwnershipFromParent>

        <modTimeWindowS>0</modTimeWindowS>

        <maxConcurrentWrites>2</maxConcurrentWrites>

        <disableFsync>false</disableFsync>

        <blockPullOrder>standard</blockPullOrder>

        <copyRangeMethod>standard</copyRangeMethod>

        <caseSensitiveFS>false</caseSensitiveFS>

        <junctionsAsDirs>false</junctionsAsDirs>

        <syncOwnership>false</syncOwnership>

        <sendOwnership>false</sendOwnership>

        <syncXattrs>false</syncXattrs>

        <sendXattrs>false</sendXattrs>

    </folder>

    <device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" name="syno" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">

        <address>dynamic</address>

        <paused>false</paused>

        <autoAcceptFolders>false</autoAcceptFolders>

        <maxSendKbps>0</maxSendKbps>

        <maxRecvKbps>0</maxRecvKbps>

        <ignoredFolder time="2022-01-09T19:09:52Z" id="br63e-wyhb7" label="Foo"></ignoredFolder>

        <maxRequestKiB>0</maxRequestKiB>

        <untrusted>false</untrusted>

        <remoteGUIPort>0</remoteGUIPort>

    </device>

    <gui enabled="true" tls="false" debugging="false">

        <address>127.0.0.1:8384</address>

        <apikey>k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1</apikey>

        <theme>default</theme>

    </gui>

    <ldap></ldap>

    <options>

        <listenAddress>default</listenAddress>

        <globalAnnounceServer>default</globalAnnounceServer>

        <globalAnnounceEnabled>true</globalAnnounceEnabled>

        <localAnnounceEnabled>true</localAnnounceEnabled>

        <localAnnouncePort>21027</localAnnouncePort>

        <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>

        <maxSendKbps>0</maxSendKbps>

        <maxRecvKbps>0</maxRecvKbps>

        <reconnectionIntervalS>60</reconnectionIntervalS>

        <relaysEnabled>true</relaysEnabled>

        <relayReconnectIntervalM>10</relayReconnectIntervalM>

        <startBrowser>true</startBrowser>

        <natEnabled>true</natEnabled>

        <natLeaseMinutes>60</natLeaseMinutes>

        <natRenewalMinutes>30</natRenewalMinutes>

        <natTimeoutSeconds>10</natTimeoutSeconds>

        <urAccepted>0</urAccepted>

        <urSeen>0</urSeen>

        <urUniqueID></urUniqueID>

        <urURL>https://data.syncthing.net/newdata</urURL>

        <urPostInsecurely>false</urPostInsecurely>

        <urInitialDelayS>1800</urInitialDelayS>

        <autoUpgradeIntervalH>12</autoUpgradeIntervalH>

        <upgradeToPreReleases>false</upgradeToPreReleases>

        <keepTemporariesH>24</keepTemporariesH>

        <cacheIgnoredFiles>false</cacheIgnoredFiles>

        <progressUpdateIntervalS>5</progressUpdateIntervalS>

        <limitBandwidthInLan>false</limitBandwidthInLan>

        <minHomeDiskFree unit="%">1</minHomeDiskFree>

        <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>

        <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>

        <tempIndexMinBlocks>10</tempIndexMinBlocks>

        <unackedNotificationID>authenticationUserAndPassword</unackedNotificationID>

        <trafficClass>0</trafficClass>

        <setLowPriority>true</setLowPriority>

        <maxFolderConcurrency>0</maxFolderConcurrency>

        <crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>

        <crashReportingEnabled>true</crashReportingEnabled>

        <stunKeepaliveStartS>180</stunKeepaliveStartS>

        <stunKeepaliveMinS>20</stunKeepaliveMinS>

        <stunServer>default</stunServer>

        <databaseTuning>auto</databaseTuning>

        <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>

        <announceLANAddresses>true</announceLANAddresses>

        <sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>

        <connectionLimitEnough>0</connectionLimitEnough>

        <connectionLimitMax>0</connectionLimitMax>

        <insecureAllowOldTLSVersions>false</insecureAllowOldTLSVersions>

    </options>

    <remoteIgnoredDevice time="2022-01-09T20:02:01Z" id="5SYI2FS-LW6YAXI-JJDYETS-NDBBPIO-256MWBO-XDPXWVG-24QPUM4-PDW4UQU" name="bugger" address="192.168.0.20:22000"></remoteIgnoredDevice>

    <defaults>

        <folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">

            <filesystemType>basic</filesystemType>

            <device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" introducedBy="">

                <encryptionPassword></encryptionPassword>

            </device>

            <minDiskFree unit="%">1</minDiskFree>

            <versioning>

                <cleanupIntervalS>3600</cleanupIntervalS>

                <fsPath></fsPath>

                <fsType>basic</fsType>

            </versioning>

            <copiers>0</copiers>

            <pullerMaxPendingKiB>0</pullerMaxPendingKiB>

            <hashers>0</hashers>

            <order>random</order>

            <ignoreDelete>false</ignoreDelete>

            <scanProgressIntervalS>0</scanProgressIntervalS>

            <pullerPauseS>0</pullerPauseS>

            <maxConflicts>10</maxConflicts>

            <disableSparseFiles>false</disableSparseFiles>

            <disableTempIndexes>false</disableTempIndexes>

            <paused>false</paused>

            <weakHashThresholdPct>25</weakHashThresholdPct>

            <markerName>.stfolder</markerName>

            <copyOwnershipFromParent>false</copyOwnershipFromParent>

            <modTimeWindowS>0</modTimeWindowS>

            <maxConcurrentWrites>2</maxConcurrentWrites>

            <disableFsync>false</disableFsync>

            <blockPullOrder>standard</blockPullOrder>

            <copyRangeMethod>standard</copyRangeMethod>

            <caseSensitiveFS>false</caseSensitiveFS>

            <junctionsAsDirs>false</junctionsAsDirs>

            <syncOwnership>false</syncOwnership>

            <sendOwnership>false</sendOwnership>

            <syncXattrs>false</syncXattrs>

            <sendXattrs>false</sendXattrs>

        </folder>

        <device id="" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">

            <address>dynamic</address>

            <paused>false</paused>

            <autoAcceptFolders>false</autoAcceptFolders>

            <maxSendKbps>0</maxSendKbps>

            <maxRecvKbps>0</maxRecvKbps>

            <maxRequestKiB>0</maxRequestKiB>

            <untrusted>false</untrusted>

            <remoteGUIPort>0</remoteGUIPort>

        </device>

    </defaults>
</configuration>
```

## CONFIGURATION ELEMENT

```
<configuration version="37">

    <folder></folder>

    <device></device>

    <gui></gui>

    <ldap></ldap>

    <options></options>

    <remoteIgnoredDevice></remoteIgnoredDevice>

    <defaults></defaults>
</configuration>
```

This is the root element. It has one attribute:

version

The config version. Increments whenever a change is made that requires migration from previous formats.

It contains the elements described in the following sections and any number of this additional child element:

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.

## FOLDER ELEMENT

```
<folder id="default" label="Default Folder" path="/Users/jb/Sync/" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">

    <filesystemType>basic</filesystemType>

    <device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" introducedBy="">

        <encryptionPassword></encryptionPassword>

    </device>

    <minDiskFree unit="%">1</minDiskFree>

    <versioning>

        <cleanupIntervalS>3600</cleanupIntervalS>

        <fsPath></fsPath>

        <fsType>basic</fsType>

    </versioning>

    <copiers>0</copiers>

    <pullerMaxPendingKiB>0</pullerMaxPendingKiB>

    <hashers>0</hashers>

    <order>random</order>

    <ignoreDelete>false</ignoreDelete>

    <scanProgressIntervalS>0</scanProgressIntervalS>

    <pullerPauseS>0</pullerPauseS>

    <maxConflicts>-1</maxConflicts>

    <disableSparseFiles>false</disableSparseFiles>

    <disableTempIndexes>false</disableTempIndexes>

    <paused>false</paused>

    <weakHashThresholdPct>25</weakHashThresholdPct>

    <markerName>.stfolder</markerName>

    <copyOwnershipFromParent>false</copyOwnershipFromParent>

    <modTimeWindowS>0</modTimeWindowS>

    <maxConcurrentWrites>2</maxConcurrentWrites>

    <disableFsync>false</disableFsync>

    <blockPullOrder>standard</blockPullOrder>

    <copyRangeMethod>standard</copyRangeMethod>

    <caseSensitiveFS>false</caseSensitiveFS>

    <junctionsAsDirs>false</junctionsAsDirs>

    <syncOwnership>false</syncOwnership>

    <sendOwnership>false</sendOwnership>

    <syncXattrs>false</syncXattrs>

    <sendXattrs>false</sendXattrs>
</folder>
```

One or more folder elements must be present in the file. Each element describes one folder. The following attributes may be set on the folder element:

id (mandatory)

The folder ID, which must be unique.

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)

filesystemType

The internal file system implementation used to access this folder, detailed in a separate chapter.

path (mandatory)

The path to the directory where the folder is stored on this device; not sent to other devices.

type

Controls how the folder is handled by Syncthing. Possible values are:

sendreceive

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.

sendonly

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.

receiveonly

The folder is in “receive only” mode – it will not propagate changes to other devices.

receiveencrypted

Must be used on untrusted devices, where the data cannot be decrypted because no folder password was entered. See Untrusted (Encrypted) Devices.

rescanIntervalS

The rescan interval, in seconds. Can be set to 0 to disable when external plugins are used to trigger rescans.

fsWatcherEnabled

If set to true, this detects changes to files in the folder and scans them.

fsWatcherDelayS

The duration during which changes detected are accumulated, before a scan is scheduled (only takes effect if fsWatcherEnabled is set to true).

ignorePerms

If true, 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.

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.

The following child elements may exist:

device

These must have the id attribute and can have an introducedBy 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 skipIntroductionRemovals being false on the introducer device). All mentioned devices are those that will be sharing the folder in question. Each mentioned device must have a separate device 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.

The encryptionPassword 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.

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 unit attribute. Accepted unit values are % (percent of the disk / volume size), kB, MB, GB and TB. Set to zero to disable.

versioning

Specifies a versioning configuration. SEE ALSO:

File Versioning

copiers

hashers

The number of copier and hasher routines to use, or 0 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. :)

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.

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:

random (default)

Pull files in random order. This optimizes for balancing resources among the devices in a cluster.

alphabetic

Pull files ordered by file name alphabetically.

smallestFirst, largestFirst

Pull files ordered by file size; smallest and largest first respectively.

oldestFirst, newestFirst

Pull files ordered by modification time; oldest and newest first respectively.

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.

ignoreDelete

WARNING:

Enabling this is highly discouraged - use at your own risk. You have been warned.

When set to true, this device will pretend not to see instructions to delete files from other devices. The mechanism is described in a separate chapter.

scanProgressIntervalS

The interval in seconds with which scan progress information is sent to the GUI. Setting to 0 will cause Syncthing to use the default value of two.

pullerPauseS

Tweak for rate limiting the puller when it retries pulling files. Don’t change this unless you know what you’re doing.

maxConflicts

The maximum number of conflict copies to keep around for any given file. The default, -1, means an unlimited number. Setting this to 0 disables conflict copies altogether.

disableSparseFiles

By default, blocks containing all zeros are not written, causing files to be sparse on filesystems that support this feature. When set to true, sparse files will not be created.

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 true, such information is not exchanged for this folder.

paused

True if this folder is (temporarily) suspended.

weakHashThresholdPct

Use weak hash if more than the given percentage of the file has changed. Set to -1 to always use weak hash. Default is 25.

markerName

Name of a directory or file in the folder root to be used as How do I serve a folder from a read only filesystem?. Default is .stfolder.

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).

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 2 on Android when the folder is located on a FAT partition, and 0 otherwise.

maxConcurrentWrites

Maximum number of concurrent write operations while syncing. Increasing this might increase or decrease disk performance, depending on the underlying storage. Default is 2.

disableFsync

WARNING:

This is a known insecure option - use at your own risk.

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.

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. Available options:

standard (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.

random

The blocks of a file are downloaded in a random order. Provides great data distribution, but very taxing on spinning disk drives.

inOrder

The blocks of a file are downloaded sequentially, from start to finish. Spinning disk drive friendly, but provides no improvements to data distribution.

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.

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.

junctionsAsDirs

NTFS directory junctions are treated as ordinary directories, if this is set to true.

syncOwnership

File and directory ownership is synced when this is set to true. See syncOwnership for more information.

sendOwnership

File and directory ownership information is scanned when this is set to true. See sendOwnership for more information.

syncXattrs

File and directory extended attributes are synced when this is set to true. See syncXattrs for more information.

sendXattrs

File and directory extended attributes are scanned and sent to other devices when this is set to true. See sendXattrs for more information.

## DEVICE ELEMENT

```
<device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" name="syno" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="2CYF2WQ-AKZO2QZ-JAKWLYD-AGHMQUM-BGXUOIS-GYILW34-HJG3DUK-LRRYQAR">

    <address>dynamic</address>

    <paused>false</paused>

    <autoAcceptFolders>false</autoAcceptFolders>

    <maxSendKbps>0</maxSendKbps>

    <maxRecvKbps>0</maxRecvKbps>

    <ignoredFolder time="2022-01-09T19:09:52Z" id="br63e-wyhb7" label="Foo"></ignoredFolder>

    <maxRequestKiB>0</maxRequestKiB>

    <untrusted>false</untrusted>

    <remoteGUIPort>0</remoteGUIPort>

    <numConnections>0</numConnections>
</device>
<device id="2CYF2WQ-AKZO2QZ-JAKWLYD-AGHMQUM-BGXUOIS-GYILW34-HJG3DUK-LRRYQAR" name="syno local" compression="metadata" introducer="true" skipIntroductionRemovals="false" introducedBy="">

    <address>tcp://192.0.2.1:22001</address>

    <paused>true</paused>

    <allowedNetwork>192.168.0.0/16</allowedNetwork>

    <autoAcceptFolders>false</autoAcceptFolders>

    <maxSendKbps>100</maxSendKbps>

    <maxRecvKbps>100</maxRecvKbps>

    <maxRequestKiB>65536</maxRequestKiB>

    <untrusted>false</untrusted>

    <remoteGUIPort>8384</remoteGUIPort>

    <numConnections>0</numConnections>
</device>
```

One or more device elements must be present in the file. Each element describes a device participating in the cluster. It is customary to include a device element for the local device; Syncthing will currently add one if it is not present. The following attributes may be set on the device element:

id (mandatory)

The device ID.

name

A friendly name for the device. (optional)

compression

Whether to use protocol compression when sending messages to this device. The possible values are:

metadata

Compress metadata packets, such as index information. Metadata is usually very compression friendly so this is a good default.

always

Compress all packets, including file data. This is recommended if the folders contents are mainly compressible data such as documents or text files.

never

Disable all compression.

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. SEE ALSO:

Introducer Configuration

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.

introducedBy

Defines which device has introduced us to this device. Used only for following de-introductions.

certName

The device certificate’s common name, if it is not the default “syncthing”.

From the following child elements at least one address child must exist.

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 dynamic need a protocol specific prefix. For the TCP protocol the prefixes tcp:// (dual-stack), tcp4:// (IPv4 only) or tcp6:// (IPv6 only) can be used. The prefixes for the QUIC protocol are analogous: quic://, quic4:// and quic6:// Note that IP addresses need not use IPv4 or IPv6 prefixes; these are optional. Accepted formats are:

IPv4 address (tcp://192.0.2.42)

The default port (22000) is used.

IPv4 address and port (tcp://192.0.2.42:12345)

The address and port is used as given.

IPv6 address (tcp://[2001:db8::23:42])

The default port (22000) is used. The address must be enclosed in square brackets.

IPv6 address and port (tcp://[2001:db8::23:42]:12345)

The address and port is used as given. The address must be enclosed in square brackets.

Host name (tcp6://fileserver)

The host name will be used on the default port (22000) and connections will be attempted only via IPv6.

Host name and port (tcp://fileserver:12345)

The host name will be used on the given port and connections will be attempted via both IPv4 and IPv6, depending on name resolution.

dynamic

The word dynamic (without any prefix) means to use local and global discovery to find the device.

You can set multiple addresses and combine it with the dynamic keyword for example:

```
<device id="...">

    <address>tcp://192.0.2.1:22001</address>

    <address>quic://192.0.1.254:22000</address>

    <address>dynamic</address>
</device>
```

paused

True if synchronization with this devices is (temporarily) suspended.

allowedNetwork

If given, this restricts connections to this device to only this network. The mechanism is described in detail in a separate chapter).

autoAcceptFolders

If true, folders shared from this remote device are automatically added and synced locally under the default path. 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.

maxSendKbps

Maximum send rate to use for this device. Unit is kibibytes/second, despite the config name looking like kilobits/second.

maxRecvKbps

Maximum receive rate to use for this device. Unit is kibibytes/second, despite the config name looking like kilobits/second.

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.

maxRequestKiB

Maximum amount of data to have outstanding in requests towards this device. Unit is kibibytes.

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.

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 (Encrypted) Devices.

numConnections

The number of connections to this device. See numConnections for more information.

## GUI ELEMENT

```
<gui enabled="true" tls="false" debugging="false">

    <address>127.0.0.1:8384</address>

    <apikey>k1dnz1Dd0rzTBjjFFh7CXPnrF12C49B1</apikey>

    <theme>default</theme>
</gui>
```

There must be exactly one gui element. The GUI configuration is also used by the REST API and the Event API. The following attributes may be set on the gui element:

enabled

If not true, the GUI and API will not be started.

tls

If set to true, TLS (HTTPS) will be enforced. Non-HTTPS requests will be redirected to HTTPS. When set to false, TLS connections are still possible but not required.

debugging

This enables Profiling and additional endpoints in the REST API, see Debug Endpoints.

The following child elements may be present:

address (mandatory: Exactly one element must be present.)

Set the listen address. Allowed address formats are:

IPv4 address and port (127.0.0.1:8384)

The address and port are used as given.

IPv6 address and port ([::1]:8384)

The address and port are used as given. The address must be enclosed in square brackets.

Wildcard and port (0.0.0.0:12345, [::]:12345, :12345)

These are equivalent and will result in Syncthing listening on all interfaces via both IPv4 and IPv6.

UNIX socket location (/var/run/st.sock)

If the address is an absolute path it is interpreted as the path to a UNIX socket.

unixSocketPermissions

When address is set to a UNIX socket location, set this to an octal value to override the default permissions of the socket.

user

Set to require authentication.

password

Contains the bcrypt hash of the real password.

apikey

If set, this is the API key that enables usage of the REST interface.

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.

insecureSkipHostcheck

When the GUI / API is bound to localhost, we enforce that the Host header looks like localhost. This option bypasses that check.

insecureAllowFrameLoading

Allow rendering the GUI within an <iframe>, <frame> or <object> by not setting the X-Frame-Options: SAMEORIGIN HTTP header. This may be needed for serving the Syncthing GUI as part of a website through a proxy.

theme

The name of the theme to use.

authMode

Authentication mode to use. If not present, the authentication mode (static) is controlled by the presence of user/password fields for backward compatibility.

static

Authentication using user and password.

ldap

LDAP authentication. Requires ldap top level config section to be present.

sendBasicAuthPrompt

New in version 1.26.0.

Prior to version 1.26.0 the GUI used HTTP Basic Authorization for login, but starting in version 1.26.0 it uses an HTML form by default. Basic Authorization is still supported when the Authorization request header is present in a request, but some browsers don’t send the header unless prompted by a 401 response.

When this setting is enabled, the GUI will respond to unauthenticated requests with a 401 response prompting for Basic Authorization, so that https://user:pass@localhost style URLs continue to work in standard browsers. Other clients that always send the Authorization request header do not need this setting.

When this setting is disabled, the GUI will not send 401 responses so users won’t see browser popups prompting for username and password.

## LDAP ELEMENT

```
<ldap>

    <address>localhost:389</address>

    <bindDN>cn=%s,ou=users,dc=syncthing,dc=net</bindDN>

    <transport>nontls</transport>

    <insecureSkipVerify>false</insecureSkipVerify>
</ldap>
```

The ldap element contains LDAP configuration options. The mechanism is described in detail under LDAP Authentication.

address (mandatory)

LDAP server address (server:port).

bindDN (mandatory)

BindDN for user authentication. Special %s variable should be used to pass username to LDAP.

transport

nontls

Non secure connection.

tls

TLS secured connection.

starttls

StartTLS connection mode.

insecureSkipVerify

Skip verification (true or false).

searchBaseDN

Base DN for user searches.

searchFilter

Search filter for user searches.

## OPTIONS ELEMENT

```
<options>

    <listenAddress>default</listenAddress>

    <globalAnnounceServer>default</globalAnnounceServer>

    <globalAnnounceEnabled>true</globalAnnounceEnabled>

    <localAnnounceEnabled>true</localAnnounceEnabled>

    <localAnnouncePort>21027</localAnnouncePort>

    <localAnnounceMCAddr>[ff12::8384]:21027</localAnnounceMCAddr>

    <maxSendKbps>0</maxSendKbps>

    <maxRecvKbps>0</maxRecvKbps>

    <reconnectionIntervalS>60</reconnectionIntervalS>

    <relaysEnabled>true</relaysEnabled>

    <relayReconnectIntervalM>10</relayReconnectIntervalM>

    <startBrowser>true</startBrowser>

    <natEnabled>true</natEnabled>

    <natLeaseMinutes>60</natLeaseMinutes>

    <natRenewalMinutes>30</natRenewalMinutes>

    <natTimeoutSeconds>10</natTimeoutSeconds>

    <urAccepted>0</urAccepted>

    <urSeen>0</urSeen>

    <urUniqueID></urUniqueID>

    <urURL>https://data.syncthing.net/newdata</urURL>

    <urPostInsecurely>false</urPostInsecurely>

    <urInitialDelayS>1800</urInitialDelayS>

    <autoUpgradeIntervalH>12</autoUpgradeIntervalH>

    <upgradeToPreReleases>false</upgradeToPreReleases>

    <keepTemporariesH>24</keepTemporariesH>

    <cacheIgnoredFiles>false</cacheIgnoredFiles>

    <progressUpdateIntervalS>5</progressUpdateIntervalS>

    <limitBandwidthInLan>false</limitBandwidthInLan>

    <minHomeDiskFree unit="%">1</minHomeDiskFree>

    <releasesURL>https://upgrades.syncthing.net/meta.json</releasesURL>

    <overwriteRemoteDeviceNamesOnConnect>false</overwriteRemoteDeviceNamesOnConnect>

    <tempIndexMinBlocks>10</tempIndexMinBlocks>

    <unackedNotificationID>authenticationUserAndPassword</unackedNotificationID>

    <trafficClass>0</trafficClass>

    <setLowPriority>true</setLowPriority>

    <maxFolderConcurrency>0</maxFolderConcurrency>

    <crashReportingURL>https://crash.syncthing.net/newcrash</crashReportingURL>

    <crashReportingEnabled>true</crashReportingEnabled>

    <stunKeepaliveStartS>180</stunKeepaliveStartS>

    <stunKeepaliveMinS>20</stunKeepaliveMinS>

    <stunServer>default</stunServer>

    <databaseTuning>auto</databaseTuning>

    <maxConcurrentIncomingRequestKiB>0</maxConcurrentIncomingRequestKiB>

    <announceLANAddresses>true</announceLANAddresses>

    <sendFullIndexOnUpgrade>false</sendFullIndexOnUpgrade>

    <connectionLimitEnough>0</connectionLimitEnough>

    <connectionLimitMax>0</connectionLimitMax>

    <insecureAllowOldTLSVersions>false</insecureAllowOldTLSVersions>
</options>
```

The options element contains all other global configuration options.

listenAddress

The listen address for incoming sync connections. See Listen Addresses for the allowed syntax.

globalAnnounceServer

A URI to a global announce (discovery) server, or the word default to include the default servers. Any number of globalAnnounceServer elements may be present. The syntax for non-default entries is that of an HTTP or HTTPS URL. A number of options may be added as query options to the URL: insecure to prevent certificate validation (required for HTTP URLs) and id=<device ID> to perform certificate pinning. The device ID to use is printed by the discovery server on startup.

globalAnnounceEnabled

Whether to announce this device to the global announce (discovery) server, and also use it to look up other devices.

localAnnounceEnabled

Whether to send announcements to the local LAN, also use such announcements to find other devices.

localAnnouncePort

The port on which to listen and send IPv4 broadcast announcements to.

localAnnounceMCAddr

The group address and port to join and send IPv6 multicast announcements on.

maxSendKbps

Outgoing data rate limit, in kibibytes per second.

maxRecvKbps

Incoming data rate limits, in kibibytes per second.

reconnectionIntervalS

The number of seconds to wait between each attempt to connect to currently unconnected devices.

relaysEnabled

When true, relays will be connected to and potentially used for device to device connections.

relayReconnectIntervalM

Sets the interval, in minutes, between relay reconnect attempts.

startBrowser

Whether to attempt to start a browser to show the GUI when Syncthing starts.

natEnabled

Whether to attempt to perform a UPnP and NAT-PMP port mapping for incoming sync connections.

natLeaseMinutes

Request a lease for this many minutes; zero to request a permanent lease.

natRenewalMinutes

Attempt to renew the lease after this many minutes.

natTimeoutSeconds

When scanning for UPnP devices, wait this long for responses.

urAccepted

Whether the user has accepted to submit anonymous usage data. The default, 0, mean the user has not made a choice, and Syncthing will ask at some point in the future. -1 means no, a number above zero means that that version of usage reporting has been accepted.

urSeen

The highest usage reporting version that has already been shown in the web GUI.

urUniqueID

The unique ID sent together with the usage report. Generated when usage reporting is enabled.

urURL

The URL to post usage report data to, when enabled.

urPostInsecurely

When true, the UR URL can be http instead of https, or have a self-signed certificate. The default is false.

urInitialDelayS

The time to wait from startup for the first usage report to be sent. Allows the system to stabilize before reporting statistics.

autoUpgradeIntervalH

Check for a newer version after this many hours. Set to 0 to disable automatic upgrades.

upgradeToPreReleases

If true, automatic upgrades include release candidates (see Versions & Releases).

keepTemporariesH

Keep temporary failed transfers for this many hours. While the temporaries are kept, the data they contain need not be transferred again.

cacheIgnoredFiles

Whether to cache the results of ignore pattern evaluation. Performance at the price of memory. Defaults to false as the cost for evaluating ignores is usually not significant.

progressUpdateIntervalS

How often in seconds the progress of ongoing downloads is made available to the GUI. Set to -1 to disable. Note that when disabled, the detailed sync progress for Out of Sync Items which shows how much of each file has been reused, copied, and downloaded will not work.

limitBandwidthInLan

Whether to apply bandwidth limits to devices in the same broadcast domain as the local device.

minHomeDiskFree

The minimum required free space that should be available on the partition holding the configuration and index. The element content is interpreted according to the given unit attribute. Accepted unit values are % (percent of the disk / volume size), kB, MB, GB and TB. Set to zero to disable.

releasesURL

The URL from which release information is loaded, for automatic upgrades.

alwaysLocalNet

Network that should be considered as local given in CIDR notation.

overwriteRemoteDeviceNamesOnConnect

If set, device names will always be overwritten with the name given by remote on each connection. By default, the name that the remote device announces will only be adopted when a name has not already been set.

tempIndexMinBlocks

When exchanging index information for incomplete transfers, only take into account files that have at least this many blocks.

unackedNotificationID

ID of a notification to be displayed in the web GUI. Will be removed once the user acknowledged it (e.g. an transition notice on an upgrade).

trafficClass

Specify a type of service (TOS)/traffic class of outgoing packets.

stunServer

Server to be used for STUN, given as ip:port. The keyword default gets expanded to stun.callwithus.com:3478, stun.counterpath.com:3478, stun.counterpath.net:3478, stun.ekiga.net:3478, stun.ideasip.com:3478, stun.internetcalls.com:3478, stun.schlund.de:3478, stun.sipgate.net:10000, stun.sipgate.net:3478, stun.voip.aebc.com:3478, stun.voiparound.com:3478, stun.voipbuster.com:3478, stun.voipstunt.com:3478 and stun.xten.com:3478 (this is the default).

stunKeepaliveStartS

Interval in seconds between contacting a STUN server to maintain NAT mapping. Default is 24 and you can set it to 0 to disable contacting STUN servers. The interval is automatically reduced if needed, down to a minimum of stunKeepaliveMinS.

stunKeepaliveMinS

Minimum for the stunKeepaliveStartS interval, in seconds.

setLowPriority

Syncthing will attempt to lower its process priority at startup. Specifically: on Linux, set itself to a separate process group, set the niceness level of that process group to nine and the I/O priority to best effort level five; on other Unixes, set the process niceness level to nine; on Windows, set the process priority class to below normal. To disable this behavior, for example to control process priority yourself as part of launching Syncthing, set this option to false.

maxFolderConcurrency

This option controls how many folders may concurrently be in I/O-intensive operations such as syncing or scanning. The mechanism is described in detail in a separate chapter.

crashReportingURL

Server URL where automatic crash reports will be sent if enabled.

crashReportingEnabled

Switch to opt out from the automatic crash reporting feature. Set false to keep Syncthing from sending panic logs on serious troubles. Defaults to true, to help the developers troubleshoot.

databaseTuning

Controls how Syncthing uses the backend key-value database that stores the index data and other persistent data it needs. The available options and implications are explained in a separate chapter.

maxConcurrentIncomingRequestKiB

This limits how many bytes we have “in the air” in the form of response data being read and processed.

announceLANAddresses

Enable (the default) or disable announcing private (RFC1918) LAN IP addresses to global discovery.

sendFullIndexOnUpgrade

Controls whether all index data is resent when an upgrade has happened, equivalent to starting Syncthing with --reset-deltas. This used to be the default behavior in older versions, but is mainly useful as a troubleshooting step and causes high database churn. The default is now false.

featureFlag

Feature flags are simple strings that, when added to the configuration, may unleash unfinished or still-in-development features to allow early user testing. Any supported value will be separately announced with the feature, so that regular users do not enable it by accident.

connectionLimitEnough

The number of connections at which we stop trying to connect to more devices, zero meaning no limit. Does not affect incoming connections. The mechanism is described in detail in a separate chapter.

connectionLimitMax

The maximum number of connections which we will allow in total, zero meaning no limit. Affects incoming connections and prevents attempting outgoing connections. The mechanism is described in detail in a separate chapter.

insecureAllowOldTLSVersions

Only for compatibility with old versions of Syncthing on remote devices, as detailed in insecureAllowOldTLSVersions.

## DEFAULTS ELEMENT

```
<defaults>

    <folder id="" label="" path="~" type="sendreceive" rescanIntervalS="3600" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">

        <filesystemType>basic</filesystemType>

        <device id="S7UKX27-GI7ZTXS-GC6RKUA-7AJGZ44-C6NAYEB-HSKTJQK-KJHU2NO-CWV7EQW" introducedBy="">

            <encryptionPassword></encryptionPassword>

        </device>

        <minDiskFree unit="%">1</minDiskFree>

        <versioning>

            <cleanupIntervalS>3600</cleanupIntervalS>

            <fsPath></fsPath>

            <fsType>basic</fsType>

        </versioning>

        <copiers>0</copiers>

        <pullerMaxPendingKiB>0</pullerMaxPendingKiB>

        <hashers>0</hashers>

        <order>random</order>

        <ignoreDelete>false</ignoreDelete>

        <scanProgressIntervalS>0</scanProgressIntervalS>

        <pullerPauseS>0</pullerPauseS>

        <maxConflicts>10</maxConflicts>

        <disableSparseFiles>false</disableSparseFiles>

        <disableTempIndexes>false</disableTempIndexes>

        <paused>false</paused>

        <weakHashThresholdPct>25</weakHashThresholdPct>

        <markerName>.stfolder</markerName>

        <copyOwnershipFromParent>false</copyOwnershipFromParent>

        <modTimeWindowS>0</modTimeWindowS>

        <maxConcurrentWrites>2</maxConcurrentWrites>

        <disableFsync>false</disableFsync>

        <blockPullOrder>standard</blockPullOrder>

        <copyRangeMethod>standard</copyRangeMethod>

        <caseSensitiveFS>false</caseSensitiveFS>

        <junctionsAsDirs>false</junctionsAsDirs>

    </folder>

    <device id="" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">

        <address>dynamic</address>

        <paused>false</paused>

        <autoAcceptFolders>false</autoAcceptFolders>

        <maxSendKbps>0</maxSendKbps>

        <maxRecvKbps>0</maxRecvKbps>

        <maxRequestKiB>0</maxRequestKiB>

        <untrusted>false</untrusted>

        <remoteGUIPort>0</remoteGUIPort>

        <numConnections>0</numConnections>

    </device>

    <ignores>

        <line>!foo2</line>

        <line>// comment</line>

        <line>(?d).DS_Store</line>

        <line>*2</line>

        <line>qu*</line>

    </ignores>
</defaults>
```

The defaults element describes a template for newly added device and folder options. These will be used when adding a new remote device or folder, either through the GUI or the command line interface. The following child elements can be present in the defaults element:

device

Template for a device element, with the same internal structure. Any fields here will be used for a newly added remote device. The id attribute is meaningless in this context.

folder

Template for a folder element, with the same internal structure. Any fields here will be used for a newly added shared folder. The id attribute is meaningless in this context. The UI will propose to create new folders at the path given in the path attribute (used to be defaultFolderPath under options). It also applies to folders automatically accepted from a remote device.

Even sharing with other remote devices can be done in the template by including the appropriate folder.device element underneath.

ignores

New in version 1.19.0.

Template for the ignore patterns applied to new folders. These are copied to the .stignore file when a folder is automatically accepted from a remote device. The GUI uses them to pre-fill the respective field when adding a new folder as well. In XML, each pattern line is represented as by a <line> element.

### Listen Addresses
The following address types are accepted in sync protocol listen addresses. If you want Syncthing to listen on multiple addresses, you can either: add multiple <listenAddress> tags in the configuration file or enter several addresses separated by commas in the GUI.

Default listen addresses (default)

This is equivalent to tcp://0.0.0.0:22000, quic://0.0.0.0:22000 and dynamic+https://relays.syncthing.net/endpoint.

TCP wildcard and port (tcp://0.0.0.0:22000, tcp://:22000)

These are equivalent and will result in Syncthing listening on all interfaces, IPv4 and IPv6, on the specified port.

TCP IPv4 wildcard and port (tcp4://0.0.0.0:22000, tcp4://:22000)

These are equivalent and will result in Syncthing listening on all interfaces via IPv4 only.

TCP IPv4 address and port (tcp4://192.0.2.1:22000)

This results in Syncthing listening on the specified address and port, IPv4 only.

TCP IPv6 wildcard and port (tcp6://[::]:22000, tcp6://:22000)

These are equivalent and will result in Syncthing listening on all interfaces via IPv6 only.

TCP IPv6 address and port (tcp6://[2001:db8::42]:22000)

This results in Syncthing listening on the specified address and port, IPv6 only.

QUIC address and port (e.g. quic://0.0.0.0:22000)

Syntax is the same as for TCP, also quic4 and quic6 can be used.

Static relay address (relay://192.0.2.42:22067?id=abcd123...)

Syncthing will connect to and listen for incoming connections via the specified relay address.

### Todo
Document available URL parameters.

Dynamic relay pool (dynamic+https://192.0.2.42/relays)

Syncthing will fetch the specified HTTPS URL, parse it for a JSON payload describing relays, select a relay from the available ones and listen via that as if specified as a static relay above.

### Todo
Document available URL parameters.

## SYNCING CONFIGURATION FILES
Syncing configuration files between devices (such that multiple devices are using the same configuration files) can cause issues. This is easy to do accidentally if you sync your home folder between devices. A common symptom of syncing configuration files is two devices ending up with the same Device ID.

If you want to use Syncthing to backup your configuration files, it is recommended that the files you are backing up are in a Send Only Folder to prevent other devices from overwriting the per device configuration. The folder on the remote device(s) should not be used as configuration for the remote devices.

If you’d like to sync your home folder in non-send only mode, you may add the folder that stores the configuration files to the ignore list. If you’d also like to backup your configuration files, add another folder in send only mode for just the configuration folder.

## AUTHOR
The Syncthing Authors

## COPYRIGHT
2014-2019, The Syncthing Authors


syncthing-stignore

title: syncthing-stignore(5)

text:
# syncthing-stignore(5)

## NAME
syncthing-stignore - Prevent files from being synchronized to other nodes

## SYNOPSIS

```
.stignore
```

## DESCRIPTION
If some files should not be synchronized to (or from) other devices, a file called .stignore can be created containing file patterns to ignore. The .stignore file must be placed in the root of the synced folder (files in other locations are not applied). The .stignore file itself will never be synced to other devices, although it can #include files that are synchronized between devices. All patterns are relative to the synced folder root. The contents of the .stignore file must be UTF-8 encoded.

NOTE:

Note that ignored files can block removal of an otherwise empty directory. See below for the (?d) prefix to allow deletion of ignored files.

## PATTERNS
The .stignore file contains a list of file or path patterns. The first pattern that matches will decide the fate of a given file.

- Regular file names match themselves, i.e. the pattern foo matches the files foo, subdir/foo as well as any directory named foo. Spaces are treated as regular characters, except for leading and trailing spaces, which are automatically trimmed.

- Asterisk (*) matches zero or more characters in a filename, but does not match the directory separator. te*ne matches telephone, subdir/telephone but not tele/phone.

- Double asterisk (**) matches as above, but also directory separators. te**ne matches telephone, subdir/telephone and tele/sub/dir/phone.

- Question mark (?) matches a single character that is not the directory separator. te??st matches tebest but not teb/st or test.

- Square brackets ([]) denote a character range: [a-z] matches any lower case character.

- Curly brackets ({}) denote a set of comma separated alternatives: {banana,pineapple} matches either banana or pineapple.

- Backslash (\) “escapes” a special character so that it loses its special meaning. For example, \{banana\} matches {banana} exactly and does not denote a set of alternatives as above. NOTE:

Escaped characters are not supported on Windows, where \ is the path separator. If you still need to match files that have square or curly brackets in their names, one possible workaround is to replace them with ?, which will then match any character. For example, you can type ?banana? to match both [banana] and {banana}, and so on.

- A pattern beginning with / matches in the root of the synced folder only. /foo matches foo but not subdir/foo.

- A pattern beginning with #include results in loading patterns from the named file. It is an error for a file to not exist or be included more than once. Note that while this can be used to include patterns from a file in a subdirectory, the patterns themselves are still relative to the synced folder root. Example: #include more-patterns.txt. Any #include directives inside a file loaded by #include require paths specified relative to the directory containing the loaded file, rather than the synchronised root directory.

- A pattern beginning with a ! prefix negates the pattern: matching files are included (that is, not ignored). This can be used to override more general patterns that follow. NOTE:

Negated patterns that can match items below the folder root will cause Syncthing to traverse otherwise ignored directories. If the watcher is enabled, those directories will also be watched. Directories ignored before the first negated pattern can however be safely skipped, since the first matching pattern wins. For example:

```
/foo
/bar
!baz
*
```

The directories foo and bar will be entirely ignored. However any other directories present must be scanned entirely to find any items named baz, despite the fact that they will be ignored due to the *. As a special case, top-level rooted patterns (e.g. !/foo) do not cause this behaviour:

```
!/baz
*
```

In this case, only the directory baz will be scanned, since everything else is ignored by the * pattern.

- A pattern beginning with a (?i) prefix enables case-insensitive pattern matching. (?i)test matches test, TEST and tEsT. The (?i) prefix can be combined with other patterns, for example the pattern (?i)!picture*.png indicates that Picture1.PNG should be synchronized. On Mac OS and Windows, patterns are always case-insensitive.

- A pattern beginning with a (?d) prefix enables removal of these files if they are preventing directory deletion. This prefix should be used by any OS generated files which you are happy to be removed. NOTE:

Prefixes can be specified in any order (e.g. (?d)(?i)), but cannot be combined in a single pair of parentheses like (?di).

•

A line beginning with // is a comment and has no effect. The same double slashes in any other place are interpreted literally, e.g. trying to do file // comment will make Syncthing look for a file called file // comment.

## EXAMPLE
Given a directory layout starting at the synced folder’s root:

```
.DS_Store
.stignore
foo
foofoo
bar/

    baz

    quux

    quuz
bar2/

    baz

    frobble
My Pictures/

    Img15.PNG
```

and an .stignore file with the contents:

```
(?d).DS_Store
!frobble
!quuz
foo
*2
qu*
(?i)my pictures
```

all files and directories called “foo”, ending in a “2” or starting with “qu” will be ignored. The end result becomes:

```
.DS_Store     # ignored, will be deleted if gets in the way of parent directory removal
foo           # ignored, matches "foo"
foofoo        # synced, does not match "foo" but would match "foo*" or "*foo"
bar/          # synced

    baz       # synced

    quux      # ignored, matches "qu*"

    quuz      # synced, matches "qu*" but is excluded by the preceding "!quuz"
bar2/         # synced, despite matching "*2" due to child frobble

    baz       # ignored, due to parent being ignored

    frobble   # synced, due to "!frobble"
My Pictures/  # ignored, matched case insensitive "(?i)my pictures" pattern

    Img15.PNG # ignored, due to parent being ignored
```

NOTE:

Please note that directory patterns ending with a slash some/directory/ matches the content of the directory, but not the directory itself. If you want the pattern to match the directory and its content, make sure it does not have a / at the end of the pattern.

New in version 1.19.0: Default patterns can be configured which will take effect when automatically accepting a folder from a remote device. The GUI suggests same the patterns when adding a folder manually. In either case, the .stignore file is created with these defaults if none is present yet.

## AUTHOR
The Syncthing Authors

## COPYRIGHT
2014-2019, The Syncthing Authors


syslog-ng.conf

package: syslog-ng

title: syslog-ng.conf(5)

summary: syslog\-ng configuration file

text:
# syslog-ng.conf(5)

## NAME
syslog-ng.conf - syslog-ng configuration file

## SYNOPSIS
syslog-ng.conf

## DESCRIPTION
This manual page is only an abstract, for the complete documentation of syslog-ng, see The Administrator Guide[1] or the official syslog-ng website[2].

The application is a flexible and highly scalable system logging application. Typically, syslog-ng is used to manage log messages and implement centralized logging, where the aim is to collect the log messages of several devices on a single, central log server. The different devices - called syslog-ng clients - all run syslog-ng, and collect the log messages from the various applications, files, and other sources. The clients send all important log messages to the remote syslog-ng server, where the server sorts and stores them.

## BASIC CONCEPTS OF
The syslog-ng application reads incoming messages and forwards them to the selected destinations. The syslog-ng application can receive messages from files, remote hosts, and other sources.

Log messages enter syslog-ng in one of the defined sources, and are sent to one or more destinations.

Sources and destinations are independent objects, log paths define what syslog-ng does with a message, connecting the sources to the destinations. A log path consists of one or more sources and one or more destinations: messages arriving from a source are sent to every destination listed in the log path. A log path defined in syslog-ng is called a log statement.

Optionally, log paths can include filters. Filters are rules that select only certain messages, for example, selecting only messages sent by a specific application. If a log path includes filters, syslog-ng sends only the messages satisfying the filter rules to the destinations set in the log path.

Other optional elements that can appear in log statements are parsers and rewriting rules. Parsers segment messages into different fields to help processing the messages, while rewrite rules modify the messages by adding, replacing, or removing parts of the messages.

## CONFIGURING SYSLOG-NG
•The main body of the configuration file consists of object definitions: sources, destinations, logpaths define which log message are received and where they are sent. All identifiers, option names and attributes, and any other strings used in the syslog-ng configuration file are case sensitive. Object definitions (also called statements) have the following syntax:

```
type-of-the-object identifier-of-the-object {<parameters>};
```

•Type of the object: One of source, destination, log, filter, parser, rewrite rule, or template.

•Identifier of the object: A unique name identifying the object. When using a reserved word as an identifier, enclose the identifier in quotation marks. All identifiers, attributes, and any other strings used in the syslog-ng configuration file are case sensitive.

Tip

Use identifiers that refer to the type of the object they identify. For example, prefix source objects with s_, destinations with d_, and so on.

Note

Repeating a definition of an object (that is, defining the same object with the same id more than once) is not allowed, unless you use the @define allow-config-dups 1 definition in the configuration file.

•Parameters: The parameters of the object, enclosed in braces {parameters}.

•Semicolon: Object definitions end with a semicolon (;).

For example, the following line defines a source and calls it s_internal.

```
source s_internal { internal(); };
```

The object can be later referenced in other statements using its ID, for example, the previous source is used as a parameter of the following log statement:

```
log { source(s_internal); destination(d_file); };
```

•The parameters and options within a statement are similar to function calls of the C programming language: the name of the option followed by a list of its parameters enclosed within brackets and terminated with a semicolon.

```
option(parameter1, parameter2); option2(parameter1, parameter2);
```

For example, the file() driver in the following source statement has three options: the filename (/var/log/apache/access.log), follow-freq(), and flags(). The follow-freq() option also has a parameter, while the flags() option has two parameters.

```
source s_tail { file("/var/log/apache/access.log"

    follow-freq(1) flags(no-parse, validate-utf8)); };
```

Objects may have required and optional parameters. Required parameters are positional, meaning that they must be specified in a defined order. Optional parameters can be specified in any order using the option(value) format. If a parameter (optional or required) is not specified, its default value is used. The parameters and their default values are listed in the reference section of the particular object.

Example 1. Using required and optional parameters The unix-stream() source driver has a single required argument: the name of the socket to listen on. Optional parameters follow the socket name in any order, so the following source definitions have the same effect:

```
source s_demo_stream1 {

        unix-stream("<path-to-socket>" max-connections(10) group(log)); };
source s_demo_stream2 {

        unix-stream("<path-to-socket>" group(log) max-connections(10)); };
```

•Some options are global options, or can be set globally, for example, whether should use DNS resolution to resolve IP addresses. Global options are detailed in ???.

```
options { use-dns(no); };
```

•Objects can be used before definition.

•Objects can be defined inline as well. This is useful if you use the object only once (for example, a filter). For details, see ???.

•To add comments to the configuration file, start a line with # and write your comments. These lines are ignored by syslog-ng.

```
# Comment: This is a stream source
source s_demo_stream {

        unix-stream("<path-to-socket>" max-connections(10) group(log)); };
```

The syntax of log statements is as follows:

```
log {

    source(s1); source(s2); ...

    optional_element(filter1|parser1|rewrite1);

    optional_element(filter2|parser2|rewrite2);

    ...

    destination(d1); destination(d2); ...

    flags(flag1[, flag2...]);
};
```

The following log statement sends all messages arriving to the localhost to a remote server.

```
source s_localhost { network(ip(127.0.0.1) port(1999)); };
destination d_tcp { network("10.1.2.3" port(1999) localport(999)); };
log { source(s_localhost); destination(d_tcp); };
```

The syslog-ng application has a number of global options governing DNS usage, the timestamp format used, and other general points. Each option may have parameters, similarly to driver specifications. To set global options, add an option statement to the syslog-ng configuration file using the following syntax:

```
options { option1(params); option2(params); ... };
```

Example 2. Using global options

To disable domain name resolving, add the following line to the syslog-ng configuration file:

```
options { use-dns(no); };
```

The sources, destinations, and filters available in syslog-ng are listed below. For details, see The syslog-ng Administrator Guide.

Table 1. Source drivers available in syslog-ng

Name

Description

file()

Opens the specified file and reads messages.

internal()

Messages generated internally in syslog-ng.

network()

Receives messages from remote hosts using the BSD-syslog protocol over IPv4 and IPv6. Supports the TCP, UDP, and TLS network protocols.

pipe()

Opens the specified named pipe and reads messages.

program()

Opens the specified application and reads messages from its standard output.

sun-stream(), sun-streams()

Opens the specified STREAMS device on Solaris systems and reads incoming messages.

syslog()

Listens for incoming messages using the new IETF-standard syslog protocol.

system()

Automatically detects which platform is running on, and collects the native log messages of that platform.

systemd-journal()

Collects messages directly from the journal of platforms that use systemd.

systemd-syslog()

Collects messages from the journal using a socket on platforms that use systemd.

unix-dgram()

Opens the specified unix socket in SOCK_DGRAM mode and listens for incoming messages.

unix-stream()

Opens the specified unix socket in SOCK_STREAM mode and listens for incoming messages.

Table 2. Destination drivers available in syslog-ng

Name

Description

elasticsearch2

Sends messages to an Elasticsearch server. The elasticsearch2 driver supports Elasticsearch version 2 and newer.

file()

Writes messages to the specified file.

hdfs()

Sends messages into a file on a Hadoop Distributed File System (HDFS)[3] node.

kafka()

Publishes log messages to the Apache Kafka[4] message bus, where subscribers can access them.

loggly()

Sends log messages to the Loggly[5] Logging-as-a-Service provider.

logmatic()

Sends log messages to the Logmatic.io[6] Logging-as-a-Service provider.

mongodb()

Sends messages to a MongoDB[7] database.

network()

Sends messages to a remote host using the BSD-syslog protocol over IPv4 and IPv6. Supports the TCP, UDP, and TLS network protocols.

pipe()

Writes messages to the specified named pipe.

program()

Forks and launches the specified program, and sends messages to its standard input.

sql()

Sends messages into an SQL database. In addition to the standard syslog-ng packages, the sql() destination requires database-specific packages to be installed. Refer to the section appropriate for your platform in ???.

syslog()

Sends messages to the specified remote host using the IETF-syslog protocol. The IETF standard supports message transport using the UDP, TCP, and TLS networking protocols.

unix-dgram()

Sends messages to the specified unix socket in SOCK_DGRAM style (BSD).

unix-stream()

Sends messages to the specified unix socket in SOCK_STREAM style (Linux).

usertty()

Sends messages to the terminal of the specified user, if the user is logged in.

Table 3. Filter functions available in

Name

Description

facility()

Filter messages based on the sending facility.

filter()

Call another filter function.

host()

Filter messages based on the sending host.

inlist()

File-based whitelisting and blacklisting.

level() or priority()

Filter messages based on their priority.

match()

Use a regular expression to filter messages based on a specified header or content field.

message()

Use a regular expression to filter messages based on their content.

netmask()

Filter messages based on the IP address of the sending host.

program()

Filter messages based on the sending application.

source()

Select messages of the specified source statement.

tags()

Select messages having the specified tag.

## FILES
/usr/

/etc/syslog-ng/syslog-ng.conf

## SEE ALSO
syslog-ng(8)

Note

For the detailed documentation of see The 3.32 Administrator Guide[8]

If you experience any problems or need help with syslog-ng, visit the syslog-ng mailing list[9].

For news and notifications about of syslog-ng, visit the syslog-ng blogs[10].

## AUTHOR
This manual page was written by the Balabit Documentation Team <documentation@balabit.com>.

## NOTES
1.

The Administrator Guide

https://www.balabit.com/support/documentation/

2.

the official syslog-ng website

https://www.balabit.com/log-management

3.

Hadoop Distributed File System (HDFS)

http://hadoop.apache.org/

4.

Apache Kafka

http://kafka.apache.org

5.

Loggly

https://www.loggly.com/

6.

Logmatic.io

https://logmatic.io/

7.

MongoDB

https://www.mongodb.com

8.

The 3.32 Administrator Guide

https://www.balabit.com/documents/syslog-ng-ose-latest-guides/en/syslog-ng-ose-guide-admin/html/index.html

9.

syslog-ng mailing list

https://lists.balabit.hu/mailman/listinfo/syslog-ng

10.

syslog-ng blogs

https://syslog-ng.org/blogs/


syslog.conf

package: syslogd

title: syslog.conf(5)

summary: syslogd(8) configuration file

text:
# syslog.conf(5)

## NAME
syslog.conf - syslogd(8) configuration file

## DESCRIPTION
The syslog.conf file is the main configuration file for syslogd(8) which logs system messages on *nix systems. This file specifies rules for logging. For special features see the sysklogd(8) manpage.

Every rule consists of two fields, a selector field and an action field. These two fields are separated by one or more spaces or tabs. The selector field specifies a pattern of facilities and priorities belonging to the specified action.

Lines starting with a hash mark (``#'') and empty lines are ignored.

This variant of syslogd is able to understand a slightly extended syntax compared to the original BSD syslogd. One rule may be divided into several lines if the leading line is terminated with an backslash (``\'').

### Directives
The log_format is a directive to define the format of the logged messages. By default, the message format is:

```
log_format: %t %h %m
```

### Format of the format string
The format string is a character string. The format string is composed of zero or more directives: ordinary characters (not %), which are copied unchanged to the output stream; and conversion specifications, each of which results in fetching the entire message or parts of it. Each conversion specification is introduced by the character %, and ends with a specifier.

### Specifiers
The specifiers and their meanings are:

\\

backslash character.

\b

backspace character,

\f

form feed character.

\n

new line character.

\r

carriage return character.

\t

horizontal tab character.

%%

a single ``%'' character.

%t

time of last occurrence.

%h

host from which this message.

%T

message tag if any.

%C

message content.

%m

message text. According to section 4.1.3 of RFC 3164, a message has two fields known as the TAG field and the CONTENT field. The value in the TAG field will be the name of the program or process that generated the message. The CONTENT contains the details of the message. Ths ``%m'' specifier is just a combination of two other specifiers: ``%T: %C''.

%u

user who sent the message.

%g

user group who sent the message.

%p

PID of the process that sent the message.

%H

hash of current message + hash of previous message. This hash is the address of this message and all others until the server starts. Each time the server starts, it starts creating a checksum chain for each log file. On restart, the chain starts with an empty checksum.

The %u, %g, and %p specifiers are only meaningful if the message was received via a UNIX domain socket. In all other cases, their values will be zero.

## SELECTORS
The selector field consists of two parts, a facility and a priority, separated by a period (``.''). Both parts are case insensitive and can also be specified as decimal numbers corresponding to the definitions in /usr/include/syslog.h. It is safer to use symbolic names rather than decimal numbers. Both facilities and priorities are described in syslog(3). The names mentioned below correspond to the similar LOG_-values in /usr/include/syslog.h.

The facility is one of the following keywords: auth, authpriv, cron, daemon, ftp, kern, lpr, mail, mark, news, security (same as auth), syslog, user, uucp and local0 through local7. The keyword security is deprecated and mark is only for internal use and therefore should not be used in applications. The facility specifies the subsystem that produced the message, e.g. all mail programs log with the mail facility (LOG_MAIL) if they log using syslog.

In most cases anyone can log to any facility, so we rely on convention for the correct facility to be chosen. However, generally only the kernel can log to the "kern" facility. This is because the implementation of openlog() and syslog() in glibc does not allow logging to the "kern" facility. Klogd circumvents this restriction when logging to syslogd by reimplementing those functions itself.

The priority is one of the following keywords, in ascending order: debug, info, notice, warning, warn (same as warning), err, error (same as err), crit, alert, emerg, panic (same as emerg). The keywords warn, error and panic are deprecated and should not be used anymore. The priority defines the severity of the message

The behavior of the original BSD syslogd is that all messages of the specified priority and higher are logged according to the given action. This syslogd(8) behaves the same, but has some extensions.

In addition to the above mentioned names the syslogd(8) understands the following extensions: An asterisk (``*'') stands for all facilities or all priorities, depending on where it is used (before or after the period). The keyword none stands for no priority of the given facility.

Multiple facilities may be specified for a single priority pattern in one statement using the comma (``,'') operator to separate the facilities. You may specify as many facilities as you want. Please note that only the facility part from such a statement is taken, a priority part would be ignored.

Multiple selectors may be specified for a single action using the semicolon (``;'') separator. Selectors are processed from left to right, with each selector being able to overwrite preceding ones. Using this behavior you are able to exclude some priorities from the pattern.

This syslogd(8) has a syntax extension to the original BSD source, which makes its use more intuitive. You may precede every priority with an equation sign (``='') to specify that syslogd should only refer to this single priority and not this priority and all higher priorities.

You may also precide the priority with an exclamation mark (``!'') if you want syslogd to ignore this priority and all higher priorities. You may even use both, the exclamation mark and the equation sign if you want syslogd to ignore only this single priority. If you use both extensions than the exclamation mark must occur before the equation sign, just use it intuitively.

## ACTIONS
The action field of a rule describes the abstract term ``logfile''. A ``logfile'' need not to be a real file, btw. The syslogd(8) provides the following actions.

### Regular File
Typically messages are logged to real files. The filename is specified with an absolute pathname.

You may prefix each entry with a minus sign (``-'') to avoid syncing the file after each log message. Note that you might lose information if the system crashes right after a write attempt. Nevertheless this might give you back some performance, especially if you run programs that use logging in a very verbose manner.

### Named Pipes
This version of syslogd(8) has support for logging output to named pipes (fifos). A fifo or named pipe can be used as a destination for log messages by prepending a pipe symbol (``|'') to the name of the file. This is handy for debugging. Note that the fifo must be created with the mkfifo(1) command before syslogd(8) is started.

### Terminal and Console
If the file you specified is a tty, special tty-handling is done, same with /dev/console.

### Remote Machine
This syslogd(8) provides full remote logging, i.e. is able to send messages to a remote host running syslogd(8) and to receive messages from remote hosts. The remote host won't forward the message again, it will just log them locally. To forward messages to another host, prepend the hostname with the at sign (``@'').

Using this feature you are able to collect all syslog messages on a central host, if all other machines log remotely to that one. This reduces administration needs.

Using a named pipe log method, messages from remote hosts can be sent to a log program. By reading log messages line by line such a program is able to sort log messages by host name or program name on the central log host. This way it is possible to split the log into separate files.

### UNIX domain socket
In addition to Remote Machine this syslogd(8) has the ability to forward messages to a UNIX domain socket. To use UNIX domain socket, you need to specify the path to the socket after the at sign (``@''). The path must start with a slash (``/'').

### List of Users
Usually critical messages are also directed to ``root'' on that machine. You can specify a list of users that ought to receive the log message on the terminal by writing their usernames. You may specify more than one user by separating the usernames with commas (``,''). If they're logged in they will receive the log messages.

### Everyone logged on
Emergency messages often go to all users currently online to notify them that something strange is happening with the system. To specify this wall(1)-feature use an asterisk (``*'').

## EXAMPLES
Here are some examples, partially taken from a real existing site and configuration. Hopefully they answer all questions about configuring this syslogd(8). If not, don't hesitate to contact the mailing list.

```
# Store critical stuff in critical
#
*.=crit;kern.none            /var/adm/critical
```

This will store all messages of priority crit in the file /var/adm/critical, with the exception of any kernel messages.

```
# Kernel messages are stored in the kernel file,
# critical messages and higher ones also go
# to another host and to the console
#
kern.*                       /var/adm/kernel
kern.crit                    @finlandia
kern.crit                    /dev/console
kern.info;kern.!err          /var/adm/kernel-info
```

The first rule directs any message that has the kernel facility to the file /var/adm/kernel. (But recall that only the kernel itself can log to this facility.)

The second statement directs all kernel messages of priority crit and higher to the remote host finlandia. This is useful, because if the host crashes and the disks get irreparable errors you might not be able to read the stored messages. If they're on a remote host, too, you still can try to find out the reason for the crash.

The third rule directs kernel messages of priority crit and higher to the actual console, so the person who works on the machine will get them, too.

The fourth line tells the syslogd to save all kernel messages that come with priorities from info up to warning in the file /var/adm/kernel-info.

This is an example of the 2nd selector overwriting part of the first one. The first selector selects kernel messages of priority info and higher. The second selector filters out kernel messages of priority error and higher. This leaves just priorities info, notice and warning to get logged.

```
# The tcp wrapper logs with mail.info, we display
# all the connections on tty12
#
mail.=info                   /dev/tty12
```

This directs all messages that use mail.info (in source LOG_MAIL | LOG_INFO) to /dev/tty12, the 12th console. For example the tcpwrapper tcpd(8) uses this as its default.

```
# Write all mail related logs to a file
#
mail.*;mail.!=info           /var/adm/mail
```

This pattern matches all messages that come with the mail facility, except for the info priority. These will be stored in the file /var/adm/mail.

```
# Log all mail.info and news.info messages to info
#
mail,news.=info              /var/adm/info
```

This will extract all messages that come either with mail.info or with news.info and store them in the file /var/adm/info.

```
# Log info and notice messages to messages file
#
*.=info;*.=notice;\
	mail.none  /var/log/messages
```

This lets the syslogd log all messages that come with either the info or the notice priority into the file /var/log/messages, except for all messages that use the mail facility.

```
# Log info messages to messages file
#
*.=info;\
	mail,news.none       /var/log/messages
```

This statement causes the syslogd to log all messages that come with the info priority to the file /var/log/messages. But any message coming either with the mail or the news facility will not be stored.

```
# Emergency messages will be displayed using wall
#
*.=emerg                     *
```

This rule tells the syslogd to write all emergency messages to all currently logged in users. This is the wall action.

```
# Messages of the priority alert will be directed
# to the operator
#
*.alert                      root,joey
```

This rule directs all messages of priority alert or higher to the terminals of the operator, i.e. of the users ``root'' and ``joey'' if they're logged in.

```
*.*                          @finlandia
```

This rule would redirect all messages to a remote host called finlandia. This is useful especially in a cluster of machines where all syslog messages will be stored on only one machine.

## CONFIGURATION FILE SYNTAX DIFFERENCES
Syslogd uses a slightly different syntax for its configuration file than the original BSD sources. Originally all messages of a specific priority and above were forwarded to the log file. The modifiers ``='', ``!'' and ``-'' were added to make the syslogd more flexible and to use it in a more intuitive manner.

The original BSD syslogd doesn't understand spaces as separators between the selector and the action field.

## FILES
/etc/syslog.conf

Configuration file for syslogd

## BUGS
The effects of multiple selectors are sometimes not intuitive. For example ``mail.crit,*.err'' will select ``mail'' facility messages at the level of ``err'' or higher, not at the level of ``crit'' or higher.

Also, if you specify a selector with an exclamation mark in it which isn't preceded by a corresponding selector without an exclamation mark, nothing will be logged. Intuitively, the selector ``ftp.!alert'' on its own will select all ftp messages with priorities less than alert. In fact it selects nothing. Similarly ``ftp.!=alert'' might reasonably be expected to select all ftp messages other than those with priority alert, but again it selects nothing. It seems the selectors with exclamation marks in them should only be used as `filters' following selectors without exclamation marks.

Finally, using a backslash to divide a line into two doesn't work if the backslash is used immediately after the end of the selector, without intermediate whitespace.

## SEE ALSO
sysklogd(8), klogd(8), logger(1), syslog(2), syslog(3).

## AUTHORS
The syslogd is taken from BSD sources, Greg Wettstein <greg@wind.enjellic.com> performed the port to Linux, Martin Schulze <joey@infodrom.org> fixed some bugs, added several new features and took over maintenance.


sysstat

package: sysstat

title: sysstat(5)

summary: sysstat configuration file.

text:
# sysstat(5)

## NAME
sysstat - sysstat configuration file.

## DESCRIPTION
This file is read by sa1(8) and sa2(8) shell scripts from the sysstat's set of tools. It consists of a sequence of shell variable assignments used to configure sysstat logging. The variables and their meanings are:

COMPRESSAFTER

Number of days after which daily data files are to be compressed. The compression program is given in the ZIP variable.

DELAY_RANGE

Tell sa2 script to wait for a random delay in the indicated range before running. This delay is expressed in seconds, and is aimed at preventing a massive I/O burst at the same time on VM sharing the same storage area. A value of 0 means that sa2 script will generate its reports files immediately.

HISTORY

The number of days during which a daily data file or a report should be kept. Data files or reports older than this number of days will be removed by the sa2(8) shell script. Data files and reports are normally saved in the /var/log/sa directory, under the name saDD (for data files) or sarDD (for reports), where the DD parameter indicates the current day. The number of files actually kept in the /var/log/sa directory may be slightly higher than the HISTORY value due to the way the sa2 script figures out which files are to be removed (see below "How the sa2(8) script applies HISTORY value"). Using a value of 28 keeps a whole month's worth of data. If you set HISTORY to a value greater than 28 then you should consider using sadc's option -D to prevent older data files from being overwritten (see sadc(8) manual page). In this latter case data files are named saYYYYMMDD and reports sarYYYYMMDD, where YYYY stands for the current year, MM for the current month and DD for the current day.

How the sa2(8) script applies HISTORY value

The sa2 script uses the find command with the -mtime option to figure out which files are to be removed. The find command interprets this value as "N 24 hour periods", ignoring any fractional part. This means that the last modified time of a given sa[r]DD data or report file, using a HISTORY of 1, has to have been modified at least two days ago before it will be removed. And for a HISTORY of 28 that would mean 29 days ago.

To figure out how a HISTORY of 28 is applied in practice, we need to consider that the sa2 script that issues the find command to remove the old files typically runs just before midnight on a given system, and since the first record from sadc can also be written to the previous day's data file (thereby moving its modification time up a bit), the sa2 script will leave 30 files untouched. So for a setting of 28, and counting the data file of the current day, there will always be 31 files (or 30 files, depending on the number of days in a month) in the /var/log/sa directory during the majority of a given day. E.g.:

April 30th: 31 files (Apr 30th-1st, Mar 31th)

May 1st: 30 files (May 1st, Apr 30th-2nd)

Yet we can note the following exceptions (as inspected at Noon of the given day):

February 28th: 31 files (Feb 28th-1st, Jan 31st, 30th & 29th)

March 1st: 30 files (Mar 1st, Feb 28th-2nd, Jan 31st & 30th)

March 2nd: 29 files (Mar 1st & 2nd, Feb 28th-3rd, Jan. 31st)

March 3rd: 28 files (Mar 1st-3rd, Feb 28th-4th)

March 4th - March 28th: 28 files

March 29th: 29 files

March 30th: 30 files

March 31st: 31 files

(Determining the number of files in March on a leap year is left as an exercise for the reader).

Things are simpler if you use the sa[r]YYYYMMDD name format. Apply the same logic as above in this case and you will find that there are always HISTORY + 3 files in the /var/log/sa directory during the majority of a given day.

REPEAT_HEADER

Maximum number of lines after which a header will be inserted in the report generated by sa2 script. By default there is only a header at the beginning of each report and it is not repeated afterwards.

REPORTS

Set this variable to false to prevent the sa2 script from generating reports (the sarDD files).

SA_DIR

Directory where the standard system activity daily data and report files are saved. Its default value is /var/log/sa.

SADC_OPTIONS

Options that should be passed to sadc(8). With these options (see sadc(8) manual page), you can select some additional data which are going to be saved in daily data files. These options are used only when a new data file is created. They will be ignored with an already existing one.

YESTERDAY

By default sa2 script generates yesterday's summary, since the cron job usually runs right after midnight. If you want sa2 to generate the summary of the same day (for example when cron job runs at 23:53) set this variable to no.

ZIP

Program used to compress data and report files.

## FILE
/etc/sysconfig/sysstat

## AUTHOR
Sebastien Godard (sysstat <at> orange.fr)

## SEE ALSO
sadc(8), sa1(8), sa2(8)

https://github.com/sysstat/sysstat