Skip to main content
Each Zode host that runs the environment’s sandboxes joins your tailnet as a device tagged tag:zode, advertises its slice of the environment’s range as a subnet route, and accepts your tailnet’s routes. Read How private networking works first.

1. Allow the tag and approve its routes

In the Tailscale admin console, open Access controls and add these to your policy file, with your environment’s range in place of 10.77.0.0/16:
autoApprovers approves each router’s route as it comes up, so new hosts need nothing from you. Without it, approve each zode-<environment>-<host> device’s route by hand under Machines.

2. Write the access rules

Sandboxes appear on your tailnet as their own private IPs, so write rules for the range and the tag like any other device. For example, sandboxes may reach your Postgres, and engineers may reach the sandboxes:

3. Make a credential

Both read the secret from stdin too, for scripts: printf %s "$TS_KEY" | zode env mesh staging tailscale.

4. Check it

Each host’s router shows ONLINE and its approved routes. Then, from a sandbox and from your laptop:
To use MagicDNS names in sandboxes, list your tailnet’s DNS name: zode env network staging --domains tail1234.ts.net. Reaching a sandbox from your tailnet also needs a security group with an inbound @mesh rule.

Disconnect

Every router logs out and its state is wiped. The devices stay in your admin console until Tailscale removes them, or you delete them.