What you will have at the end
The G8 console and API running on one Linux host, next to a gateway cluster you already run, with its own PostgreSQL in a volume, signed in as the first administrator you created with the setup token from the server’s log. The secrets key that seals every stored password and admin key is one you generated and keep. The gateway cluster appears as the first Environment, reachable, with its Routes counted on the Overview.
Two things to know before you start. This is the trial layout: plain HTTP on one host, for a laptop or a lab machine. For production, the Helm chart on OpenShift, OKD or Kubernetes, or Linux virtual machines; the layouts are in the product documentation and on Deployment. And G8 is the second half of an installation: it manages a gateway cluster that is already running, and does not install one. The engine’s own guide, also in the documentation, puts that cluster on a Docker host with Compose; this article was walked on a host set up that way.
Prerequisites
- A Linux host with Docker and the Compose plugin. The one here is Ubuntu 24.04 with 4 vCPU and 8 GB, and the gateway cluster of the engine guide already on it, in a Docker network named
g8gw. - The gateway’s Admin API address as the G8 container will reach it: the engine container’s name as
docker psshows it, on port 9180, over the network both will share. And the admin key, which the engine guide put in the engine’sconfig.yamlunderadmin_key, or in the variable that line references. - The two images, pulled from the registry you were given: the product image and PostgreSQL 18. On this host they are 55 MB and 650 MB.
- A port for the console. 8080 here.
The compose file
Two services: the database, and the server that serves the console and the API. The directory belongs to root on most hosts, so make it yours first, then put the file in /opt/g8/compose.yaml:
sudo mkdir -p /opt/g8 && sudo chown "$USER" /opt/g8
services:
postgres:
image: ${G8_POSTGRES_IMAGE:?set G8_POSTGRES_IMAGE in .env}
restart: unless-stopped
environment:
POSTGRES_USER: g8
POSTGRES_PASSWORD: ${G8_PG_PASSWORD:?set G8_PG_PASSWORD in .env}
POSTGRES_DB: g8
PGDATA: /var/lib/postgresql/data
volumes:
- g8-postgres:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -h 127.0.0.1 -U g8 -d g8"]
interval: 2s
timeout: 2s
retries: 30
g8:
image: ${G8_IMAGE:?set G8_IMAGE in .env}
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
environment:
G8_LISTEN_ADDR: ":8080"
G8_PG_DSN: postgres://g8:${G8_PG_PASSWORD}@postgres:5432/g8?sslmode=disable
G8_ENVIRONMENT: ${G8_ENVIRONMENT:?set G8_ENVIRONMENT in .env}
G8_ENGINE_ADMIN_URL: ${G8_ENGINE_ADMIN_URL:?set G8_ENGINE_ADMIN_URL in .env}
G8_ENGINE_ADMIN_KEY: ${G8_ENGINE_ADMIN_KEY:?set G8_ENGINE_ADMIN_KEY in .env}
G8_SECRETS_KEY: ${G8_SECRETS_KEY:-}
ports:
- "8080:8080"
networks:
- default
- g8gw
networks:
g8gw:
external: true
volumes:
g8-postgres:
The g8 service joins two networks: its own, where PostgreSQL is, and the gateway’s, so that the engine container’s name resolves. This file publishes one port, the console’s; the Admin API is reached over the shared network, and whether the gateway’s own compose file also publishes it on the host is that file’s choice, not this one’s.
The variables
Every value the server reads comes from /opt/g8/.env, which only you can read:
G8_IMAGE=<your registry>/g8/g8:v0.9.14
G8_POSTGRES_IMAGE=<your registry>/infra/postgres:18.6
G8_PG_PASSWORD=<a password for the database user g8, letters and digits only>
G8_ENVIRONMENT=dev
G8_ENGINE_ADMIN_URL=http://<engine container>:9180
G8_ENGINE_ADMIN_KEY=<the admin key of the gateway's Admin API>
chmod 600 /opt/g8/.env
What each one does, from the server’s own configuration page in the documentation:
G8_PG_DSN, built in the compose file from the password: the PostgreSQL connection. The password is written into a URL there, which is why it is letters and digits only; a@,:or/in it would break the address. The server applies its schema on this database at every start.G8_ENVIRONMENT,G8_ENGINE_ADMIN_URL,G8_ENGINE_ADMIN_KEY: the first Environment, read at the first start only, when no Environment exists yet. From then on the Environments table is the source of truth and the console edits it; the server still refuses to start without the address, so keep it set. The key is sealed before it is stored.G8_SECRETS_KEY: the key that seals every stored secret, 64 hexadecimal characters. It is deliberately missing from the file above.G8_LISTEN_ADDR: the port, for the console and the API alike.
Everything else, sessions, lockout, rate limits, audit retention, keeps its default, and the TLS pair G8_TLS_CERT_FILE and G8_TLS_KEY_FILE stays unset because this is a trial on one host. In front of users, put a certificate on the server or a reverse proxy in front of it, and name the proxy in G8_TRUSTED_PROXIES so that sign-ins count against the client’s address and not the proxy’s.
Start, and watch it refuse
cd /opt/g8
docker compose pull
docker compose up -d
docker compose ps
docker compose logs g8
PostgreSQL comes up healthy; the server does not stay up. Its log says why, once per restart:
{"level":"ERROR","msg":"server exited","error":"missing required environment: [G8_SECRETS_KEY]"}
This is the line a security reviewer asks for: the server will not run without the key that seals its secrets, so nothing is ever stored unsealed by accident. Generate the key, append it to the file, and put a copy in the password manager or secret store your team already uses, because a key that lives only on this host dies with it:
echo "G8_SECRETS_KEY=$(openssl rand -hex 32)" >> /opt/g8/.env
docker compose up -d
docker compose logs g8
Now the log tells the story of a first start. Between them are three housekeeping lines about pruning old audit rows, records and alert history, which say zero on a fresh install; the four that matter:
{"level":"INFO","msg":"schema ready","version_from":0,"version_to":16,...}
{"level":"INFO","msg":"environment seeded from G8_ENVIRONMENT and G8_ENGINE_ADMIN_URL; the table is the source of truth from now on","environment":"dev"}
{"level":"WARN","msg":"g8 has no users yet: open the console and create the first administrator with this setup token; every replica of this install prints the same one","setup_token":"..."}
{"level":"INFO","msg":"listening","addr":"[::]:8080","tls":false}
The schema was applied, the first Environment was created from the three variables, and there is no user yet, so the server printed a setup token. Do the next step now, on a host nobody else can reach yet: while no user exists, anyone who can open port 8080 and read that log line can create the first administrator. Three addresses answer from outside the container as soon as it listens: /healthz with {"status":"ok"}, /readyz with {"status":"ready"} once the database and the secrets key check out, and /version with the release and the commit it was built from.
Create the first administrator
Open http://<host>:8080 in a browser. Because no user exists, the console shows one page: the setup token from the log, a display name, a username, an optional email and a password of at least twelve characters.

