--- name: gateway-domain description: Give a tailnet box a real public HTTPS domain (.gtest.commoninternet.net) by mapping it on the shared testing gateway. Use when an agent needs a publicly reachable URL for a box with no public IP — an OAuth callback, a webhook receiver, a demo link, an ACME challenge. Covers the add/remove tool, where the admin password lives, and the two things that silently break it: your box must carry a tailnet tag the ACL allows (tag:notplants-test-server or tag:orchestrator) or the gateway cannot reach it, and your box serves the TLS cert rather than the gateway. --- # Giving your box a public domain Your machine is on the tailnet with no public IP. You need a real HTTPS URL for it. The **testing gateway** already owns a wildcard DNS record, so every name under `*.gtest.commoninternet.net` resolves to it. Map your name to your tailnet IP and it forwards matching traffic to you. ```bash python3 engine/tools/gateway-domain.py add myapp # myapp.gtest.commoninternet.net -> 100.84.190.30 ``` That is the whole happy path. The backend defaults to **this box's own tailscale IP**, so run it on the machine that will serve the domain. ## Your box needs a tailnet tag the ACL allows The gateway can only open connections to nodes the tailnet ACL lets it reach. Two tags qualify: | tag | who | |---|---| | `tag:notplants-test-server` | test servers — the usual case | | `tag:orchestrator` | orchestrator boxes (added 2026-08-20, verified end to end) | Without one of them the gateway accepts your mapping and then simply never connects — which looks like a broken gateway and is not one. Check before you start: ```bash tailscale status --json | jq -r '.Self.Tags[]?' ``` If neither tag is listed, add one to that node in the Tailscale admin (a node's tags are set when it is authenticated, so this may mean re-authenticating it), or map a backend that already has one. `gateway-domain.py` warns when the node it is about to map carries neither, but it cannot see the tags of a backend you name explicitly — that one is on you. The gateway itself is tagged `tag:testing-gateway`; that is the other half of the same ACL rule. ## The commands ```bash python3 engine/tools/gateway-domain.py list python3 engine/tools/gateway-domain.py add myapp # this box, port 443 python3 engine/tools/gateway-domain.py add myapp 100.64.1.5 # another box python3 engine/tools/gateway-domain.py add myapp 100.64.1.5:8443 # backend not on 443 python3 engine/tools/gateway-domain.py remove myapp ``` A bare label is expanded to `