Tailscale gateways
Connect hosted runs to a private HTTPS gateway on your tailnet.
Connect your tailnet
An org admin sets up the tailnet once. Hosted runs using the org environment can then reach the selected private services. You can keep the gateway inside the tailnet without opening a public listener.
- In Tailscale, create a device tag such as
tag:zeroshot. Grant the tag access to the intended gateway hostname or device and its HTTPS port. The private origin needs a certificate trusted by Platform for that hostname. Tailscale access controls. - Create a Tailscale OAuth client with Auth Keys write permission for that tag. Save the client ID and secret. Tailscale OAuth clients.
- Open Org settings → Private networks → New private network in Platform. Name the network, choose Tailscale, and enter the device tag and OAuth credentials. Platform enrolls an ephemeral tagged device. Hosted workers reach the selected HTTPS origins through the Platform proxy.
Use the gateway’s full MagicDNS hostname. If the gateway is behind a subnet router, approve its advertised subnet in Tailscale. For a custom private domain, configure tailnet DNS with a resolver whose IP is reachable through the tailnet and accepts DNS over TCP on port 53. Grant the device tag access to that resolver and to the gateway’s HTTPS port. Subnet routers. Tailnet DNS.
When a hosted connection cannot reach a peer directly over UDP, Tailscale carries the end-to-end encrypted traffic through an HTTPS relay. A relayed connection can take longer than a direct connection.
Use an existing HTTPS proxy instead
Run an HTTPS forward proxy that supports CONNECT on a machine that can reach the gateway. Platform opens an encrypted connection to this proxy and asks it to connect to the gateway’s hostname and port. Your proxy resolves that name using its own DNS. The gateway stays private. The proxy’s HTTPS listener must be reachable from Platform.
For Tailscale, put the proxy host on your tailnet. Give its Tailscale identity access to the gateway’s HTTPS port and confirm that the gateway hostname resolves from that host. Restrict the proxy to the intended destinations and protect its listener with username and password or a client certificate. Tailscale Serve alone does not provide an HTTP CONNECT forward proxy. Tailscale access controls.
The gateway needs a certificate trusted by Platform for its exact hostname. A publicly trusted certificate works even when the service is only reachable inside the tailnet. For a Tailscale machine name, see Tailscale HTTPS certificates.
In Org settings → Private networks → New private network, select HTTPS CONNECT proxy. Enter its reachable HTTPS endpoint and choose its authentication method. Add the public proxy CA certificate if the proxy uses a private authority.
Connect an org environment
- Enter the exact gateway origin under Approved HTTPS origins, such as
https://models.example.ts.net:8443. Save the network, then click the plug beside the destination. A green, joined plug means Platform reached the origin and verified its TLS certificate. Hover over or focus a red plug to see the error. The result describes that moment. The check runs without calling the gateway API. - Open an org environment. Under Network → Private HTTPS origins, select the origin and save the environment. Runs using this environment get the route even when public internet access is set to None. You can select services from multiple networks.
- In Connections, configure the gateway with its API key and full base URL, including the API path, such as
https://models.example.ts.net:8443/v1. Select this connection in the profile and use the saved org environment for the run. Gateway connection settings.
For CLI runs, assign the saved environment to the repository. Passing --environment FILE replaces that environment for the run and drops its private routes. In the web app, select the saved environment under Start a run. Environment selection.
Rotate credentials
Edit the network to replace credentials for the same proxy or OAuth client. Enter both fields together. To use a different OAuth client, device tag, proxy endpoint or proxy CA, create a new private network, check the origin and switch its assignment in the environment before deleting the old one. Wait for runs using a network to finish before editing or deleting it.
If the connection fails
For a native Tailscale connection, check the OAuth client’s tag and scopes, the tailnet access policy, private DNS and the gateway’s certificate. For a CONNECT proxy, check its public DNS name, port, certificate and login. From the proxy host, verify private DNS, tailnet permissions, the gateway certificate, and permission to CONNECT to the gateway port. If the connection check succeeds but the gateway returns a 401, check the gateway key and the API path in the saved connection.
A hosted worker uses the normal Platform proxy. Installing Tailscale or setting a second proxy in a startup hook is unnecessary. For tools that need arbitrary TCP, UDP or a full network interface, run Zeroshot on a host inside your tailnet. Self-hosted targets. Original community walkthrough by naqerl.