Create administrator signs you in; the token is consumed by that one request. A script that does this step through the API instead of the console sends an Origin header naming the server, as the console does. Both refusals, from the lab install:
### the same setup token posted a second time
HTTP/1.1 410 Gone
{"error":"gone"}
### a setup request without an Origin header
HTTP/1.1 403 Forbidden
{"error":"forbidden","reason":"cross_site_request"}
The first thing the console shows is the Environment the server seeded, with the engine card already filled from the Admin API: the engine’s version and that this release was verified against it, the Admin API reachable, and what the cluster holds. The lab’s cluster had nine Routes before G8 ever saw it, and the card counts them, because G8 manages what is already running.

The navigation’s last entry, Help & about, is not available in this release; the version is the line under the navigation, and the engine is named on the Overview card and in the Engine section of the Environment form.
The platform audit log holds three records: bootstrap.admin_created, the administrator created with the setup token; assignment.granted, the Platform administrator role on every Environment; and auth.login_succeeded, the sign-in. A second person who reads the token in the log later gets the 410 above.
What is on disk
/opt/g8/compose.yamland/opt/g8/.env: the whole installation. Back up.env; withoutG8_SECRETS_KEYthe stored admin key and every password are unreadable to a new server.- The volume, which Compose names
g8_g8-postgresafter the project directory: every Environment, user, role and audit record. The engine’s configuration is not in it; that lives in the gateway cluster’s own store, which G8 reads and writes through the Admin API. - The two images. Upgrading is a new
G8_IMAGEanddocker compose up -d; the server applies the schema changes at start.

What to do next
- Add a second gateway cluster, with the connection test and the audit record: Add your first Environment.
- Put the first Route on it, with a key and a limit: Your first Route.
- What each part of an installation is, and which systems are optional: What G8 installs and what you provide.