Saurron Configuration

Overview

Saurron uses a layered configuration that can include TOML file, environment variables, and CLI flags. Options specified through higher priority sources override options specified through lower priority sources. Option priority order from highest to lowest is:

  1. CLI flags
  2. Environment variables
  3. Config file (TOML format)
  4. Built-in defaults

All sources support all options.

See config reference for the complete list of every configuration option.

Command line flags

All options on the command line have a long form, which looks like --long-form-option <value>. Some options have a single-letter short form as well, which look like -f <value>. Some options take multiple arguments, which are always separated by commands:

--variadic-option arg1,arg2,arg3

Command line flags have the highest priority and override options from any other source.

Environment variables

With the exception of the standard Docker options, all environment variables start with the prefix SAURRON_. Environment variables have the second highest priority and will override options specified in the config file.

Config file

The optional configuration file uses TOML syntax. The config file path defaults to /etc/saurron/config.toml. You can override this via the --config CLI flag or the SAURRON_CONFIG environment variable.

Create a config file

To generate a sample config file, use the --generate-config {path} command. By default, without the optional {path} parameter, this command will stream the config to standard out. Include the optional {path} parameter to save the generated config using the specified filename.

Examples

Docker

docker run --name saurron \
    ghcr.io/organicveggie/saurron:latest \
    --generate-config > /etc/saurron.toml

Binary

saurron --generate-config /etc/saurron.toml

Secret file resolution

For a subset of configuration options, if the value of the option is a path to a readable file, Saurron transparently replaces the value with the file contents at startup. This enables Docker secrets without embedding sensitive values in env vars or CLI args.

Options supporting file contents substitution:

  • http_api.token
  • notifications.email.from
  • notifications.email.password
  • notifications.email.port
  • notifications.email.server
  • notifications.email.to
  • notifications.email.user
  • notifications.general.template
  • notifications.mqtt.broker
  • notifications.mqtt.client_id
  • notifications.mqtt.password
  • notifications.mqtt.topic
  • notifications.mqtt.username
  • notifications.webhook.headers
  • notifications.pushover.token
  • notifications.pushover.user_key
  • notifications.webhook.url
  • registry_password

Table of contents


This site uses Just the Docs, a documentation theme for Jekyll.