--- 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 the tag:notplants-test-server tailnet tag or the ACL blocks the gateway from reaching 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 must carry the `notplants-test-server` tag The tailnet ACL only permits the gateway to open connections to nodes tagged **`tag:notplants-test-server`**. Without it 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 `tag:notplants-test-server` is not listed, add it 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 the tag. `gateway-domain.py` warns when the node it is about to map lacks the tag, 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 `