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:

  1. Path specified via --config CLI flag
  2. ./dossier.config.yaml in the current directory
  3. ~/.config/dossier/config.yaml in the user home
  4. /etc/dossier/config.yaml system-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

KeyTypeDefaultDescription
portinteger8080HTTP server listen port
hoststring"0.0.0.0"Bind address
workersinteger4Number of worker threads
modestring"production"Runtime mode: production, development, test
secret_keystring--Required. Used for signing sessions and tokens

Database configuration

KeyTypeDefaultDescription
database.urlstring--Connection string (postgres://...)
database.pool_sizeinteger10Max connections in pool
database.timeoutinteger30Connection timeout in seconds
database.sslbooleantrueRequire SSL for database connections

Logging

KeyTypeDefaultDescription
log.levelstring"info"Log level: debug, info, warn, error
log.formatstring"json"Output format: json, text, pretty
log.outputstring"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"