v2.15.1 c808592

reference.md RawHistoryFolder

Configuration Reference

Complete configuration reference with all options and their default values.

Full Configuration Example

# =============================================================================
# SERVER
# =============================================================================
[server]
port = 80                                    # HTTP proxy port
registry_port = 5000                         # Container registry port
tls_enabled = false                          # Enable native HTTPS listener
tls_port = 443                               # HTTPS proxy port when enabled
tls_cert_file = ""                           # PEM cert path (auto-generated if empty and TLS enabled)
tls_key_file = ""                            # PEM key path (auto-generated if empty and TLS enabled)
gordon_domain = ""                           # Required: Gordon domain (registry + API)
data_dir = "~/.gordon"                       # Data directory (varies by install type)
max_blob_chunk_size = "512MB"                # Max size per registry blob upload chunk
registry_allowed_ips = []                    # IPs or CIDR ranges allowed to access the registry (empty = allow all)

# =============================================================================
# AUTHENTICATION (required - Gordon won't start without credentials configured)
# =============================================================================
[auth]
enabled = true                               # Enable registry authentication (default: true)
secrets_backend = "unsafe"                   # "pass", "sops", or "unsafe"
token_secret = ""                            # Path in secrets backend to JWT signing key (REQUIRED)
token_expiry = "720h"                        # Token expiry duration (720h = 30 days)
# Optional: enable password authentication (for interactive login)
# username = ""                              # Username for password auth
# password_hash = ""                         # Path in secrets backend to bcrypt hash

