Browse documentation
Configuration reference
Global environment variables and service-level middleware labels.
Global environment
Global settings use the DR_ prefix. Their command-line equivalents are also available; use dockrouter --help for the options in your installed release.
| Variable | Default | Purpose |
|---|---|---|
| DR_HTTP_PORT | 80 | HTTP listener |
| DR_HTTPS_PORT | 443 | HTTPS listener |
| DR_ADMIN_PORT | 9090 | Admin listener port |
| DR_ADMIN_BIND | 127.0.0.1 | Admin bind address |
| DR_ADMIN | true | Enable admin interface |
| DR_DOCKER_SOCKET | /var/run/docker.sock | Docker API socket |
| DR_DATA_DIR | /data | Persistent state directory |
| DR_ACME_EMAIL | — | ACME account email |
| DR_ACME_STAGING | false | ACME staging environment |
| DR_DEFAULT_TLS | auto | Default route TLS mode |
| DR_LOG_LEVEL | info | Logging verbosity |
| DR_TRUSTED_IPS | — | Trusted proxy CIDRs |
Middleware labels
Add middleware settings to the application container, alongside its routing labels.
| Label | Example |
|---|---|
| dr.ratelimit | 100/m |
| dr.cors.origins | https://app.example.com |
| dr.compress | true |
| dr.maxbody | 10mb |
| dr.stripprefix | /api |
| dr.addprefix | /v1 |
| dr.retry | 2 |
| dr.circuitbreaker | 5/30s |
| dr.auth.basic.users | user:bcrypt_hash |
Useful CLI commands
Version, help and a container health check are available directly from the binary.
dockrouter version
dockrouter --help
dockrouter healthcheck