v2.4.0 79b3461

server.md RawHistoryFolder

Server Configuration

Core server settings for Gordon.

Configuration

[server]
port = 8080                              # HTTP proxy port
registry_port = 5000                     # Container registry port
gordon_domain = "gordon.mydomain.com"    # Gordon domain (required)
# data_dir = "~/.gordon"                 # Data storage directory (default)

Options

Option Type Default Description
port int 80 HTTP proxy port for routing traffic to containers
registry_port int 5000 Docker registry port for image push/pull
gordon_domain string required Domain for Gordon (registry + admin API)
registry_domain string - Deprecated alias for gordon_domain
data_dir string ~/.gordon Directory for registry data, logs, and env files

Port Configuration

Proxy Port

The port setting controls where Gordon listens for HTTP traffic:

[server]
port = 8080  # Use 8080 for rootless containers with port forwarding

For rootless containers, you'll typically use a high port and configure firewall port forwarding:

# Forward port 80 to 8080
sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080

Registry Port

The registry_port setting controls where Gordon accepts image pushes:

[server]
registry_port = 5000

Docker/Podman clients push to this port:

docker push registry.mydomain.com:5000/myapp:latest

Gordon Domain

The gordon_domain is required and must match your DNS configuration:

[server]
gordon_domain = "gordon.mydomain.com"

This domain is used for:

  • Docker login and image push/pull operations
  • Admin API access (/admin/* endpoints)
  • CLI remote targeting (gordon routes --remote https://gordon.mydomain.com)
  • Token endpoint for authentication (/v2/token)

When requests arrive on the proxy port with this domain as the Host header, Gordon routes them to the backend services (registry and admin API).

Note: registry_domain is supported as a deprecated alias for backwards compatibility.

Data Directory

The data_dir setting controls where Gordon stores data:

[server]
data_dir = "~/.gordon"  # Default for user installations

Directory Structure

~/.gordon/
├── registry/           # Container images and manifests
│   ├── blobs/
│   └── manifests/
├── env/                # Environment files per domain
│   ├── app_mydomain_com.env
│   └── api_mydomain_com.env
├── logs/               # Application and container logs
│   ├── gordon.log
│   ├── proxy.log
│   └── containers/
└── secrets/            # Secrets (unsafe backend only)

Permissions

Gordon creates directories with secure permissions:

  • Directories: 0700 (owner only)
  • Files: 0600 (owner only)

Examples

Development Configuration

[server]
port = 8080
registry_port = 5000
gordon_domain = "gordon.local"
data_dir = "./dev-data"

Production Configuration

[server]
port = 8080
registry_port = 5000
gordon_domain = "gordon.company.com"
data_dir = "/var/lib/gordon"

Rootless Container Setup

[server]
port = 8080      # High port for rootless
registry_port = 5000
gordon_domain = "gordon.mydomain.com"

With firewall port forwarding:

sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080
sudo firewall-cmd --reload
source
1# Server Configuration
2
3Core server settings for Gordon.
4
5## Configuration
6
7```toml
8[server]
9port = 8080                              # HTTP proxy port
10registry_port = 5000                     # Container registry port
11gordon_domain = "gordon.mydomain.com"    # Gordon domain (required)
12# data_dir = "~/.gordon"                 # Data storage directory (default)
13```
14
15## Options
16
17| Option | Type | Default | Description |
18|--------|------|---------|-------------|
19| `port` | int | `80` | HTTP proxy port for routing traffic to containers |
20| `registry_port` | int | `5000` | Docker registry port for image push/pull |
21| `gordon_domain` | string | **required** | Domain for Gordon (registry + admin API) |
22| `registry_domain` | string | - | Deprecated alias for `gordon_domain` |
23| `data_dir` | string | `~/.gordon` | Directory for registry data, logs, and env files |
24
25## Port Configuration
26
27### Proxy Port
28
29The `port` setting controls where Gordon listens for HTTP traffic:
30
31```toml
32[server]
33port = 8080  # Use 8080 for rootless containers with port forwarding
34```
35
36For rootless containers, you'll typically use a high port and configure firewall port forwarding:
37
38```bash
39# Forward port 80 to 8080
40sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080
41```
42
43### Registry Port
44
45The `registry_port` setting controls where Gordon accepts image pushes:
46
47```toml
48[server]
49registry_port = 5000
50```
51
52Docker/Podman clients push to this port:
53
54```bash
55docker push registry.mydomain.com:5000/myapp:latest
56```
57
58## Gordon Domain
59
60The `gordon_domain` is required and must match your DNS configuration:
61
62```toml
63[server]
64gordon_domain = "gordon.mydomain.com"
65```
66
67This domain is used for:
68- Docker login and image push/pull operations
69- Admin API access (`/admin/*` endpoints)
70- CLI remote targeting (`gordon routes --remote https://gordon.mydomain.com`)
71- Token endpoint for authentication (`/v2/token`)
72
73When requests arrive on the proxy port with this domain as the Host header, Gordon routes them to the backend services (registry and admin API).
74
75> **Note:** `registry_domain` is supported as a deprecated alias for backwards compatibility.
76
77## Data Directory
78
79The `data_dir` setting controls where Gordon stores data:
80
81```toml
82[server]
83data_dir = "~/.gordon"  # Default for user installations
84```
85
86### Directory Structure
87
88```
89~/.gordon/
90├── registry/           # Container images and manifests
91│   ├── blobs/
92│   └── manifests/
93├── env/                # Environment files per domain
94│   ├── app_mydomain_com.env
95│   └── api_mydomain_com.env
96├── logs/               # Application and container logs
97│   ├── gordon.log
98│   ├── proxy.log
99│   └── containers/
100└── secrets/            # Secrets (unsafe backend only)
101```
102
103### Permissions
104
105Gordon creates directories with secure permissions:
106- Directories: `0700` (owner only)
107- Files: `0600` (owner only)
108
109## Examples
110
111### Development Configuration
112
113```toml
114[server]
115port = 8080
116registry_port = 5000
117gordon_domain = "gordon.local"
118data_dir = "./dev-data"
119```
120
121### Production Configuration
122
123```toml
124[server]
125port = 8080
126registry_port = 5000
127gordon_domain = "gordon.company.com"
128data_dir = "/var/lib/gordon"
129```
130
131### Rootless Container Setup
132
133```toml
134[server]
135port = 8080      # High port for rootless
136registry_port = 5000
137gordon_domain = "gordon.mydomain.com"
138```
139
140With firewall port forwarding:
141```bash
142sudo firewall-cmd --permanent --add-forward-port=port=80:proto=tcp:toport=8080
143sudo firewall-cmd --reload
144```
145
146## Related
147
148- [Configuration Overview](./index.md)
149- [Installation Guide](../installation.md)
150- [Routes Configuration](./routes.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