# =============================================================================
# API (applies to both Registry and Admin endpoints)
# =============================================================================
[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 client IP
burst = 100                                  # Burst size for rate limiters
trusted_proxies = []                         # IPs/CIDRs trusted to set X-Forwarded-For

# =============================================================================
# LOGGING
# =============================================================================
[logging]
level = "info"                               # "debug", "info", "warn", "error"
format = "console"                           # "console" or "json"

[logging.file]
enabled = false                              # Enable file logging
path = ""                                    # Log file path (default: {data_dir}/logs/gordon.log)
max_size = 100                               # Max size in MB before rotation
max_backups = 3                              # Number of old files to keep
max_age = 28                                 # Days to keep old files

[logging.container_logs]
enabled = true                               # Enable container log collection
dir = ""                                     # Log directory (default: {data_dir}/container-logs)
max_size = 100                               # Max size in MB before rotation
max_backups = 3                              # Number of old files to keep
max_age = 28                                 # Days to keep old files

# =============================================================================
# ENVIRONMENT
# =============================================================================
[env]
dir = ""                                     # Env files directory (default: {data_dir}/env)

# =============================================================================
# DEPLOYMENT
# =============================================================================
[deploy]
pull_policy = "if-tag-changed"               # "always", "if-tag-changed", "never"
readiness_mode = "auto"                      # "auto", "docker-health", "delay"
health_timeout = "90s"                       # Max wait for health-based readiness
readiness_delay = "5s"                       # Wait after running before considered ready
drain_mode = "auto"                          # "auto", "inflight", "delay"
drain_timeout = "30s"                        # Max wait for in-flight request drain
drain_delay = "2s"                           # Wait after cache invalidation before old stop

# =============================================================================
# AUTO-ROUTE
# =============================================================================
[auto_route]
enabled = false                              # Create routes from image labels automatically

# =============================================================================
# NETWORK ISOLATION
# =============================================================================
[network_isolation]
enabled = false                              # Enable per-app Docker networks
network_prefix = "gordon"                    # Prefix for created networks
dns_suffix = ".internal"                     # DNS suffix for internal resolution

# =============================================================================
# VOLUMES
# =============================================================================
[volumes]
auto_create = true                           # Auto-create volumes from Dockerfile VOLUME
prefix = "gordon"                            # Volume name prefix
preserve = true                              # Keep volumes when containers are removed

# =============================================================================
# ROUTES
# =============================================================================
[routes]
# "domain.com" = "image:tag"
# "http://insecure.domain.com" = "image:tag"   # HTTP-only (no HTTPS redirect)

# =============================================================================
# EXTERNAL ROUTES
# =============================================================================
[external_routes]
# "domain.com" = "host:port"                 # Proxy to non-container services

# =============================================================================
# NETWORK GROUPS
# =============================================================================
[network_groups]
# "group-name" = ["domain1.com", "domain2.com"]

# =============================================================================
# ATTACHMENTS
# =============================================================================
[attachments]
# "domain-or-group" = ["image1:tag", "image2:tag"]

# =============================================================================
# BACKUPS
# =============================================================================
[backups]
enabled = false                              # Enable backup service
schedule = "daily"                          # "hourly", "daily", "weekly", "monthly"
storage_dir = ""                            # Backup root (default: {data_dir}/backups)

[backups.retention]
hourly = 0                                   # Keep N hourly backups per DB
daily = 0                                    # Keep N daily backups per DB
weekly = 0                                   # Keep N weekly backups per DB
monthly = 0                                  # Keep N monthly backups per DB

# =============================================================================
# IMAGES
# =============================================================================
[images.prune]
enabled = false                              # Enable scheduled image cleanup
schedule = "daily"                          # "hourly", "daily", "weekly", "monthly"
keep_last = 3                                # Keep N newest tags per repository

# Note: retention values set to 0 keep no backups for that tier.
# For practical defaults, consider setting daily = 7.

Default Values Summary

Setting Default Description
server.port 80 HTTP proxy port
server.registry_port 5000 Container registry port
server.tls_enabled false Enable native HTTPS listener
server.tls_port 443 HTTPS listener port
server.tls_cert_file "" TLS cert path (auto-generated when empty)
server.tls_key_file "" TLS key path (auto-generated when empty)
server.gordon_domain "" Required - Gordon domain
server.data_dir ~/.gordon Data directory
server.max_blob_chunk_size "512MB" Max size per registry blob upload chunk
server.registry_allowed_ips [] IPs or CIDR ranges allowed to access the registry (empty = allow all)
auth.enabled true Enable authentication
auth.secrets_backend "unsafe" Secrets storage
auth.token_expiry "720h" 30 days
api.rate_limit.enabled true Enable rate limiting
api.rate_limit.global_rps 500 Global requests/second
api.rate_limit.per_ip_rps 50 Per-IP requests/second
api.rate_limit.burst 100 Burst size
api.rate_limit.trusted_proxies [] IPs/CIDRs trusted for X-Forwarded-For
logging.level "info" Log level
logging.format "console" Log format
logging.file.enabled false File logging disabled
logging.file.max_size 100 100 MB
logging.file.max_backups 3 Keep 3 old files
logging.file.max_age 28 28 days
logging.container_logs.enabled true Container logs enabled
logging.container_logs.max_size 100 100 MB
logging.container_logs.max_backups 3 Keep 3 old files
logging.container_logs.max_age 28 28 days
deploy.pull_policy "if-tag-changed" Pull on tag change
deploy.readiness_mode "auto" Readiness strategy (auto, docker-health, delay)
deploy.health_timeout "90s" Max wait for health-based readiness before deploy fails
deploy.readiness_delay "5s" Delay before container is considered ready
deploy.drain_mode "auto" Drain strategy (auto, inflight, delay)
deploy.drain_timeout "30s" Max wait for in-flight request drain before old stop
deploy.drain_delay "2s" Delay before stopping previous container after cache invalidation
auto_route.enabled false Auto-route disabled
network_isolation.enabled false Isolation disabled
network_isolation.network_prefix "gordon" Network prefix
network_isolation.dns_suffix ".internal" DNS suffix
volumes.auto_create true Auto-create volumes
volumes.prefix "gordon" Volume prefix
volumes.preserve true Keep volumes
backups.enabled false Backup service disabled
backups.schedule "daily" Backup scheduler preset
backups.storage_dir "" Uses {server.data_dir}/backups when empty
backups.retention.hourly 0 Keep no hourly backups by default
backups.retention.daily 0 Keep no daily backups by default (recommend 7)
backups.retention.weekly 0 Keep no weekly backups by default
backups.retention.monthly 0 Keep no monthly backups by default
images.prune.enabled false Scheduled image cleanup disabled
images.prune.schedule "daily" Cleanup schedule preset
images.prune.keep_last 3 Number of recent tags kept per repository

Note: for all backups.retention.* keys, 0 means keep no backups for that retention tier.

Environment Variables

All configuration options can be set via environment variables using the pattern:

GORDON_<SECTION>_<KEY>=value

Examples:

GORDON_SERVER_PORT=8080
GORDON_SERVER_GORDON_DOMAIN=gordon.example.com
GORDON_AUTH_ENABLED=true
GORDON_LOGGING_LEVEL=debug
GORDON_NETWORK_ISOLATION_ENABLED=true

Nested keys use underscores:

GORDON_LOGGING_FILE_ENABLED=true
GORDON_LOGGING_FILE_MAX_SIZE=200
GORDON_LOGGING_CONTAINER_LOGS_ENABLED=false

Security Environment Variables

These special environment variables take priority over config file values:

Variable Description
GORDON_AUTH_TOKEN_SECRET JWT signing secret (avoids storing secret on disk)

Example:

export GORDON_AUTH_TOKEN_SECRET="your-secure-32-char-secret-here"
gordon serve

Pull Policy Options

Value Behavior
"always" Always pull image before deploying
"if-tag-changed" Pull only if image tag differs from running container
"never" Never pull, use local image only

Secrets Backend Options

Value Description
"pass" Unix password manager (recommended for production)
"sops" Mozilla SOPS encrypted files
"unsafe" Plain text files (development only)

Log Level Options

Value Description
"debug" Verbose debugging information
"info" General operational information
"warn" Warning conditions
"error" Error conditions only
source
1# Configuration Reference
2
3Complete configuration reference with all options and their default values.
4
5## Full Configuration Example
6
7```toml
8# =============================================================================
9# SERVER
10# =============================================================================
11[server]
12port = 80                                    # HTTP proxy port
13registry_port = 5000                         # Container registry port
14tls_enabled = false                          # Enable native HTTPS listener
15tls_port = 443                               # HTTPS proxy port when enabled
16tls_cert_file = ""                           # PEM cert path (auto-generated if empty and TLS enabled)
17tls_key_file = ""                            # PEM key path (auto-generated if empty and TLS enabled)
18gordon_domain = ""                           # Required: Gordon domain (registry + API)
19data_dir = "~/.gordon"                       # Data directory (varies by install type)
20max_blob_chunk_size = "512MB"                # Max size per registry blob upload chunk
21registry_allowed_ips = []                    # IPs or CIDR ranges allowed to access the registry (empty = allow all)
22
23# =============================================================================
24# AUTHENTICATION (required - Gordon won't start without credentials configured)
25# =============================================================================
26[auth]
27enabled = true                               # Enable registry authentication (default: true)
28secrets_backend = "unsafe"                   # "pass", "sops", or "unsafe"
29token_secret = ""                            # Path in secrets backend to JWT signing key (REQUIRED)
30token_expiry = "720h"                        # Token expiry duration (720h = 30 days)
31# Optional: enable password authentication (for interactive login)
32# username = ""                              # Username for password auth
33# password_hash = ""                         # Path in secrets backend to bcrypt hash
34
35# =============================================================================
36# API (applies to both Registry and Admin endpoints)
37# =============================================================================
38[api.rate_limit]
39enabled = true                               # Enable rate limiting (default: true)
40global_rps = 500                             # Max requests/second globally
41per_ip_rps = 50                              # Max requests/second per client IP
42burst = 100                                  # Burst size for rate limiters
43trusted_proxies = []                         # IPs/CIDRs trusted to set X-Forwarded-For
44
45# =============================================================================
46# LOGGING
47# =============================================================================
48[logging]
49level = "info"                               # "debug", "info", "warn", "error"
50format = "console"                           # "console" or "json"
51
52[logging.file]
53enabled = false                              # Enable file logging
54path = ""                                    # Log file path (default: {data_dir}/logs/gordon.log)
55max_size = 100                               # Max size in MB before rotation
56max_backups = 3                              # Number of old files to keep
57max_age = 28                                 # Days to keep old files
58
59[logging.container_logs]
60enabled = true                               # Enable container log collection
61dir = ""                                     # Log directory (default: {data_dir}/container-logs)
62max_size = 100                               # Max size in MB before rotation
63max_backups = 3                              # Number of old files to keep
64max_age = 28                                 # Days to keep old files
65
66# =============================================================================
67# ENVIRONMENT
68# =============================================================================
69[env]
70dir = ""                                     # Env files directory (default: {data_dir}/env)
71
72# =============================================================================
73# DEPLOYMENT
74# =============================================================================
75[deploy]
76pull_policy = "if-tag-changed"               # "always", "if-tag-changed", "never"
77readiness_mode = "auto"                      # "auto", "docker-health", "delay"
78health_timeout = "90s"                       # Max wait for health-based readiness
79readiness_delay = "5s"                       # Wait after running before considered ready
80drain_mode = "auto"                          # "auto", "inflight", "delay"
81drain_timeout = "30s"                        # Max wait for in-flight request drain
82drain_delay = "2s"                           # Wait after cache invalidation before old stop
83
84# =============================================================================
85# AUTO-ROUTE
86# =============================================================================
87[auto_route]
88enabled = false                              # Create routes from image labels automatically
89
90# =============================================================================
91# NETWORK ISOLATION
92# =============================================================================
93[network_isolation]
94enabled = false                              # Enable per-app Docker networks
95network_prefix = "gordon"                    # Prefix for created networks
96dns_suffix = ".internal"                     # DNS suffix for internal resolution
97
98# =============================================================================
99# VOLUMES
100# =============================================================================
101[volumes]
102auto_create = true                           # Auto-create volumes from Dockerfile VOLUME
103prefix = "gordon"                            # Volume name prefix
104preserve = true                              # Keep volumes when containers are removed
105
106# =============================================================================
107# ROUTES
108# =============================================================================
109[routes]
110# "domain.com" = "image:tag"
111# "http://insecure.domain.com" = "image:tag"   # HTTP-only (no HTTPS redirect)
112
113# =============================================================================
114# EXTERNAL ROUTES
115# =============================================================================
116[external_routes]
117# "domain.com" = "host:port"                 # Proxy to non-container services
118
119# =============================================================================
120# NETWORK GROUPS
121# =============================================================================
122[network_groups]
123# "group-name" = ["domain1.com", "domain2.com"]
124
125# =============================================================================
126# ATTACHMENTS
127# =============================================================================
128[attachments]
129# "domain-or-group" = ["image1:tag", "image2:tag"]
130
131# =============================================================================
132# BACKUPS
133# =============================================================================
134[backups]
135enabled = false                              # Enable backup service
136schedule = "daily"                          # "hourly", "daily", "weekly", "monthly"
137storage_dir = ""                            # Backup root (default: {data_dir}/backups)
138
139[backups.retention]
140hourly = 0                                   # Keep N hourly backups per DB
141daily = 0                                    # Keep N daily backups per DB
142weekly = 0                                   # Keep N weekly backups per DB
143monthly = 0                                  # Keep N monthly backups per DB
144
145# =============================================================================
146# IMAGES
147# =============================================================================
148[images.prune]
149enabled = false                              # Enable scheduled image cleanup
150schedule = "daily"                          # "hourly", "daily", "weekly", "monthly"
151keep_last = 3                                # Keep N newest tags per repository
152
153# Note: retention values set to 0 keep no backups for that tier.
154# For practical defaults, consider setting daily = 7.
155```
156
157## Default Values Summary
158
159| Setting | Default | Description |
160|---------|---------|-------------|
161| `server.port` | `80` | HTTP proxy port |
162| `server.registry_port` | `5000` | Container registry port |
163| `server.tls_enabled` | `false` | Enable native HTTPS listener |
164| `server.tls_port` | `443` | HTTPS listener port |
165| `server.tls_cert_file` | `""` | TLS cert path (auto-generated when empty) |
166| `server.tls_key_file` | `""` | TLS key path (auto-generated when empty) |
167| `server.gordon_domain` | `""` | **Required** - Gordon domain |
168| `server.data_dir` | `~/.gordon` | Data directory |
169| `server.max_blob_chunk_size` | `"512MB"` | Max size per registry blob upload chunk |
170| `server.registry_allowed_ips` | `[]` | IPs or CIDR ranges allowed to access the registry (empty = allow all) |
171| `auth.enabled` | `true` | Enable authentication |
172| `auth.secrets_backend` | `"unsafe"` | Secrets storage |
173| `auth.token_expiry` | `"720h"` | 30 days |
174| `api.rate_limit.enabled` | `true` | Enable rate limiting |
175| `api.rate_limit.global_rps` | `500` | Global requests/second |
176| `api.rate_limit.per_ip_rps` | `50` | Per-IP requests/second |
177| `api.rate_limit.burst` | `100` | Burst size |
178| `api.rate_limit.trusted_proxies` | `[]` | IPs/CIDRs trusted for X-Forwarded-For |
179| `logging.level` | `"info"` | Log level |
180| `logging.format` | `"console"` | Log format |
181| `logging.file.enabled` | `false` | File logging disabled |
182| `logging.file.max_size` | `100` | 100 MB |
183| `logging.file.max_backups` | `3` | Keep 3 old files |
184| `logging.file.max_age` | `28` | 28 days |
185| `logging.container_logs.enabled` | `true` | Container logs enabled |
186| `logging.container_logs.max_size` | `100` | 100 MB |
187| `logging.container_logs.max_backups` | `3` | Keep 3 old files |
188| `logging.container_logs.max_age` | `28` | 28 days |
189| `deploy.pull_policy` | `"if-tag-changed"` | Pull on tag change |
190| `deploy.readiness_mode` | `"auto"` | Readiness strategy (`auto`, `docker-health`, `delay`) |
191| `deploy.health_timeout` | `"90s"` | Max wait for health-based readiness before deploy fails |
192| `deploy.readiness_delay` | `"5s"` | Delay before container is considered ready |
193| `deploy.drain_mode` | `"auto"` | Drain strategy (`auto`, `inflight`, `delay`) |
194| `deploy.drain_timeout` | `"30s"` | Max wait for in-flight request drain before old stop |
195| `deploy.drain_delay` | `"2s"` | Delay before stopping previous container after cache invalidation |
196| `auto_route.enabled` | `false` | Auto-route disabled |
197| `network_isolation.enabled` | `false` | Isolation disabled |
198| `network_isolation.network_prefix` | `"gordon"` | Network prefix |
199| `network_isolation.dns_suffix` | `".internal"` | DNS suffix |
200| `volumes.auto_create` | `true` | Auto-create volumes |
201| `volumes.prefix` | `"gordon"` | Volume prefix |
202| `volumes.preserve` | `true` | Keep volumes |
203| `backups.enabled` | `false` | Backup service disabled |
204| `backups.schedule` | `"daily"` | Backup scheduler preset |
205| `backups.storage_dir` | `""` | Uses `{server.data_dir}/backups` when empty |
206| `backups.retention.hourly` | `0` | Keep no hourly backups by default |
207| `backups.retention.daily` | `0` | Keep no daily backups by default (recommend `7`) |
208| `backups.retention.weekly` | `0` | Keep no weekly backups by default |
209| `backups.retention.monthly` | `0` | Keep no monthly backups by default |
210| `images.prune.enabled` | `false` | Scheduled image cleanup disabled |
211| `images.prune.schedule` | `"daily"` | Cleanup schedule preset |
212| `images.prune.keep_last` | `3` | Number of recent tags kept per repository |
213
214Note: for all `backups.retention.*` keys, `0` means keep no backups for that retention tier.
215
216## Environment Variables
217
218All configuration options can be set via environment variables using the pattern:
219
220```
221GORDON_<SECTION>_<KEY>=value
222```
223
224Examples:
225```bash
226GORDON_SERVER_PORT=8080
227GORDON_SERVER_GORDON_DOMAIN=gordon.example.com
228GORDON_AUTH_ENABLED=true
229GORDON_LOGGING_LEVEL=debug
230GORDON_NETWORK_ISOLATION_ENABLED=true
231```
232
233Nested keys use underscores:
234```bash
235GORDON_LOGGING_FILE_ENABLED=true
236GORDON_LOGGING_FILE_MAX_SIZE=200
237GORDON_LOGGING_CONTAINER_LOGS_ENABLED=false
238```
239
240### Security Environment Variables
241
242These special environment variables take priority over config file values:
243
244| Variable | Description |
245|----------|-------------|
246| `GORDON_AUTH_TOKEN_SECRET` | JWT signing secret (avoids storing secret on disk) |
247
248Example:
249```bash
250export GORDON_AUTH_TOKEN_SECRET="your-secure-32-char-secret-here"
251gordon serve
252```
253
254## Pull Policy Options
255
256| Value | Behavior |
257|-------|----------|
258| `"always"` | Always pull image before deploying |
259| `"if-tag-changed"` | Pull only if image tag differs from running container |
260| `"never"` | Never pull, use local image only |
261
262## Secrets Backend Options
263
264| Value | Description |
265|-------|-------------|
266| `"pass"` | Unix password manager (recommended for production) |
267| `"sops"` | Mozilla SOPS encrypted files |
268| `"unsafe"` | Plain text files (development only) |
269
270## Log Level Options
271
272| Value | Description |
273|-------|-------------|
274| `"debug"` | Verbose debugging information |
275| `"info"` | General operational information |
276| `"warn"` | Warning conditions |
277| `"error"` | Error conditions only |
278
279## Related
280
281- [Configuration Overview](./index.md)
282- [Authentication](./auth.md)
283- [Network Isolation](./network-isolation.md)
284- [Volumes](./volumes.md)
285- [Images](./images.md)

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 7

Tags 106

↑↓ moveenter openesc close