Skip to main content
Headscale works as Tailscale does: each Zode host that runs the environment’s sandboxes joins as a node tagged tag:zode, advertises its slice of the environment’s range, and accepts your routes. The only differences are your server’s address and where the key comes from. Read How private networking works first. Your Headscale server must be reachable from the internet over https://, since Zode’s hosts connect to it like any other node.

1. Allow the tag and approve its routes

Add the tag owner and route approval to your Headscale policy file, with your environment’s range in place of 10.77.0.0/16 and the user that will own the key:
Without autoApprovers, approve each router’s route with headscale nodes approve-routes.

2. Make a key

Create a user for Zode if you don’t have one, then a reusable pre-auth key with the tag:

3. Connect

--control-url is your server’s public address. Zode refuses anything that isn’t https://.

4. Check it

Then reach a host on your network from a sandbox, and a sandbox’s ZODE_PRIVATE_IP from one of your nodes. For MagicDNS names, add your base_domain: zode env network staging --domains tail.example.com. Reaching a sandbox also needs a security group with an inbound @mesh rule.

Disconnect

Every router logs out and its state is wiped. Expire the key with headscale preauthkeys expire once you no longer need it.