feat(docs): start configuration page

This commit is contained in:
Jef Roosens 2025-06-29 14:25:36 +02:00
parent 6c8183c1e3
commit 2514aa8413
No known key found for this signature in database
GPG key ID: 21FD3D77D56BAF49
2 changed files with 123 additions and 0 deletions

View file

@ -0,0 +1,36 @@
# Configuration
All configuration variables can be provided either through the configuration
file, as environment variables or using CLI flags. All environment variable
names are derived from their place in the TOML file, prepended with `OTTER_`.
Variables are grouped by their section in the configuration file, e.g. the
variables under the `net` section should be placed inside the `[net]` group in
the TOML file.
## Top-level settings
* `data_dir` (`OTTER_DATA_DIR`): directory where Otter stores its data. This
directory must exist and be accessible by the server when starting up.
* Default: `./data`
* `session_cleanup_interval` (`OTTER_SESSION_CLEANUP_INTERVAL`): how frequently
(in seconds) the session cleanup background job should be run. This job
removes expired user sessions from the database.
* Default: `86400` (once a day)
* `log_level` (`OTTER_LOG_LEVEL`): how verbose the logging should be; one of
`debug`, `info`, `warn` or `error`
* Default: `warn`
## Network (`net`)
* `type` (`OTTER_NET_TYPE`): type of network connection to establish; one of
`tcp`, `unix`
* Default: `tcp`
* `domain` (`OTTER_NET_DOMAIN`): domain to bind TCP socket to; only applicable
when `net.type` is `tcp`.
* Default: `127.0.0.1`
* `port` (`OTTER_NET_PORT`): port to bind TCP socket to; only applicable when
`net.type` is `tcp`.
* Default: `8080`
* `path` (`OTTER_NET_PATH`): path to bind Unix socket to; only applicable when
`net.type` is `unix`.