Configuration
Docket loads configuration from a TOML file, environment variables, and CLI flags. Precedence (highest to lowest):
- CLI flags
- Environment variables (prefix
DOCKET_, double-underscore for nesting, e.g.DOCKET_SERVER__PORT) - Config file
- Built-in defaults
Runtime overrides from the admin UI
Section titled “Runtime overrides from the admin UI”For keys marked Editable in UI in the Configuration reference, values set from /admin/config are persisted to Postgres (config_entries) and layered on top of file/env at request time. The precedence list above describes how the base value is resolved at startup; admin-UI overrides apply on top of that base. Whether a saved change takes effect immediately or only after a process restart is shown per-key in the reference under When UI change takes effect.
Config file search
Section titled “Config file search”The config file is found via, in order:
--config <path>(or-c <path>)./docket.toml$XDG_CONFIG_HOME/docket/docket.toml/etc/docket/docket.toml
Start from docket.example.toml in the repo, which documents every option with its default value:
cp docket.example.toml docket.tomlSections
Section titled “Sections”For the complete key-by-key reference (every option, default, type, whether it’s editable from the admin UI, and when a UI change takes effect), see Configuration reference — auto-generated from the Go config registry. The annotated TOML lives in docket.example.toml. High-level groups:
| Section | What it controls |
|---|---|
[server] | HTTP listen address, timeouts, body size limits, CORS, HSTS, CSP |
[database] | PostgreSQL URL and connection pool settings |
[telemetry] | OpenTelemetry tracing (OTLP endpoint, service name) |
[log] | Log level and format |
[auth] | Local auth toggle, session timeouts, lockout policy |
[[oidc.providers]] | OIDC identity providers (repeatable) |
[scim] | SCIM 2.0 provisioning |
[storage] | S3-compatible attachment storage (MinIO works for dev) |
[security.ssrf] | SSRF protection for outbound requests |
Environment variable examples
Section titled “Environment variable examples”# Override the database URLexport DOCKET_DATABASE__URL="postgres://docket:secret@db:5432/docket?sslmode=require"
# Listen on a non-default portexport DOCKET_SERVER__PORT="9090"
# Enable OpenTelemetryexport DOCKET_TELEMETRY__ENABLED="true"export DOCKET_TELEMETRY__OTLP_ENDPOINT="otel-collector:4317"Double-underscores (__) map to nested TOML keys. For example, DOCKET_AUTH__SESSION_IDLE_TIMEOUT="1h" maps to [auth] session_idle_timeout = "1h".
Production checklist
Section titled “Production checklist”- Set
[server].allowed_hostsand[server].allowed_originsexplicitly — empty values are development-mode escapes. - Set
[server].hsts_enabled = truewhen behind TLS termination. - Use a strong
[scim].bearer_tokenif SCIM is enabled. - Use a managed database with backups (or follow Backup & restore).
- Keep
[security.ssrf].enabled = trueunless you have a specific outbound-CIDR exception. - In scaled deployments, set
[database].auto_migrate = falseand apply migrations from a single pre-deploy step (docket migrate up) so rolling pods don’t race; serve will refuse to start until the DB is current. See the CLI reference. - If you’re swapping
[ai.embedding].provideror[ai.embedding].modelin a production environment, set[ai.embedding].auto_migrate = falsefirst to defer the re-embedding pass to a maintenance window. Watch progress withdocket embedding status.