v2.10.2 705579a

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
gordon_domain = ""                           # Required: Gordon domain (registry + API)
data_dir = "~/.gordon"                       # Data directory (varies by install type)

# =============================================================================
# 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"

# =============================================================================
# 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"]

Default Values Summary

Setting Default Description
server.port 80 HTTP proxy port
server.registry_port 5000 Container registry port
server.gordon_domain "" Required - Gordon domain
server.data_dir ~/.gordon Data directory
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
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

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
14gordon_domain = ""                           # Required: Gordon domain (registry + API)
15data_dir = "~/.gordon"                       # Data directory (varies by install type)
16
17# =============================================================================
18# AUTHENTICATION (required - Gordon won't start without credentials configured)
19# =============================================================================
20[auth]
21enabled = true                               # Enable registry authentication (default: true)
22secrets_backend = "unsafe"                   # "pass", "sops", or "unsafe"
23token_secret = ""                            # Path in secrets backend to JWT signing key (REQUIRED)
24token_expiry = "720h"                        # Token expiry duration (720h = 30 days)
25# Optional: enable password authentication (for interactive login)
26# username = ""                              # Username for password auth
27# password_hash = ""                         # Path in secrets backend to bcrypt hash
28
29# =============================================================================
30# API (applies to both Registry and Admin endpoints)
31# =============================================================================
32[api.rate_limit]
33enabled = true                               # Enable rate limiting (default: true)
34global_rps = 500                             # Max requests/second globally
35per_ip_rps = 50                              # Max requests/second per client IP
36burst = 100                                  # Burst size for rate limiters
37trusted_proxies = []                         # IPs/CIDRs trusted to set X-Forwarded-For
38
39# =============================================================================
40# LOGGING
41# =============================================================================
42[logging]
43level = "info"                               # "debug", "info", "warn", "error"
44format = "console"                           # "console" or "json"
45
46[logging.file]
47enabled = false                              # Enable file logging
48path = ""                                    # Log file path (default: {data_dir}/logs/gordon.log)
49max_size = 100                               # Max size in MB before rotation
50max_backups = 3                              # Number of old files to keep
51max_age = 28                                 # Days to keep old files
52
53[logging.container_logs]
54enabled = true                               # Enable container log collection
55dir = ""                                     # Log directory (default: {data_dir}/container-logs)
56max_size = 100                               # Max size in MB before rotation
57max_backups = 3                              # Number of old files to keep
58max_age = 28                                 # Days to keep old files
59
60# =============================================================================
61# ENVIRONMENT
62# =============================================================================
63[env]
64dir = ""                                     # Env files directory (default: {data_dir}/env)
65
66# =============================================================================
67# DEPLOYMENT
68# =============================================================================
69[deploy]
70pull_policy = "if-tag-changed"               # "always", "if-tag-changed", "never"
71
72# =============================================================================
73# AUTO-ROUTE
74# =============================================================================
75[auto_route]
76enabled = false                              # Create routes from image labels automatically
77
78# =============================================================================
79# NETWORK ISOLATION
80# =============================================================================
81[network_isolation]
82enabled = false                              # Enable per-app Docker networks
83network_prefix = "gordon"                    # Prefix for created networks
84dns_suffix = ".internal"                     # DNS suffix for internal resolution
85
86# =============================================================================
87# VOLUMES
88# =============================================================================
89[volumes]
90auto_create = true                           # Auto-create volumes from Dockerfile VOLUME
91prefix = "gordon"                            # Volume name prefix
92preserve = true                              # Keep volumes when containers are removed
93
94# =============================================================================
95# ROUTES
96# =============================================================================
97[routes]
98# "domain.com" = "image:tag"
99# "http://insecure.domain.com" = "image:tag"   # HTTP-only (no HTTPS redirect)
100
101# =============================================================================
102# EXTERNAL ROUTES
103# =============================================================================
104[external_routes]
105# "domain.com" = "host:port"                 # Proxy to non-container services
106
107# =============================================================================
108# NETWORK GROUPS
109# =============================================================================
110[network_groups]
111# "group-name" = ["domain1.com", "domain2.com"]
112
113# =============================================================================
114# ATTACHMENTS
115# =============================================================================
116[attachments]
117# "domain-or-group" = ["image1:tag", "image2:tag"]
118```
119
120## Default Values Summary
121
122| Setting | Default | Description |
123|---------|---------|-------------|
124| `server.port` | `80` | HTTP proxy port |
125| `server.registry_port` | `5000` | Container registry port |
126| `server.gordon_domain` | `""` | **Required** - Gordon domain |
127| `server.data_dir` | `~/.gordon` | Data directory |
128| `auth.enabled` | `true` | Enable authentication |
129| `auth.secrets_backend` | `"unsafe"` | Secrets storage |
130| `auth.token_expiry` | `"720h"` | 30 days |
131| `api.rate_limit.enabled` | `true` | Enable rate limiting |
132| `api.rate_limit.global_rps` | `500` | Global requests/second |
133| `api.rate_limit.per_ip_rps` | `50` | Per-IP requests/second |
134| `api.rate_limit.burst` | `100` | Burst size |
135| `api.rate_limit.trusted_proxies` | `[]` | IPs/CIDRs trusted for X-Forwarded-For |
136| `logging.level` | `"info"` | Log level |
137| `logging.format` | `"console"` | Log format |
138| `logging.file.enabled` | `false` | File logging disabled |
139| `logging.file.max_size` | `100` | 100 MB |
140| `logging.file.max_backups` | `3` | Keep 3 old files |
141| `logging.file.max_age` | `28` | 28 days |
142| `logging.container_logs.enabled` | `true` | Container logs enabled |
143| `logging.container_logs.max_size` | `100` | 100 MB |
144| `logging.container_logs.max_backups` | `3` | Keep 3 old files |
145| `logging.container_logs.max_age` | `28` | 28 days |
146| `deploy.pull_policy` | `"if-tag-changed"` | Pull on tag change |
147| `auto_route.enabled` | `false` | Auto-route disabled |
148| `network_isolation.enabled` | `false` | Isolation disabled |
149| `network_isolation.network_prefix` | `"gordon"` | Network prefix |
150| `network_isolation.dns_suffix` | `".internal"` | DNS suffix |
151| `volumes.auto_create` | `true` | Auto-create volumes |
152| `volumes.prefix` | `"gordon"` | Volume prefix |
153| `volumes.preserve` | `true` | Keep volumes |
154
155## Environment Variables
156
157All configuration options can be set via environment variables using the pattern:
158
159```
160GORDON_<SECTION>_<KEY>=value
161```
162
163Examples:
164```bash
165GORDON_SERVER_PORT=8080
166GORDON_SERVER_GORDON_DOMAIN=gordon.example.com
167GORDON_AUTH_ENABLED=true
168GORDON_LOGGING_LEVEL=debug
169GORDON_NETWORK_ISOLATION_ENABLED=true
170```
171
172Nested keys use underscores:
173```bash
174GORDON_LOGGING_FILE_ENABLED=true
175GORDON_LOGGING_FILE_MAX_SIZE=200
176GORDON_LOGGING_CONTAINER_LOGS_ENABLED=false
177```
178
179### Security Environment Variables
180
181These special environment variables take priority over config file values:
182
183| Variable | Description |
184|----------|-------------|
185| `GORDON_AUTH_TOKEN_SECRET` | JWT signing secret (avoids storing secret on disk) |
186
187Example:
188```bash
189export GORDON_AUTH_TOKEN_SECRET="your-secure-32-char-secret-here"
190gordon serve
191```
192
193## Pull Policy Options
194
195| Value | Behavior |
196|-------|----------|
197| `"always"` | Always pull image before deploying |
198| `"if-tag-changed"` | Pull only if image tag differs from running container |
199| `"never"` | Never pull, use local image only |
200
201## Secrets Backend Options
202
203| Value | Description |
204|-------|-------------|
205| `"pass"` | Unix password manager (recommended for production) |
206| `"sops"` | Mozilla SOPS encrypted files |
207| `"unsafe"` | Plain text files (development only) |
208
209## Log Level Options
210
211| Value | Description |
212|-------|-------------|
213| `"debug"` | Verbose debugging information |
214| `"info"` | General operational information |
215| `"warn"` | Warning conditions |
216| `"error"` | Error conditions only |
217
218## Related
219
220- [Configuration Overview](./index.md)
221- [Authentication](./auth.md)
222- [Network Isolation](./network-isolation.md)
223- [Volumes](./volumes.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