Skip to content

Configuration

Everything can be set in the environment: /opt/gangway/.env for an installer install, the template on Unraid. Settings not pinned there are editable in Admin. compose.yaml documents them inline too. Your own changes to the compose setup go in compose.override.yaml beside it, which upgrades leave alone.

Variable Default
GANGWAY_BASE_DOMAIN required Domain for the UI, API, MCP and, by default, previews
GANGWAY_PREVIEW_DOMAIN (base domain) Put previews on their own registrable domain
GANGWAY_PREVIEW_DOMAINS (none) More wildcard domains previews may be named under, comma-separated
GANGWAY_INSTANCE main (compose) Prefix for this install’s containers: gw-<instance>-<slug>
Variable Default
GANGWAY_LISTEN_ADDRESS 172.17.0.1 (compose) Address gangway listens on; :: for every address
GANGWAY_LISTEN_PORT 8443 HTTPS port
GANGWAY_LISTEN_HTTP_PORT empty (compose) Plain-HTTP port that redirects to HTTPS; empty for none
GANGWAY_PUBLIC_PORT 443 (compose) The port in the URLs gangway hands out
GANGWAY_TRUSTED_PROXIES 172.17.0.0/16 (compose) Proxies whose X-Forwarded-For is believed
GANGWAY_TLS_MODE selfsigned selfsigned, acme (Let’s Encrypt over DNS-01) or file
GANGWAY_TLS_CERT_PATH (none) Certificate for file mode
GANGWAY_TLS_KEY_PATH (none) Key for file mode
GANGWAY_CF_API_TOKEN (none) Cloudflare token with DNS edit, for acme
GANGWAY_CF_ZONE_ID (looked up) The zone, if the token cannot list zones
GANGWAY_ACME_DNS_URL (none) An acme-dns server, for acme instead of Cloudflare
GANGWAY_ACME_DNS_USERNAME (none) The acme-dns account’s username
GANGWAY_ACME_DNS_PASSWORD (none) The acme-dns account’s password
GANGWAY_ACME_DNS_SUBDOMAIN (none) The acme-dns account’s subdomain
GANGWAY_ACME_EMAIL (none) Contact address for Let’s Encrypt
GANGWAY_ACME_DIRECTORY_URL staging (compose) Set to https://acme-v02.api.letsencrypt.org/directory for real
Variable Default
GANGWAY_ADMIN_TOKEN (none) Break-glass admin token, the only one that can mint tokens
GANGWAY_CONTROL_ALLOW (everyone) Networks allowed to reach the UI and API; previews stay public
GANGWAY_SURFACE_UI (Admin) Pin the dashboard on or off
GANGWAY_SURFACE_MCP false Pin the MCP surface on or off
GANGWAY_SHARE on if local Pin share links on or off; while off, cloudflared never starts
Variable Default
GANGWAY_PREVIEW_MEMORY 1g Memory limit for every preview container; 0 is off
GANGWAY_PREVIEW_CPUS 2 CPU limit for every preview container; 0 is off
GANGWAY_PREVIEW_PIDS 1024 Process limit for every preview container
GANGWAY_PREVIEW_CONTAINERS 10 Containers one preview may run, replicas counted; 0 is off
GANGWAY_PREVIEW_ACTIVE 50 Container previews the server runs at once; static sites don’t count; 0 is off
GANGWAY_PREVIEW_ACTIVE_PER_USER 20 The same, per user or API token; 0 is off
GANGWAY_PREVIEW_BUILDS 2 Image builds at once; the rest wait their turn; 0 is off
GANGWAY_PREVIEW_BUILD_QUEUE 10 Builds that may wait; past it a deploy is turned away; 0 is off
GANGWAY_PREVIEW_BUILD_TIMEOUT 15m How long one build may run before it is stopped; 0 is off
GANGWAY_PREVIEW_BUILD_MEMORY 512m Memory the host must have available for a build to start; 0 is off
GANGWAY_PREVIEW_BUILD_DISK 2g Free space gangway’s state disk must have for a build to start; 0 is off
GANGWAY_RECONCILE_ORPHANS report (installer) report or stop containers that look like gangway’s but it does not know
Variable Default
GANGWAY_SMTP_URL (Admin) smtp://user:pass@host:587 or smtps://…:465, for invites and resets; or an https:// endpoint (see below)
GANGWAY_MAIL_FROM (Admin) The sender address
GANGWAY_OIDC_ISSUER (Admin) An OpenID Connect issuer URL, for single sign-on
GANGWAY_OIDC_CLIENT_ID (Admin) The client id gangway has at that provider
GANGWAY_OIDC_CLIENT_SECRET (Admin) Its client secret
GANGWAY_OIDC_LABEL (Admin) The sign-in button’s text; Sign in with SSO by default
GANGWAY_PASSWORD_LOGIN on false leaves only single sign-on, once the provider is set up
GANGWAY_UPDATE_CHECK on false stops the daily check for a new release
GANGWAY_WATERMARK_REPORT_URL (Admin) An https:// page the watermark’s Report link opens (below)
GANGWAY_REPORT_DOMAINS (Admin) Comma-separated domains whose previews always show the Report link
GANGWAY_GITHUB_APP_ID etc. (Admin) The GitHub App, if not created from Admin → GitHub

With an https:// URL, gangway sends no mail itself. It posts each message as JSON to that URL, and your service sends it, with its own templates if you like. The URL’s password (or its user name, if there is no password) goes as Authorization: Bearer <token>, and never in the request URL:

{
"from": "gangway <noreply@example.com>",
"to": "ana@example.com",
"subject": "Reset your gangway password",
"text": "…",
"purpose": "reset",
"link": "https://app.example.com/set-password#…"
}

purpose is invite, reset or test; link is the one-use link in text, or null for a test. Any 2xx answer counts as sent.

Variable Default
GANGWAY_STATE_DIR /state Database, logs, uploads and backups
GANGWAY_LOG_LEVEL info debug, info, warn or error
GANGWAY_CLOUDFLARED cloudflared The binary share links run; the image has one

The watermark can carry a Report link, so anyone viewing a preview can report it. Set the page it opens in Admin → Settings → Watermark, or with GANGWAY_WATERMARK_REPORT_URL. gangway adds the preview’s address as ?url= (or &url= when the page already has a query), with the origin and path only: a query string or fragment can hold a secret, so neither is sent.

Previews under the domains in GANGWAY_REPORT_DOMAINS always keep the link. With the watermark on, it sits beside the mark; with the watermark off, a small chip shows the Report link alone, with no gangway branding. A domain matches itself and every name under it: example.com covers shop.example.com, but not myexample.com. Set by environment variable, both settings are locked in Admin.