Skip to main content

Server configuration

The server reads its settings from its environment once, at start. The names, which ones are required and the defaults on this page are read from the server's own code when the site is built, so they are the ones the running version reads. A setting the server does not know, under the same prefix, is not refused; the server starts and warns in its log that it does not read it, so a misspelling is found there.

On OKD and OpenShift the Helm chart sets some of these from its values and the Secrets its install notes name. The listen address and the certificate files come from tls, the trusted proxies and the audit retention from their own values, the first environment from environment and engine. The database, the admin key and the sealing key come from the three Secrets. The session and sign-in settings have no chart value today and keep their defaults on OKD. Install G8 on OKD or OpenShift shows the values file.

Who may change them​

Whoever runs the server. Nothing on this page is set in the console; a change takes effect at the next start.

Address and TLS​

SettingWhat it does
G8_LISTEN_ADDRDefault :8080 without TLS, :8443 with itThe address and port the server listens on, for the console and the API alike.
G8_TLS_CERT_FILEOptionalThe serving certificate, as a PEM file. Set it together with the key or the server refuses to start; with both set, the server serves HTTPS itself.
G8_TLS_KEY_FILEOptionalThe private key of that certificate, as a PEM file.
G8_TRUSTED_PROXIESOptionalThe load balancers or reverse proxies in front of the server, as a comma-separated list of addresses or CIDR prefixes. From one of them, the client address is read from the forwarded header; from anywhere else, the connection's own address counts. Without it, every sign-in behind a proxy counts against the proxy's address.

Database and the first environment​

SettingWhat it does
G8_PG_DSNRequiredThe PostgreSQL connection string. The server applies its own schema migrations on this database at every start.
G8_ENVIRONMENTDefault localThe slug of the first environment. It is read at the first start only, when no environment exists yet, and must be 3 to 32 lowercase letters, digits or hyphens. From then on the environments table is the source of truth, and the setting is not read again.
G8_ENGINE_ADMIN_URLRequiredThe Admin API address of the first environment's gateway cluster. Used with the slug at the first start only, then kept in the environment and edited in the console; the server still refuses to start without it, so keep it set.
G8_ENGINE_ADMIN_KEYRequiredThe admin key of that Admin API, used the same way. Sealed under the secrets key before it is stored.

Secrets​

SettingWhat it does
G8_SECRETS_KEYRequiredThe key that seals every stored secret: engine admin keys, directory bind passwords and log store passwords. 64 hexadecimal characters, 32 random bytes. The server refuses to start without it, and with a row sealed under a key it does not hold.
G8_SECRETS_KEY_PREVIOUSOptionalThe previous key, set only while the key is being changed. At start the server reseals every row from this key to the current one and says in its log how many it moved. Rotate the secrets key is the procedure.

Sessions and sign-in​

SettingWhat it does
G8_SESSION_IDLEDefault 1hHow long a session lives without a request. A duration, 30m or 12h for example; it must not exceed the maximum below.
G8_SESSION_MAXDefault 12hThe longest a session lives, active or not.
G8_LOGIN_LOCKOUT_ATTEMPTSDefault 10How many failed sign-ins lock an account.
G8_LOGIN_LOCKOUT_WINDOWDefault 15mThe window the failed sign-ins are counted in.
G8_LOGIN_LOCKOUT_DURATIONDefault 15mHow long the account stays locked. The lock lifts on its own.
G8_LOGIN_RATE_PER_MINUTEDefault 20How many sign-in attempts one client address may make in a minute. Counted in memory per server, so behind several servers the address gets that many per server.
G8_TOKEN_RATE_PER_MINUTEDefault 300How many API requests one service account token may make in a minute. Counted the same way.

Audit​

SettingWhat it does
G8_AUDIT_RETENTION_DAYSDefault 365How many days audit rows are kept before the daily cleanup deletes them. A whole number of days; 0 keeps every row.
G8 dev