Syncthing
services.syncthing.all_proxy
Overwrites the all_proxy environment variable for the Syncthing process to the given value. This is normally used to let Syncthing connect through a SOCKS5 proxy server. See https://docs.syncthing.net/users/proxying.html.
Type: null or string
Default
null
Example
"socks5://address.com:1234"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.cert
Path to the cert.pem
file, which will be copied into Syncthing's
configDir.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.configDir
The path where the settings and keys will exist.
Type: path
Default
-
if
stateVersion >= 19.03
:config.services.syncthing.dataDir + "/.config/syncthing" * otherwise:
config.services.syncthing.dataDir
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.dataDir
The path where synchronised directories will exist.
Type: path
Default
"/var/lib/syncthing"
Example
"/home/yourUser"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.databaseDir
The directory containing the database and logs.
Type: path
Default
config.services.syncthing.configDir
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.enable
Whether to enable Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.extraFlags
Extra flags passed to the syncthing command in the service definition.
Type: list of string
Default
[ ]
Example
["--reset-deltas"]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.group
The group to run Syncthing under.
By default, a group named syncthing
will be created.
Type: string
Default
"syncthing"
Example
"yourGroup"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.guiAddress
The address to serve the web interface at.
Type: string
Default
"127.0.0.1:8384"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.key
Path to the key.pem
file, which will be copied into Syncthing's
configDir.
Type: null or string
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.openDefaultPorts
Whether to open the default ports in the firewall: TCP/UDP 22000 for transfers and UDP 21027 for discovery.
If multiple users are running Syncthing on this machine, you will need to manually open a set of ports for each instance and leave this disabled. Alternatively, if you are running only a single instance on this machine using the default ports, enable this.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.overrideDevices
Whether to delete the devices which are not configured via the
devices option.
If set to false
, devices added via the web
interface will persist and will have to be deleted manually.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.overrideFolders
Whether to delete the folders which are not configured via the
folders option.
If set to false
, folders added via the web
interface will persist and will have to be deleted manually.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.package
The syncthing package to use.
Type: package
Default
pkgs.syncthing
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.relay.enable
Whether to enable Syncthing relay service.
Type: boolean
Default
false
Example
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.extraOptions
Extra command line arguments to pass to strelaysrv.
Type: list of string
Default
[ ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.globalRateBps
Global bandwidth rate limit in bytes per second.
Type: null or (positive integer, meaning >0)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.listenAddress
Address to listen on for relay traffic.
Type: string
Default
""
Example
"1.2.3.4"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.perSessionRateBps
Per session bandwidth rate limit in bytes per second.
Type: null or (positive integer, meaning >0)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.pools
Relay pools to join. If null, uses the default global pool.
Type: null or (list of string)
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.port
Port to listen on for relay traffic. This port should be added to
networking.firewall.allowedTCPPorts
.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
22067
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.providedBy
Human-readable description of the provider of the relay (you).
Type: string
Default
""
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.statusListenAddress
Address to listen on for serving the relay status API.
Type: string
Default
""
Example
"1.2.3.4"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.relay.statusPort
Port to listen on for serving the relay status API. This port should be
added to networking.firewall.allowedTCPPorts
.
Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)
Default
22070
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing-relay.nix
services.syncthing.settings
Extra configuration options for Syncthing. See https://docs.syncthing.net/users/config.html. Note that this attribute set does not exactly match the documented xml format. Instead, this is the format of the json rest api. There are slight differences. For example, this xml:
<options>
<listenAddress>default</listenAddress>
<minHomeDiskFree unit="%">1</minHomeDiskFree>
</options>
{
options: {
listenAddresses = [
"default"
];
minHomeDiskFree = {
unit = "%";
value = 1;
};
};
}
Type: JSON value
Default
{ }
Example
{gui = {theme = "black";};options = {localAnnounceEnabled = false;};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.devices
Peers/devices which Syncthing should communicate with.
Note that you can still add devices manually, but those changes will be reverted on restart if overrideDevices is enabled.
Type: attribute set of (JSON value)
Default
{ }
Example
{bigbox = {addresses = ["tcp://192.168.0.10:51820"];id = "7CFNTQM-IMTJBHJ-3UWRDIU-ZGQJFR6-VCXZ3NB-XUH3KZO-N52ITXR-LAIYUAU";};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.devices.<name>.autoAcceptFolders
Automatically create or share folders that this device advertises at the default path. See https://docs.syncthing.net/users/config.html?highlight=autoaccept#config-file-format.
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.devices.<name>.id
The device ID. See https://docs.syncthing.net/dev/device-ids.html.
Type: string
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.devices.<name>.name
The name of the device.
Type: string
Default
"‹name›"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders
Folders which should be shared by Syncthing.
Note that you can still add folders manually, but those changes will be reverted on restart if overrideFolders is enabled.
Type: attribute set of (JSON value)
Default
{ }
Example
{"/home/user/sync" = {id = "syncme";devices = [ "bigbox" ];};}
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.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).
Type: boolean
Default
false
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.devices
The devices this folder should be shared with. Each device must be defined in the devices option.
Type: list of string
Default
[ ]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.enable
Whether to share this folder. This option is useful when you want to define all folders in one place, but not every machine should share all folders.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.id
The ID of the folder. Must be the same on all devices.
Type: string
Default
"‹name›"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.label
The label of the folder.
Type: string
Default
"‹name›"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.path
The path to the folder which should be shared.
Only absolute paths (starting with /
) and paths relative to
the user's home directory
(starting with ~/
) are allowed.
Type: string starting with / or ~/
Default
"‹name›"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.type
Controls how the folder is handled by Syncthing. See https://docs.syncthing.net/users/config.html#config-option-folder.type.
Type: one of "sendreceive", "sendonly", "receiveonly", "receiveencrypted"
Default
"sendreceive"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.versioning
How to keep changed/deleted files with Syncthing. There are 4 different types of versioning with different parameters. See https://docs.syncthing.net/users/versioning.html.
Type: null or (JSON value)
Default
null
Example
[{versioning = {type = "simple";params.keep = "10";};}{versioning = {type = "trashcan";params.cleanoutDays = "1000";};}{versioning = {type = "staggered";fsPath = "/syncthing/backup";params = {cleanInterval = "3600";maxAge = "31536000";};};}{versioning = {type = "external";params.versionsPath = pkgs.writers.writeBash "backup" '' folderpath="$1" filepath="$2" rm -rf "$folderpath/$filepath" '';};}]
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.folders.<name>.versioning.type
The type of versioning. See https://docs.syncthing.net/users/versioning.html.
Type: one of "external", "simple", "staggered", "trashcan"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options
The options element contains all other global configuration options
Type: JSON value
Default
{ }
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.limitBandwidthInLan
Whether to apply bandwidth limits to devices in the same broadcast domain as the local device.
Type: null or boolean
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.localAnnounceEnabled
Whether to send announcements to the local LAN, also use such announcements to find other devices.
Type: null or boolean
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.localAnnouncePort
The port on which to listen and send IPv4 broadcast announcements to.
Type: null or signed integer
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.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.
Type: null or signed integer
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.relaysEnabled
When true, relays will be connected to and potentially used for device to device connections.
Type: null or boolean
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.settings.options.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.
Type: null or signed integer
Default
null
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.systemService
Whether to auto-launch Syncthing as a system service.
Type: boolean
Default
true
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix
services.syncthing.user
The user to run Syncthing as.
By default, a user named syncthing
will be created whose home
directory is dataDir.
Type: string
Default
"syncthing"
Example
"yourUser"
Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/syncthing.nix