INSTALLATION
Copy, paste, running in minutes.
Site Gateway ships as a single container. Point it at a data directory, set an admin password, and it handles TLS, routing, and backups from there.
01 · Docker Compose
The recommended way to run Site Gateway. Drop this into compose.yaml and adjust the two required environment values.
services:
site-gateway:
image: ghcr.io/mfwadejr/site-gateway2:latest
container_name: site-gateway
restart: unless-stopped
environment:
ADMIN_USERNAME: admin
ADMIN_PASSWORD: changeme # required — set a strong password
SESSION_SECRET: changeme-too # required — any random string
ADMIN_PORT: 8080
SITE_PORT_MIN: 9000
SITE_PORT_MAX: 9099
DATA_DIR: /data
PUID: 1000 # Unraid: use 99
PGID: 1000 # Unraid: use 100
ports:
- "80:80"
- "443:443"
- "443:443/udp" # HTTP/3 (QUIC) — forward UDP 443 on your router/firewall too
- "8080:8080"
- "9000-9099:9000-9099"
# Streaming Hosts (optional): add one line per TCP/UDP port you
# forward from the dashboard. Example for a Minecraft server:
# - "25565:25565"
# - "25565:25565/udp"
volumes:
- /path/to/data:/data
Then bring it up: docker compose up -d. The same file works unmodified in Portainer's Stacks and ZimaOS.
02 · Plain docker run
Prefer a single command over a compose file? This is equivalent to the block above.
docker run -d \
--name site-gateway \
--restart unless-stopped \
-e ADMIN_USERNAME=admin \
-e ADMIN_PASSWORD=changeme \
-e SESSION_SECRET=changeme-too \
-e ADMIN_PORT=8080 \
-e SITE_PORT_MIN=9000 \
-e SITE_PORT_MAX=9099 \
-e DATA_DIR=/data \
-p 80:80 -p 443:443 -p 443:443/udp \
-p 8080:8080 \
-p 9000-9099:9000-9099 \
-v /path/to/data:/data \
ghcr.io/mfwadejr/site-gateway2:latest
03 · Unraid
Add the container from Docker → Add Container using the image ghcr.io/mfwadejr/site-gateway2:latest, or search Community Applications once a template is published. Map the same ports and one path as above.
PUID=99 and PGID=100 instead of the Linux defaults shown in the compose file, so the container writes to /data as the nobody/users account Unraid expects.04 · Environment reference
| Variable | Required | Default | Notes |
|---|---|---|---|
ADMIN_USERNAME | Yes | — | Initial administrator account, created on first boot. |
ADMIN_PASSWORD | Yes | — | Use a strong, unique password — this account can manage every route and Access List. |
SESSION_SECRET | Yes | — | Any random string. Rotating it signs everyone out. |
ADMIN_PORT | No | 8080 | Dashboard port, mapped separately from 80/443. |
SITE_PORT_MIN / SITE_PORT_MAX | No | 9000–9099 | Direct-LAN port range Hosted Sites can bind to. |
DATA_DIR | No | /data | Where the SQLite database, certificates, hosted files, and backups live. Should map to a persistent volume. |
PUID / PGID | No | 1000 / 1000 | User/group the container writes files as. Use 99/100 on Unraid. |
05 · Streaming Hosts (optional)
Raw TCP/UDP forwarding (game servers, SSH, anything that isn't HTTP) needs its own port published up front — Docker can't add ports to a running container. Add one line per port to the ports: list before creating the Streaming Host in the dashboard, then recreate the container:
"25565:25565"and"25565:25565/udp"for a Minecraft server, for example.- Match the container-side port to whatever you'll enter as the Streaming Host's target port.
06 · First login
Once the container is healthy, open http://<your-host>:8080 and sign in with the administrator credentials you set above. From there:
- Create your first route — Hosted, Proxy, Redirect, or Streaming — from the dashboard.
- Point a domain's DNS at this host, and Site Gateway/Caddy handle certificate issuance automatically.
- Set up a scheduled backup under Backup & Restore before you rely on this for anything real.