Configuration file
config.toml holds the start-up options of a process that hosts an engine: the daemon, the one-off engine of a command, and the desktop app. It is read once at start and never written by easysync. It contains top-level keys only, no secrets and no run-time settings. A missing file is not an error. For a key that has a command-line option or an environment variable, the option wins, then the variable, then the file, then the built-in default. The place of the file for each system is in Install.
Keys of config.toml:
| Key | Type | Default | Where it counts | Overridden by | Meaning |
|---|---|---|---|---|---|
key_store | string, "os" or "file" | the OS key store | Linux only (ignored with a warning on Windows and macOS) | --keystore, EASYSYNC_KEY_STORE | Where the identity and state keys live. "file" selects the headless key file keys.cbor. |
listen | string, a socket address ip:port | 0.0.0.0 on the preferred port, or any free port | all that read config.toml | --listen | The QUIC listening address. An address from the file is as explicit as the option: if its port is taken, the start fails. |
discovery | bool | true | all that read config.toml | --no-discovery | false switches mDNS discovery off. |
clipboard | bool | true | the daemon | --no-clipboard | false stops the daemon from hosting an OS clipboard backend. |
An example file with every key:
key_store = "file"
listen = "0.0.0.0:47017"
discovery = false
clipboard = false
Run-time settings #
These settings are not keys of the file. They are stored in the state database of the device, change with easysync config set and are read with easysync config get. A key of that name in config.toml is refused.
| Setting | Type | Default | Range | Meaning |
|---|---|---|---|---|
clipboard_sync | bool | on | The master switch of clipboard sync. | |
max_clipboard_size | size | 256 KiB | 4096 to 1048448 bytes | The largest clipboard text this device accepts and advertises. |
show_source_device | bool | on | Whether the notification of a received clipboard text names the sending device. | |
deliver_latest_on_reconnect | bool | off | Whether the latest clipboard text is delivered to a device when it reconnects. | |
incoming_dir | absolute path | <state dir>/incoming | an existing directory in which the engine can create and remove a file | Where accepted files are saved. |
min_free_space_margin | size | 1 GiB | 0 to 2^50 bytes | The free space that must remain after a file is accepted. |