Skip to content

Quickstart

  • A host with Docker (Engine, Desktop or Colima) or Podman, with Compose.
  • To serve previews on your own domain:
    • a domain with a wildcard DNS record, such as preview.example.com and *.preview.example.com, pointing at the host (or at the reverse proxy in front of it);
    • a wildcard certificate for it. A reverse proxy in front can hold it, or gangway can get one itself from Let’s Encrypt with a Cloudflare API token.

No domain yet? Install with --lan to try gangway from any machine on your network, or --local for this machine only. See Choosing a mode.

On the host, as root or a user in the docker group:

Terminal window
curl -fsSL gangway.sh/install | sh

The installer asks where gangway should answer:

Answer What it means
proxy (default) your domain, behind a reverse proxy already on this host
acme your domain, with gangway holding port 443 and getting its certificate
lan no domain, on your network, to try it out
local no domain, on this machine only

It then checks Docker, DNS and the ports, writes /opt/gangway/.env and compose.yaml, starts gangway, and prints a one-time link. On Unraid, see Unraid instead.

Open the link the installer printed. There are no default credentials: the link creates the first admin account. Until that account exists, the link changes on every start, and this prints the current one:

Terminal window
docker logs gangway 2>&1 | grep setup

In the dashboard, go to New preview and drop in a folder, or start from a runtime’s example. A few seconds later the preview has its own URL.

From a terminal, with a token from Account:

Terminal window
tar -czf - . | curl --fail -X POST \
-H "Authorization: Bearer $GANGWAY_TOKEN" -H "Content-Type: application/gzip" \
--data-binary @- "https://api.preview.example.com/v1/previews?name=hello&runtime=auto&wait=true"