Configuration Overview
Gordon uses a single TOML configuration file located at ~/.config/gordon/gordon.toml.
Configuration File Location
| Location |
Purpose |
~/.config/gordon/gordon.toml |
Default configuration file |
Custom path via --config flag |
gordon serve --config /path/to/config.toml |
Minimal Configuration
[server]
port = 8080
registry_port = 5000
gordon_domain = "gordon.mydomain.com"
[routes]
"app.mydomain.com" = "myapp:latest"
Note: gordon_domain is the canonical key. Migrate older registry_domain values before restarting.
For a staged registry host rename, set the new server.gordon_domain and keep old Gordon registry hosts in server.legacy_registry_domains until clients move. See Server and Upgrading.
Full Configuration Reference
For a complete list of all configuration options with their default values, see the Configuration Reference.
Note: This example shows production-style paths. Default paths use ~/.gordon/ for user installations.
# Server settings
[server]
port = 8088 # HTTP proxy port (default: 8088)
registry_port = 5000 # Registry port (default: 5000)
gordon_domain = "gordon.mydomain.com" # Required: Gordon domain (registry + API)
# data_dir = "~/.gordon" # Default for user installations
# Authentication (includes secrets backend)
[auth]
enabled = true # Enable registry authentication (default: true)
secrets_backend = "pass" # "pass", "sops", or "unsafe"
token_secret = "gordon/auth/token_secret" # Required: JWT signing secret
token_expiry = "30d" # Duration (1y, 30d, 2w) or 0 for never
# Token-only authentication (password login was removed in v2.30.0)
# API rate limiting
[api.rate_limit]
enabled = true # Enable rate limiting (default: true)
global_rps = 500 # Max requests/second globally
per_ip_rps = 50 # Max requests/second per IP
burst = 100 # Burst size
trusted_proxies = [] # IPs/CIDRs trusted for X-Forwarded-For
# Deploy behavior
[deploy]
pull_policy = "if-tag-changed" # always, if-not-present, if-tag-changed
readiness_mode = "auto" # auto, docker-health, delay
health_timeout = "90s" # Max wait for health-based readiness
readiness_delay = "5s" # Wait after running before ready
drain_mode = "auto" # auto, inflight, delay
drain_timeout = "30s" # Max wait for in-flight drain
drain_delay = "2s" # Wait after proxy invalidation before stopping the old container
# Container runtime profile
[containers]
security_profile = "compat" # compat or strict
# Logging
[logging]
level = "info" # trace, debug, info, warn, error
format = "console" # console or json
[logging.file]
enabled = true
path = "~/.gordon/logs/gordon.log" # Default location
max_size = 100 # MB before rotation
max_backups = 3 # Old files to keep
max_age = 28 # Days to keep
[logging.container_logs]
enabled = true
dir = "~/.gordon/logs/containers" # Default location
max_size = 100
max_backups = 3
max_age = 28
# Telemetry (OpenTelemetry)
[telemetry]
enabled = true # Enable OTLP export (default: false)
endpoint = "http://localhost:5080/api/default" # OTLP HTTP endpoint
auth_token = "" # Base64 user:password for Basic auth
traces = true # Export traces
metrics = true # Export metrics
logs = true # Bridge zerolog to OTLP logs
trace_sample_rate = 1.0 # 0.0 = none, 1.0 = all
# Environment variables
[env]
dir = "~/.gordon/env" # Default location
# Volume settings
[volumes]
auto_create = true # Auto-create from Dockerfile VOLUME
prefix = "gordon" # Volume name prefix
preserve = true # Keep volumes on container removal
# Network isolation
[network_isolation]
enabled = true # Per-app isolated networks
network_prefix = "gordon" # Network name prefix
internal = false # Set true to block direct egress from isolated networks
# Auto-route
[auto_route]
enabled = false # Auto-create routes from image names
# Routes (required)
[routes]
"app.mydomain.com" = "myapp:latest"
"api.mydomain.com" = "myapi:v2.1.0"
# Network groups
[network_groups]
"backend" = ["app.mydomain.com", "api.mydomain.com"]
# Attachments
[attachments]
"app.mydomain.com" = ["postgres:latest", "redis:latest"]
"backend" = ["rabbitmq:latest"]
# Backups
[backups]
enabled = true
schedule = "daily" # "hourly", "daily", "weekly", "monthly"
storage_dir = "~/.gordon/backups"
[backups.retention]
hourly = 24
daily = 7
weekly = 4
monthly = 12
# Images
[images]
allowed_registries = [] # Explicit external registries allowed for deploy/attachments
require_digest = false # Require digests for allowlisted external registries
[images.prune]
enabled = false
schedule = "daily"
keep_last = 3
Configuration Sections
| Section |
Description |
Documentation |
[server] |
Core server settings |
Server |
[auth] |
Authentication and secrets backend |
Auth |
[api.rate_limit] |
Rate limiting configuration |
Rate Limiting |
[deploy] |
Deployment behavior |
Deploy |
[logging] |
Logging configuration |
Logging |
[telemetry] |
OpenTelemetry observability export |
Telemetry |
[env] |
Environment variable settings |
Environment |
[volumes] |
Volume management |
Volumes |
[network_isolation] |
Network isolation settings |
Network Isolation |
[auto_route] |
Automatic route creation |
Auto Route |
[routes] |
Domain to image mapping |
Routes |
[external_routes] |
Non-containerized service proxying |
External Routes |
[network_groups] |
Shared service networks |
Network Groups |
[attachments] |
Service dependencies |
Attachments |
[backups] |
Database backups |
Backups |
[images.prune] |
Scheduled image cleanup |
Images |
| Security hardening |
Security controls and recommended knobs |
Security Hardening |
Default Values
| Setting |
Default |
server.port |
8088 |
server.registry_port |
5000 |
server.data_dir |
~/.gordon |
server.max_blob_chunk_size |
"95MB" |
server.max_blob_size |
"1GB" |
auth.enabled |
true |
auth.secrets_backend |
"unsafe" |
auth.token_expiry |
"30d" |
api.rate_limit.enabled |
true |
api.rate_limit.global_rps |
500 |
api.rate_limit.per_ip_rps |
50 |
api.rate_limit.burst |
100 |
api.rate_limit.trusted_proxies |
[] |
deploy.pull_policy |
"if-tag-changed" |
deploy.readiness_mode |
"auto" |
deploy.health_timeout |
"90s" |
deploy.readiness_delay |
"5s" |
deploy.drain_mode |
"auto" |
deploy.drain_timeout |
"30s" |
deploy.drain_delay |
"2s" |
containers.security_profile |
"compat" |
logging.level |
"info" |
logging.format |
"console" |
logging.file.enabled |
false |
logging.file.max_size |
100 |
logging.file.max_backups |
3 |
logging.file.max_age |
28 |
logging.container_logs.enabled |
true |
volumes.auto_create |
true |
volumes.prefix |
"gordon" |
volumes.preserve |
true |
network_isolation.enabled |
true |
network_isolation.internal |
false |
auto_route.enabled |
false |
backups.enabled |
false |
backups.schedule |
"daily" ("hourly", "daily", "weekly", "monthly") |
images.allowed_registries |
[] |
images.require_digest |
false |
images.prune.enabled |
false |
images.prune.schedule |
"daily" |
images.prune.keep_last |
3 |
telemetry.enabled |
false |
telemetry.endpoint |
"" |
telemetry.auth_token |
"" |
telemetry.traces |
true |
telemetry.metrics |
true |
telemetry.logs |
true |
telemetry.trace_sample_rate |
1.0 |
When auth.enabled=false, Gordon runs in local-only mode: /admin/* is disabled and /v2/* is loopback-only.
Hot Reload
Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:
gordon reload
Hot-reloaded (no restart needed)
| Setting |
server.gordon_domain (registry domain) |
server.registry_port |
server.max_proxy_body_size |
server.max_proxy_response_size |
server.max_concurrent_conns |
Note: Routes are hot-reloaded from the config file. You can still use the API or CLI (gordon routes add/update/remove) for live route changes.
Requires restart
| Setting |
server.port |
server.data_dir |
server.max_blob_chunk_size |
server.max_blob_size |
auth.* |
deploy.readiness_mode |
deploy.readiness_delay |
deploy.health_timeout |
deploy.drain_mode |
deploy.drain_timeout |
Environment Variable Override
Configuration values can be overridden with environment variables:
GORDON_SERVER_PORT=8080 gordon serve
GORDON_LOGGING_LEVEL=debug gordon serve
Pattern: GORDON_SECTION_KEY (uppercase, underscores instead of dots)
source
1# Configuration Overview
2
3Gordon uses a single TOML configuration file located at `~/.config/gordon/gordon.toml`.
4
5## Configuration File Location
6
7| Location | Purpose |
8|----------|---------|
9| `~/.config/gordon/gordon.toml` | Default configuration file |
10| Custom path via `--config` flag | `gordon serve --config /path/to/config.toml` |
11
12## Minimal Configuration
13
14```toml
15[server]
16port = 8080
17registry_port = 5000
18gordon_domain = "gordon.mydomain.com"
19
20[routes]
21"app.mydomain.com" = "myapp:latest"
22```
23
24> **Note:** `gordon_domain` is the canonical key. Migrate older `registry_domain` values before restarting.
25>
26> For a staged registry host rename, set the new `server.gordon_domain` and keep old Gordon registry hosts in `server.legacy_registry_domains` until clients move. See [Server](./server.md#gordon-domain) and [Upgrading](../upgrading.md#staged-registry-host-rename).
27
28## Full Configuration Reference
29
30For a complete list of all configuration options with their default values, see the [Configuration Reference](./reference.md).
31
32> **Note:** This example shows production-style paths. Default paths use `~/.gordon/` for user installations.
33
34```toml
35# Server settings
36[server]
37port = 8088 # HTTP proxy port (default: 8088)
38registry_port = 5000 # Registry port (default: 5000)
39gordon_domain = "gordon.mydomain.com" # Required: Gordon domain (registry + API)
40# data_dir = "~/.gordon" # Default for user installations
41
42# Authentication (includes secrets backend)
43[auth]
44enabled = true # Enable registry authentication (default: true)
45secrets_backend = "pass" # "pass", "sops", or "unsafe"
46token_secret = "gordon/auth/token_secret" # Required: JWT signing secret
47token_expiry = "30d" # Duration (1y, 30d, 2w) or 0 for never
48# Token-only authentication (password login was removed in v2.30.0)
49
50# API rate limiting
51[api.rate_limit]
52enabled = true # Enable rate limiting (default: true)
53global_rps = 500 # Max requests/second globally
54per_ip_rps = 50 # Max requests/second per IP
55burst = 100 # Burst size
56trusted_proxies = [] # IPs/CIDRs trusted for X-Forwarded-For
57
58# Deploy behavior
59[deploy]
60pull_policy = "if-tag-changed" # always, if-not-present, if-tag-changed
61readiness_mode = "auto" # auto, docker-health, delay
62health_timeout = "90s" # Max wait for health-based readiness
63readiness_delay = "5s" # Wait after running before ready
64drain_mode = "auto" # auto, inflight, delay
65drain_timeout = "30s" # Max wait for in-flight drain
66drain_delay = "2s" # Wait after proxy invalidation before stopping the old container
67
68# Container runtime profile
69[containers]
70security_profile = "compat" # compat or strict
71
72# Logging
73[logging]
74level = "info" # trace, debug, info, warn, error
75format = "console" # console or json
76
77[logging.file]
78enabled = true
79path = "~/.gordon/logs/gordon.log" # Default location
80max_size = 100 # MB before rotation
81max_backups = 3 # Old files to keep
82max_age = 28 # Days to keep
83
84[logging.container_logs]
85enabled = true
86dir = "~/.gordon/logs/containers" # Default location
87max_size = 100
88max_backups = 3
89max_age = 28
90
91# Telemetry (OpenTelemetry)
92[telemetry]
93enabled = true # Enable OTLP export (default: false)
94endpoint = "http://localhost:5080/api/default" # OTLP HTTP endpoint
95auth_token = "" # Base64 user:password for Basic auth
96traces = true # Export traces
97metrics = true # Export metrics
98logs = true # Bridge zerolog to OTLP logs
99trace_sample_rate = 1.0 # 0.0 = none, 1.0 = all
100
101# Environment variables
102[env]
103dir = "~/.gordon/env" # Default location
104
105# Volume settings
106[volumes]
107auto_create = true # Auto-create from Dockerfile VOLUME
108prefix = "gordon" # Volume name prefix
109preserve = true # Keep volumes on container removal
110
111# Network isolation
112[network_isolation]
113enabled = true # Per-app isolated networks
114network_prefix = "gordon" # Network name prefix
115internal = false # Set true to block direct egress from isolated networks
116
117# Auto-route
118[auto_route]
119enabled = false # Auto-create routes from image names
120
121# Routes (required)
122[routes]
123"app.mydomain.com" = "myapp:latest"
124"api.mydomain.com" = "myapi:v2.1.0"
125
126# Network groups
127[network_groups]
128"backend" = ["app.mydomain.com", "api.mydomain.com"]
129
130# Attachments
131[attachments]
132"app.mydomain.com" = ["postgres:latest", "redis:latest"]
133"backend" = ["rabbitmq:latest"]
134
135# Backups
136[backups]
137enabled = true
138schedule = "daily" # "hourly", "daily", "weekly", "monthly"
139storage_dir = "~/.gordon/backups"
140
141[backups.retention]
142hourly = 24
143daily = 7
144weekly = 4
145monthly = 12
146
147# Images
148[images]
149allowed_registries = [] # Explicit external registries allowed for deploy/attachments
150require_digest = false # Require digests for allowlisted external registries
151
152[images.prune]
153enabled = false
154schedule = "daily"
155keep_last = 3
156```
157
158## Configuration Sections
159
160| Section | Description | Documentation |
161|---------|-------------|---------------|
162| `[server]` | Core server settings | [Server](./server.md) |
163| `[auth]` | Authentication and secrets backend | [Auth](./auth.md) |
164| `[api.rate_limit]` | Rate limiting configuration | [Rate Limiting](./rate-limiting.md) |
165| `[deploy]` | Deployment behavior | [Deploy](./deploy.md) |
166| `[logging]` | Logging configuration | [Logging](./logging.md) |
167| `[telemetry]` | OpenTelemetry observability export | [Telemetry](./telemetry.md) |
168| `[env]` | Environment variable settings | [Environment](./env.md) |
169| `[volumes]` | Volume management | [Volumes](./volumes.md) |
170| `[network_isolation]` | Network isolation settings | [Network Isolation](./network-isolation.md) |
171| `[auto_route]` | Automatic route creation | [Auto Route](./auto-route.md) |
172| `[routes]` | Domain to image mapping | [Routes](./routes.md) |
173| `[external_routes]` | Non-containerized service proxying | [External Routes](./external-routes.md) |
174| `[network_groups]` | Shared service networks | [Network Groups](./network-groups.md) |
175| `[attachments]` | Service dependencies | [Attachments](./attachments.md) |
176| `[backups]` | Database backups | [Backups](./backups.md) |
177| `[images.prune]` | Scheduled image cleanup | [Images](./images.md) |
178| Security hardening | Security controls and recommended knobs | [Security Hardening](./security-hardening.md) |
179
180## Default Values
181
182| Setting | Default |
183|---------|---------|
184| `server.port` | `8088` |
185| `server.registry_port` | `5000` |
186| `server.data_dir` | `~/.gordon` |
187| `server.max_blob_chunk_size` | `"95MB"` |
188| `server.max_blob_size` | `"1GB"` |
189| `auth.enabled` | `true` |
190| `auth.secrets_backend` | `"unsafe"` |
191| `auth.token_expiry` | `"30d"` |
192| `api.rate_limit.enabled` | `true` |
193| `api.rate_limit.global_rps` | `500` |
194| `api.rate_limit.per_ip_rps` | `50` |
195| `api.rate_limit.burst` | `100` |
196| `api.rate_limit.trusted_proxies` | `[]` |
197| `deploy.pull_policy` | `"if-tag-changed"` |
198| `deploy.readiness_mode` | `"auto"` |
199| `deploy.health_timeout` | `"90s"` |
200| `deploy.readiness_delay` | `"5s"` |
201| `deploy.drain_mode` | `"auto"` |
202| `deploy.drain_timeout` | `"30s"` |
203| `deploy.drain_delay` | `"2s"` |
204| `containers.security_profile` | `"compat"` |
205| `logging.level` | `"info"` |
206| `logging.format` | `"console"` |
207| `logging.file.enabled` | `false` |
208| `logging.file.max_size` | `100` |
209| `logging.file.max_backups` | `3` |
210| `logging.file.max_age` | `28` |
211| `logging.container_logs.enabled` | `true` |
212| `volumes.auto_create` | `true` |
213| `volumes.prefix` | `"gordon"` |
214| `volumes.preserve` | `true` |
215| `network_isolation.enabled` | `true` |
216| `network_isolation.internal` | `false` |
217| `auto_route.enabled` | `false` |
218| `backups.enabled` | `false` |
219| `backups.schedule` | `"daily"` (`"hourly"`, `"daily"`, `"weekly"`, `"monthly"`) |
220| `images.allowed_registries` | `[]` |
221| `images.require_digest` | `false` |
222| `images.prune.enabled` | `false` |
223| `images.prune.schedule` | `"daily"` |
224| `images.prune.keep_last` | `3` |
225| `telemetry.enabled` | `false` |
226| `telemetry.endpoint` | `""` |
227| `telemetry.auth_token` | `""` |
228| `telemetry.traces` | `true` |
229| `telemetry.metrics` | `true` |
230| `telemetry.logs` | `true` |
231| `telemetry.trace_sample_rate` | `1.0` |
232
233When `auth.enabled=false`, Gordon runs in local-only mode: `/admin/*` is disabled and `/v2/*` is loopback-only.
234
235## Hot Reload
236
237Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:
238
239```bash
240gordon reload
241```
242
243### Hot-reloaded (no restart needed)
244
245| Setting |
246|---------|
247| `server.gordon_domain` (registry domain) |
248| `server.registry_port` |
249| `server.max_proxy_body_size` |
250| `server.max_proxy_response_size` |
251| `server.max_concurrent_conns` |
252
253> **Note:** Routes are hot-reloaded from the config file. You can still use the API or CLI (`gordon routes add/update/remove`) for live route changes.
254
255### Requires restart
256
257| Setting |
258|---------|
259| `server.port` |
260| `server.data_dir` |
261| `server.max_blob_chunk_size` |
262| `server.max_blob_size` |
263| `auth.*` |
264| `deploy.readiness_mode` |
265| `deploy.readiness_delay` |
266| `deploy.health_timeout` |
267| `deploy.drain_mode` |
268| `deploy.drain_timeout` |
269
270## Environment Variable Override
271
272Configuration values can be overridden with environment variables:
273
274```bash
275GORDON_SERVER_PORT=8080 gordon serve
276GORDON_LOGGING_LEVEL=debug gordon serve
277```
278
279Pattern: `GORDON_SECTION_KEY` (uppercase, underscores instead of dots)
280
281## Related
282
283- [Server Configuration](./server.md)
284- [Routes Configuration](./routes.md)
285- [External Routes](./external-routes.md)
286- [Authentication](./auth.md)
287- [Telemetry](./telemetry.md)
288- [Backups](./backups.md)
289- [Images](./images.md)