Introduction
Why Site Gateway exists
Reverse proxies often expose powerful settings without explaining what they change. Site Gateway provides a visual, Caddy-powered control plane for static sites, proxy routes, redirects, raw TCP/UDP streams, HTTPS, health checks, access control, and recovery — covering everything from a single ZIP upload to a full homelab of proxied applications.
How this manual is organized
Each area below has an overview article (what it’s for and how to configure the common case) followed by a field reference article covering every advanced control, one at a time. Use the sidebar to jump straight to a section, or search for any field name, error message, or setting — search matches headings, body text, and field names together.
Novice path
Create one route, test it locally, then add a domain and TLS. Keep defaults until you have a reason to change them.
Expert note
Configuration is stored in SQLite under /data and every generated Caddy configuration is validated before reload — if validation fails, the previous working configuration stays active and the failure is explained in Gateway Events.
Getting started
From installation to your first route
Install the container with persistent /data storage, open the management port (8080 by default), and complete the administrator setup screen shown on first launch. Before publishing public domains, confirm DNS already points to this server and that ports 80 and 443 are free for Site Gateway to use.
Choosing your first route type
- Hosted Site: you have static files (a ZIP or a single
index.html) and want Site Gateway to serve them directly. - Proxy Host: you already have an application running somewhere — another container, a LAN device, another server — and want a domain and HTTPS in front of it.
- Redirect Host: you want a domain to simply forward visitors to a different address.
- Streaming Host: you need to forward a raw TCP or UDP port (SSH, Minecraft, a game server) with no domain and no HTTPS involved.
Example
Publish a ZIP on a direct port first so you can confirm it works over LAN, then add www.example.com once DNS and port forwarding are ready and Automatic HTTPS can issue a certificate.
Hosted Sites
Overview: publish a static website
A Hosted Site serves files you upload directly — no separate application or container required. Use it for a static site, a single-page app build, documentation, or anything that’s just HTML/CSS/JS.
Creating a Hosted Site
- Name: the label shown in Site Gateway; it doesn’t need to match the domain.
- Primary domain Optional: leave blank for port-only LAN access, or set a hostname to serve the same files there once DNS is ready.
- Additional domains: one alias per line — every alias serves the same files under the same TLS settings as the primary domain.
- Port: the direct LAN port this site answers on. Must fall inside the configured port range (shown as a hint on the form, default
9000–9099) and not already be used by another site. - TLS: Automatic public HTTPS (default, requires a working domain and open ports 80/443), Internal HTTPS for trusted local devices, or HTTP only.
- Enable HSTS after HTTPS is verified: only turn this on once you’ve confirmed HTTPS works for every client — HSTS tells browsers to refuse HTTP entirely for this domain going forward, and that’s hard to undo quickly.
- Website files: upload a ZIP whose root contains
index.html (a single top-level folder inside the ZIP is automatically flattened), or upload a bare index.html file directly. Up to 250 MB.
Updating an existing site
Use Replace files from the card’s menu to upload a new ZIP or HTML file without recreating the site or losing its domain/TLS/health settings. Use Domain & TLS to change the domain, TLS mode, or any advanced setting below.
Expected behavior
Files are served immediately on the chosen port and, once configured, through the domain as well.
Hosted Sites
Advanced options and health monitoring
Expand Advanced options on the create or edit form for these controls:
- Access List: applies a reusable network or login restriction before any visitor reaches this site. Choose Public — no Access List to leave it open.
- Compression: Automatic zstd + gzip (default), gzip only, or Off.
- Request headers / Response headers: one
Name: value pair per line, up to 30 each. Request headers are added before Caddy processes the request; response headers are added to what visitors receive. - Apply HSTS to subdomains: adds
includeSubDomains to the HSTS header; only takes effect when HSTS itself is on and TLS isn’t HTTP only. - Custom Caddy configuration: expert-only raw Caddyfile lines appended to this site’s block, validated before reload. Lines that would touch the global config block, the admin API, storage, or
import/persist_config directives are rejected outright, since those could affect every other route on the gateway.
Monitoring this site
Hosted Sites can be health-checked the same way Proxy Hosts are: a Health-check path (default /), method (GET or HEAD), expected status (a code, list, or range such as 200, 200,204, or 200-499), a timeout in seconds (1–60, default 4), up to 3 retries, and a Monitor this site toggle. Turning monitoring off shows the card as “Monitoring paused” instead of running a periodic check.
Proxy Hosts
Overview: connect a local application
A Proxy Host puts a domain and HTTPS in front of something already running elsewhere — another container, a LAN device, or a remote service.
Creating a Proxy Host
- Name: the label shown in Site Gateway.
- Primary domain and Additional domains: same behavior as Hosted Sites.
- Forward to: the upstream address, e.g.
http://192.168.1.20:8123. Use the container name, LAN address, or application URL — no path or query string beyond a trailing slash. - Upstream pool Optional: additional
http(s):// targets, one per line, up to 10. When present, Caddy load-balances across every healthy target instead of using the single Forward-to address alone. - TLS: Automatic public HTTPS, Internal HTTPS, Custom uploaded certificate, or HTTP only.
- Enable HSTS after HTTPS is verified.
Example
For Jellyfin at 192.168.1.20:8096, use domain jellyfin.example.com and forward target http://192.168.1.20:8096. Site Gateway checks the upstream continuously and Caddy manages an eligible public HTTPS certificate automatically.
Proxy Hosts
Advanced options, field by field
Most applications only need a domain, Forward-to target, and TLS choice. These controls are for applications with unusual paths, authentication needs, response codes, headers, or performance requirements.
- Access List: applies reusable login and network rules before the upstream is reached.
- Health-check path and method: the request Site Gateway makes when checking this application (path default
/; GET or HEAD). - Expected status: accepts a single code, a comma list, or a range —
200, 200,204, or 200-399. - Timeout in seconds: 1–60, default 4.
- Monitor this upstream: when off, the status shows “Monitoring paused” and no periodic request is made.
- Compression: Automatic zstd + gzip, gzip only, or Off.
- Custom Locations: send specific paths to a different upstream. One per line:
/api/* | http://192.168.1.20:3001 | strip or preserve — strip removes the matched prefix before forwarding, preserve keeps it. Up to 20 entries. - Request headers / Response headers: same
Name: value-per-line format as Hosted Sites. - Upstream TLS server name: an optional SNI name expected by the upstream certificate. Only meaningful when every upstream target uses
https:// — the field is disabled otherwise. - Ignore upstream TLS certificate errors: use only for a trusted internal HTTPS service with a self-signed or hostname-mismatched certificate; also requires an HTTPS upstream to take effect.
- Apply HSTS to subdomains.
- Custom Caddy configuration: same validation rules as Hosted Sites’ custom configuration. NGINX syntax is not supported — Site Gateway generates Caddyfile syntax.
How to verify a change
Save one setting at a time, watch the card’s upstream status line, check Access Logs, and compare against a direct request to the application. If Caddy rejects a custom configuration, Site Gateway keeps the last known-good configuration active and shows the rejection reason.
Proxy Hosts
Custom uploaded certificates
Choosing Custom uploaded certificate as the TLS mode reveals two file fields: Certificate PEM and Private key PEM. Both are required together — Site Gateway verifies the private key’s public key actually matches the certificate before accepting the pair, and confirms the certificate’s Subject Alternative Names cover every domain configured on that Proxy Host. A certificate that doesn’t cover every alias is rejected rather than silently applied to only some of them.
Accepted files are stored under /data/certificates/custom and included in complete backups. Replacing a custom certificate later works the same way — upload both files again through the same field.
Redirect Hosts
Overview: move an address safely
A Redirect Host sends visitors from one domain straight to another, with no files hosted and no application behind it.
Fields
- Name.
- Source domain: the old address people currently use.
- Additional source domains: further aliases that redirect the same way.
- Destination: a complete
http:// or https:// URL to send visitors to. - Redirect type:
302 Temporary (default), 301 Permanent, 307 Temporary — preserve method, 308 Permanent — preserve method. - TLS: Automatic HTTPS, HTTP only, or Internal HTTPS — this governs the source domain, not the destination.
- Preserve path and query (on by default): when enabled,
old.example.com/library?id=2 becomes new.example.com/library?id=2 instead of always landing on the destination’s root. - Access List Optional: protects the source domain the same way it protects Hosted Sites and Proxy Hosts.
Choosing a redirect type
Use 301 or 308 only when the move is meant to be permanent — browsers and search engines cache these aggressively. Use 302 or 307 while you’re still testing the new destination.
Streaming Hosts
Overview: raw TCP/UDP port forwarding
A Streaming Host forwards a raw TCP or UDP port straight to another host and port — there’s no domain, no HTTPS, and no HTTP layer involved at all, unlike every other route type in Site Gateway. Use it for services that speak their own protocol directly over a port: SSH, a Minecraft or other game server, a VPN endpoint, or any similar TCP/UDP service.
The one prerequisite: publish the port first
Streaming Hosts listen for connections from inside the Site Gateway container itself — they are not routed through Caddy the way domains are. That means the incoming port must already be published on the container (added to your docker-compose.yaml or Unraid port mappings, with the container recreated) before you create the matching Streaming Host in the UI, or nothing outside the container will ever reach it.
Example docker-compose port mapping
To forward SSH (22) and a Minecraft server (25565):
ports:
- "22:22/tcp"
- "25565:25565/tcp"
Creating a Streaming Host
- Name.
- Incoming port: 1–65535. Cannot be the admin port, 80, 443, a port already inside the Hosted Sites port range, or a port already used by another Streaming Host.
- Forward to: a plain
host:port address, e.g. 192.168.1.20:25565. No http:// — this is a raw socket forward, not a web address. - TCP / UDP: enable one or both. At least one must stay checked.
- Monitor this target: runs a TCP reachability probe against the forward address every check cycle, even for UDP-only streams (UDP itself has no reliable way to “ping” a service).
Streaming Hosts
How the forwarding actually works
TCP is a full one-to-one relay: every inbound connection gets its own fresh outbound connection to the forward target, and the two are piped together in both directions. Closing or erroring either side tears down the other.
UDP is connectionless, so Site Gateway multiplexes many remote clients over one listening port by tracking a short-lived “session” per unique client address, each with its own outbound socket to the forward target. An idle session is cleaned up automatically after about a minute of inactivity.
Health monitoring
The monitor always performs a plain TCP reachability check against the forward address, with a 4-second timeout — this confirms the target host and port are reachable, not that the specific game or service protocol is fully healthy. Disabling monitoring shows the card as “Monitoring paused” rather than unreachable.
Practical examples
- SSH: incoming port
2222, forward to 192.168.1.30:22, TCP only. - Minecraft: incoming port
25565, forward to 192.168.1.20:25565, TCP (and UDP if the specific server/mod needs it — vanilla Minecraft is TCP-only).
Editing a Streaming Host
Changing the port, target, or protocol checkboxes restarts the listener immediately to apply the change; toggling Enable/Disable does the same.
Certificates
Overview: automatic HTTPS prerequisites
For Automatic HTTPS to succeed, a domain must resolve to your public address, inbound ports 80 and 443 must reach Site Gateway, and no other service (including another reverse proxy) can already own those ports on this host.
Domain readiness checks
- DNS: confirms the domain actually resolves, and to what address.
- HTTP / HTTPS: confirms Caddy itself is listening on ports 80/443 inside the container — this does not by itself prove the internet can reach you, only that the gateway is ready to answer if it can.
- TLS: reflects the certificate status for that domain (healthy, renewing soon, critical, expired, or “Waiting for Caddy,” meaning issuance hasn’t completed yet — not that anything is broken).
- Upstream (Proxy Hosts only): the latest health-check result for that route.
Check now
Forces an immediate re-check of every certificate, domain readiness result, and health probe instead of waiting for the periodic background check.
Novice workflow
Confirm DNS, forward ports 80 and 443, stop any competing proxy, then run Check now. Don’t troubleshoot an upstream application until the domain and HTTPS checks themselves are healthy.
Certificates
Field reference and thresholds
Expanding a certificate’s details shows: status, valid-from date, issuer, every domain it covers, serial number, SHA-256 fingerprint, and when it was last detected — deliberately excluding private key material.
Status thresholds
Set from Administration → Security & Health:
- Renewing-soon warning: days remaining before a certificate is flagged as renewing soon (8–120, default 30).
- Critical warning: days remaining before it’s flagged critical; must stay lower than the renewing-soon threshold (default 7).
- Stale health data: minutes before a displayed check is considered old and worth re-running (2–1440, default 10).
A status of mismatch means a custom certificate was uploaded for that route but its coverage doesn’t include every configured domain — upload a replacement covering all of them.
Access Lists
Overview: protect a route
An Access List restricts who can reach a Hosted Site, Proxy Host, or Redirect Host, by network address, by login, or both. Assign a saved list from that route’s Advanced options.
Fields
- Name.
- Allowed networks: one IP, CIDR range, or the literal
private_ranges per line. When set, every network not listed is denied — this is an allow-list, not a suggestion. - Denied networks Optional: evaluated before allowed networks and logins, so a denied entry always wins even if it would otherwise be allowed.
- Logins: add one or more username/password pairs directly on the Access List (passwords need at least 8 characters; leaving a password blank while editing an existing login keeps it unchanged).
- Groups: alternatively, let members of a Group (Administration → Users & Groups) authenticate with their own Site Gateway username and password instead of a separate Access-List-only login.
At least one rule — a network rule, a denied-network rule, or a login — is required before the list can be saved.
Assigning and inspecting
Use a route’s Advanced options to assign an Access List to it, or use the Access List’s own View assigned hosts menu action to see everywhere it’s currently in use. An Access List can’t be deleted while anything still references it — unassign it from every host first.
Users & Groups
Overview: control who can change the gateway
Every account has a role:
- Administrator: full access, including Users, Groups, Settings, and Backups.
- Standard User: can manage Hosted Sites, Proxy Hosts, Redirect Hosts, Streaming Hosts, and Access Lists, but not Users, Groups, Settings, or Backups.
- Viewer: read-only — can inspect everything but change nothing.
Creating a user
- Display name.
- Username: 3–64 characters, letters/numbers/
._-, must be unique. - Role.
- Temporary password: at least 8 characters — share it securely and have the person change it after their first sign-in.
Managing an existing user
An administrator can change a user’s role, reset their password, archive them (a reversible soft-disable distinct from deleting), or delete them outright. You cannot disable, archive, delete, or change the role of your own account — another administrator has to do that — and Site Gateway always keeps at least one active Administrator, refusing any action that would leave zero.
Groups
A Group is simply a named set of users. Its only purpose is authentication: assign a Group to an Access List so its members can log in with their own Site Gateway credentials instead of a separate Access-List-only login.
Audit history
Administration includes an Audit log — a searchable, filterable, immutable record of who did what, filterable by outcome (success/failed) and free-text search across the user, action, and target. Audit entries can’t be edited or deleted.
Administration
Gateway Defaults: handling unknown addresses
Controls what happens when a visitor reaches Site Gateway on HTTP using a hostname that isn’t configured. (Unknown HTTPS hostnames are always rejected outright, regardless of this setting, since serving anything else would need a certificate Site Gateway doesn’t have — and issuing a misleading one would be worse.)
Response modes
- Themed route-not-found page (404) — the safest public default.
- Gateway ready page (200) — useful while confirming HTTP routing during initial setup.
- No response — close connection.
- Redirect elsewhere: set a destination URL, redirect code, and whether to preserve the requested path and query.
- Custom HTML: administrator-authored markup, served exactly as written with no sanitization — up to 250,000 characters.
The themed page’s heading and explanation text are also editable here, independent of which mode is active.
Administration
Backup & Restore
A Configuration only backup contains a consistent SQLite snapshot of every route, user, group, Access List, and setting, plus a portable JSON export of the same data. A Complete backup adds uploaded Hosted Site files, icons, the default-site page, and certificates (both managed and custom).
Scheduled backups
- Enable scheduled backups.
- Type: Configuration only or Complete.
- Schedule: Daily, Weekly, or Monthly, plus the hour of day to run.
- Keep: how many scheduled backups to retain (1–100, default 7) — older ones beyond this count are deleted automatically after each run.
- Include logs.
- Encrypt scheduled backups: uses the container’s
BACKUP_PASSWORD environment value — enable this only after that value is actually configured, or scheduled runs will fail.
Manual backup, encryption password
The optional backup password field on this page is used only for manually created backups and for restoring an encrypted archive — it is never stored by Site Gateway.
Restore checklist
- Download or import the
.sgbackup archive (importing just stages the file — restoring is a separate, explicit action). - Supply its password if it’s encrypted.
- Choose Restore and allow validation to finish.
- Confirm hosts, certificates, and upstream health afterward.
Site Gateway verifies every file’s checksum and automatically creates a safety backup of the current state before restoring anything. If the restored configuration turns out to be invalid, it automatically rolls back to that safety backup rather than leaving the gateway in a broken state.
Administration
Security, Health & Updates
Site Gateway validates every generated Caddy configuration before reload and keeps the previous working configuration active if validation fails. Container updates are installed by pulling a new pinned image — create a backup first.
Certificate health thresholds
See Certificates → Field reference for what Renewing-soon warning, Critical warning, and Stale health data actually control.
Support report
Downloadable by administrators only. Includes version info, Caddy/Node versions, storage integrity-check result, gateway health, a redacted route summary, full certificate and domain readiness output, and recent activity. It deliberately excludes passwords, private keys, session secrets, cookies, and certificate contents — safe to share when asking for help.
Logs & Retention
Set how many days of Access, Activity, Audit, Certificate, and Security records to keep (7–3650 days each) and whether automatic pruning is enabled. Prune Now shows exactly how many records in each category are eligible before you confirm, and Download Logs exports them.
Administration
Danger Zone
Two separate, deliberately distinct destructive actions — kept apart so a routine preference correction is never confused with a full rebuild. Both require re-entering your own administrator username and password, typing an exact confirmation phrase, and then confirming a second themed dialog by typing YES.
Restore Defaults
Confirmation phrase: RESTORE DEFAULT. Resets Gateway Defaults, backup schedule settings, and certificate-health thresholds back to their starting values. It does not remove any hosts, uploaded files, users, groups, Access Lists, certificates, logs, or backups.
Factory Reset
Confirmation phrase: FACTORY RESET. Deletes everything under /data — every host of every kind, uploaded files, certificates (managed and custom), logs, backups, icons, users, and settings. Docker-mounted files outside /data are untouched. The container returns to the initial setup screen without needing a manual restart. Because backups themselves live under /data/backups, they’re deleted too — recovery is only possible from a backup taken beforehand and stored elsewhere (downloaded, or on separately mounted storage).
When to use a backup instead
If you want to undo a recent change while keeping the rest of the installation intact, restore a backup — Factory Reset is not a rollback tool.
Logs
Access Logs and Gateway Events
Access Logs
Every request Caddy handles, with domain, path, response status, latency, and upstream outcome. Filter by host or by status-code range (2xx/3xx/4xx/5xx). Sensitive query-string values — tokens, secrets, passwords, session identifiers, API keys, credentials — are redacted before they’re ever stored, regardless of filter settings.
Gateway Events
Configuration and operational changes, filterable by severity (Normal/Warnings/Errors) and by category (certificate, health, authentication, backup, configuration, or system).
Example
Filter Access Logs for a 502, then compare the target address against a direct LAN request to the same upstream to isolate whether the problem is the gateway or the application itself.
Common Interface Controls
Menus, toggles, and role gating
The same card language is used throughout Hosted Sites, Proxy Hosts, Redirect Hosts, Streaming Hosts, Access Lists, Groups, and Users, so learning one area transfers directly to the next.
The three-dot menu
Contains actions that change or inspect a card: Edit opens the full form, kind-specific extras appear where relevant (Replace files on Hosted Sites, View assigned hosts on Access Lists), and Delete removes the record after a confirmation.
The toggle switch
A slide switch, separate from the menu, turns a route or account on or off without deleting its saved configuration — useful during maintenance or testing when you expect to reuse the exact same settings shortly after.
Who can use each control
Administrators can manage everything. Standard Users can manage Hosted Sites, Proxy Hosts, Redirect Hosts, Streaming Hosts, and Access Lists, but not Users, Groups, Settings, or Backups. Viewers can inspect information but cannot create, edit, disable, assign, or delete anything — their menus and toggles are hidden entirely. This is enforced on the server independently of what the interface shows, so hiding a button is a convenience, not the actual security boundary.
Icons
Changing a card’s icon
Every Hosted Site, Proxy Host, Redirect Host, Streaming Host, Access List, Group, and User can have its own icon. Open the picker from a card’s icon tile or its “Change icon” menu action.
- Search by service name: type at least 2 characters (e.g.
Jellyfin, Plex) to search a large built-in icon catalog and pick a match. - Upload a custom image: PNG, JPEG, WebP, GIF, or SVG, up to 2 MB, stored locally under
/data/icons. Uploaded SVGs are checked for embedded scripts or external references before being accepted. - Image URL: paste a direct
https:// image link instead of uploading a file. - Use two-letter fallback: clears any icon and reverts to initials derived from the name.
If a custom icon URL ever stops loading, the card automatically falls back to showing initials instead of a broken image.
Troubleshooting
When HTTPS is not detected
Confirm public DNS actually points to this server, that router/firewall forwarding reaches ports 80 and 443, and that NGINX Proxy Manager or another reverse proxy isn’t still holding those ports. Then check Certificates and Logs → Gateway Events for the specific rejection reason. Site Gateway cannot request a public certificate while another gateway is receiving the ACME challenge on its behalf.
A route rejected its configuration
Check the error shown on save — it names the specific problem (duplicate address, invalid upstream, malformed custom configuration, certificate/TLS issue) rather than a generic failure, and the previous working configuration stays active while you fix it.
A Streaming Host isn’t reachable from outside
This is almost always the port not being published on the container yet — see Streaming Hosts → Overview for the docker-compose/Unraid port mapping requirement.