v2.6.0 fe25b4f

index.md RawHistoryFolder

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"

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 = 8080                              # HTTP proxy port (default: 80)
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)
type = "token"                           # "password" or "token"
secrets_backend = "pass"                 # "pass", "sops", or "unsafe"
# Password auth:
# username = "deploy"
# password_hash = "gordon/auth/password_hash"
# Token auth:
token_secret = "gordon/auth/token_secret"
token_expiry = "30d"                     # Duration (1y, 30d, 2w) or 0 for never

# Deploy behavior
[deploy]
pull_policy = "if-tag-changed"           # always, if-not-present, if-tag-changed

# 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

# 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
dns_suffix = ".internal"                 # DNS suffix for services

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

Configuration Sections

Section Description Documentation
[server] Core server settings Server
[auth] Authentication and secrets backend Auth
[deploy] Deployment behavior Deploy
[logging] Logging configuration Logging
[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

Default Values

Setting Default
server.port 80
server.registry_port 5000
server.data_dir ~/.gordon
auth.enabled true
auth.type "password"
auth.secrets_backend "unsafe"
auth.token_expiry "30d"
deploy.pull_policy "if-tag-changed"
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 false
auto_route.enabled false

Hot Reload

Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:

gordon reload

The following settings require a restart to take effect:

  • server.port
  • server.registry_port
  • server.data_dir
  • auth settings
  • deploy.pull_policy

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## Full Configuration Reference
25
26For a complete list of all configuration options with their default values, see the [Configuration Reference](./reference.md).
27
28> **Note:** This example shows production-style paths. Default paths use `~/.gordon/` for user installations.
29
30```toml
31# Server settings
32[server]
33port = 8080                              # HTTP proxy port (default: 80)
34registry_port = 5000                     # Registry port (default: 5000)
35gordon_domain = "gordon.mydomain.com"    # Required: Gordon domain (registry + API)
36# data_dir = "~/.gordon"                 # Default for user installations
37
38# Authentication (includes secrets backend)
39[auth]
40enabled = true                           # Enable registry authentication (default: true)
41type = "token"                           # "password" or "token"
42secrets_backend = "pass"                 # "pass", "sops", or "unsafe"
43# Password auth:
44# username = "deploy"
45# password_hash = "gordon/auth/password_hash"
46# Token auth:
47token_secret = "gordon/auth/token_secret"
48token_expiry = "30d"                     # Duration (1y, 30d, 2w) or 0 for never
49
50# Deploy behavior
51[deploy]
52pull_policy = "if-tag-changed"           # always, if-not-present, if-tag-changed
53
54# Logging
55[logging]
56level = "info"                           # trace, debug, info, warn, error
57format = "console"                       # console or json
58
59[logging.file]
60enabled = true
61path = "~/.gordon/logs/gordon.log"       # Default location
62max_size = 100                           # MB before rotation
63max_backups = 3                          # Old files to keep
64max_age = 28                             # Days to keep
65
66[logging.container_logs]
67enabled = true
68dir = "~/.gordon/logs/containers"        # Default location
69max_size = 100
70max_backups = 3
71max_age = 28
72
73# Environment variables
74[env]
75dir = "~/.gordon/env"                    # Default location
76
77# Volume settings
78[volumes]
79auto_create = true                       # Auto-create from Dockerfile VOLUME
80prefix = "gordon"                        # Volume name prefix
81preserve = true                          # Keep volumes on container removal
82
83# Network isolation
84[network_isolation]
85enabled = true                           # Per-app isolated networks
86network_prefix = "gordon"                # Network name prefix
87dns_suffix = ".internal"                 # DNS suffix for services
88
89# Auto-route
90[auto_route]
91enabled = false                          # Auto-create routes from image names
92
93# Routes (required)
94[routes]
95"app.mydomain.com" = "myapp:latest"
96"api.mydomain.com" = "myapi:v2.1.0"
97
98# Network groups
99[network_groups]
100"backend" = ["app.mydomain.com", "api.mydomain.com"]
101
102# Attachments
103[attachments]
104"app.mydomain.com" = ["postgres:latest", "redis:latest"]
105"backend" = ["rabbitmq:latest"]
106```
107
108## Configuration Sections
109
110| Section | Description | Documentation |
111|---------|-------------|---------------|
112| `[server]` | Core server settings | [Server](./server.md) |
113| `[auth]` | Authentication and secrets backend | [Auth](./auth.md) |
114| `[deploy]` | Deployment behavior | [Deploy](./deploy.md) |
115| `[logging]` | Logging configuration | [Logging](./logging.md) |
116| `[env]` | Environment variable settings | [Environment](./env.md) |
117| `[volumes]` | Volume management | [Volumes](./volumes.md) |
118| `[network_isolation]` | Network isolation settings | [Network Isolation](./network-isolation.md) |
119| `[auto_route]` | Automatic route creation | [Auto Route](./auto-route.md) |
120| `[routes]` | Domain to image mapping | [Routes](./routes.md) |
121| `[external_routes]` | Non-containerized service proxying | [External Routes](./external-routes.md) |
122| `[network_groups]` | Shared service networks | [Network Groups](./network-groups.md) |
123| `[attachments]` | Service dependencies | [Attachments](./attachments.md) |
124
125## Default Values
126
127| Setting | Default |
128|---------|---------|
129| `server.port` | `80` |
130| `server.registry_port` | `5000` |
131| `server.data_dir` | `~/.gordon` |
132| `auth.enabled` | `true` |
133| `auth.type` | `"password"` |
134| `auth.secrets_backend` | `"unsafe"` |
135| `auth.token_expiry` | `"30d"` |
136| `deploy.pull_policy` | `"if-tag-changed"` |
137| `logging.level` | `"info"` |
138| `logging.format` | `"console"` |
139| `logging.file.enabled` | `false` |
140| `logging.file.max_size` | `100` |
141| `logging.file.max_backups` | `3` |
142| `logging.file.max_age` | `28` |
143| `logging.container_logs.enabled` | `true` |
144| `volumes.auto_create` | `true` |
145| `volumes.prefix` | `"gordon"` |
146| `volumes.preserve` | `true` |
147| `network_isolation.enabled` | `false` |
148| `auto_route.enabled` | `false` |
149
150## Hot Reload
151
152Gordon watches the configuration file and reloads automatically when changes are detected. You can also trigger a manual reload:
153
154```bash
155gordon reload
156```
157
158The following settings require a restart to take effect:
159
160- `server.port`
161- `server.registry_port`
162- `server.data_dir`
163- `auth` settings
164- `deploy.pull_policy`
165
166## Environment Variable Override
167
168Configuration values can be overridden with environment variables:
169
170```bash
171GORDON_SERVER_PORT=8080 gordon serve
172GORDON_LOGGING_LEVEL=debug gordon serve
173```
174
175Pattern: `GORDON_SECTION_KEY` (uppercase, underscores instead of dots)
176
177## Related
178
179- [Server Configuration](./server.md)
180- [Routes Configuration](./routes.md)
181- [External Routes](./external-routes.md)
182- [Authentication](./auth.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