The configuration file controls all runtime behavior of your Dossier instance. This reference documents every available key, its type, default value, and behavior.
File location
The config file is searched in the following order of precedence:
- Path specified via
--configCLI flag ./dossier.config.yamlin the current directory~/.config/dossier/config.yamlin the user home/etc/dossier/config.yamlsystem-wide
Tip: Run
dossier config --show-path to see which config file is currently active.
File format
Configuration files support YAML, JSON, or TOML. YAML is recommended for readability. All examples below use YAML.
Core settings
| Key | Type | Default | Description |
|---|---|---|---|
| port | integer | 8080 | HTTP server listen port |
| host | string | "0.0.0.0" | Bind address |
| workers | integer | 4 | Number of worker threads |
| mode | string | "production" | Runtime mode: production, development, test |
| secret_key | string | -- | Required. Used for signing sessions and tokens |
Database configuration
| Key | Type | Default | Description |
|---|---|---|---|
| database.url | string | -- | Connection string (postgres://...) |
| database.pool_size | integer | 10 | Max connections in pool |
| database.timeout | integer | 30 | Connection timeout in seconds |
| database.ssl | boolean | true | Require SSL for database connections |
Logging
| Key | Type | Default | Description |
|---|---|---|---|
| log.level | string | "info" | Log level: debug, info, warn, error |
| log.format | string | "json" | Output format: json, text, pretty |
| log.output | string | "stdout" | Output destination: stdout, stderr, filepath |
Warning: Never commit
secret_key or database.url to version control. Use environment variables for sensitive values.
Example configuration
# dossier.config.yaml
port: 8080
host: "0.0.0.0"
workers: 4
mode: "production"
secret_key: "${DOSSIER_SECRET}"
database:
url: "${DATABASE_URL}"
pool_size: 20
timeout: 30
ssl: true
log:
level: "info"
format: "json"
output: "stdout"