Tailscale Mesh VPN
During bootstrap, each agent installs Tailscale and joins your tailnet using a reusable auth key:Hostname Pattern
Agent hostnames combine the Pulumi stack name and agent name to avoid collisions across deployments:dev-agent-pm.tail12345.ts.netdev-agent-eng.tail12345.ts.netprod-agent-tester.tail12345.ts.net
No Public Ports
All services bind to127.0.0.1 (loopback) by default. Cloud firewalls enforce this at the network level:
| Provider | Mechanism | Default Rules |
|---|---|---|
| AWS | Security group | All inbound blocked, all outbound allowed |
| Hetzner | Firewall | All inbound blocked |
allowedSshCidrs (AWS) or allowedSshIps (Hetzner), but this is not recommended — use Tailscale SSH instead.
SSH Access
Theagent-army ssh command connects to agents through the Tailscale mesh:
--ssh flag enables SSH access over the mesh.
Web UI Access
Each agent runs an OpenClaw gateway that provides a web interface. Tailscale Serve proxies this over HTTPS:18789) never leaves localhost — Tailscale Serve handles TLS termination and proxies traffic from your tailnet to the local gateway.
Token-Based Gateway Auth
Each agent gets a unique gateway token, auto-generated during provisioning from an Ed25519 keypair (SHA256 hash, first 48 characters). The token is required to access the web UI:- Passed as a query parameter:
?token=<gateway-token> - Configured in
openclaw.jsonasgateway.auth.mode: "token" - Tokens are stored as Pulumi secrets and shown in deploy output
End-to-End Access Flow
| Direction | Allowed? | Detail |
|---|---|---|
| Inbound from public internet | Blocked | Firewall drops all inbound traffic |
| Inbound from tailnet | SSH + HTTPS only | Tailscale Serve and Tailscale SSH |
| Outbound from agent | All | GitHub, Linear, Anthropic API, etc. |
Security Summary
| Layer | Protection |
|---|---|
| Network | No public ports — firewall blocks all inbound traffic |
| Transport | WireGuard encryption via Tailscale mesh |
| Gateway | Token-based auth, binds to loopback only |
| SSH | Tailscale SSH — no password auth, no public key exposure |
| Metadata (AWS) | IMDSv2 enforced — prevents unauthenticated metadata access |
| Secrets | Pulumi encrypts API keys, tokens, and credentials at rest |
| Sandbox | Docker-based code execution isolates agent workloads |