Skip to main content

Tailscale VPN

VoidRun provides native Tailscale integration, allowing sandboxes to securely connect to your private tailnet. This enables AI agents and code execution environments to interact with internal APIs, databases, and services without exposing them to the public internet.

🔒 Zero-Trust Security

WireGuard-based encryption with automatic key rotation.

🌐 Private Access

Connect to internal APIs, databases, and services securely.

⚡ Simple Setup

Pre-installed in all VoidRun images. Just authenticate and connect.

Prerequisites

Before connecting a sandbox to your tailnet, ensure you have:
1

Create a Tailscale Account

Sign up at tailscale.com if you don’t have one.
2

Generate an Auth Key

  1. Go to the Tailscale Admin Console
  2. Click “Generate auth key”
  3. Configure key settings:
    • Description: voidrun-sandboxes
    • Reusable: Enable for multiple sandboxes
    • Ephemeral: Enable (recommended) - nodes auto-remove after disconnect
    • Tags: Optional - assign ACL tags for access control
  4. Copy the auth key (starts with tskey-auth-)
3

Store Auth Key Securely

Store your auth key in environment variables or a secrets manager. Never commit it to source control.
Ephemeral nodes are strongly recommended for VoidRun sandboxes. Without ephemeral mode, each sandbox creates a permanent node in your tailnet, which can clutter your network and reach node limits.

Connecting to a Tailnet

Basic Connection

Connect a sandbox to your tailnet using an auth key:

Connection with Tags

Use ACL tags for fine-grained access control:

Interacting with Private Resources

Once connected to your tailnet, the sandbox can access any resource available to your Tailscale network.

Access Internal APIs

Connect to Databases

SSH to Internal Servers

Ephemeral Nodes

Ephemeral nodes are critical for VoidRun sandboxes. Each sandbox creates a new node in your tailnet. Without ephemeral mode, these nodes persist forever, cluttering your network and potentially reaching Tailscale’s node limits.

Creating Ephemeral Auth Keys

When generating your auth key in the Tailscale Admin Console:
  1. Navigate to Settings → Keys
  2. Click Generate auth key
  3. Enable “Ephemeral” - This is essential!
  4. Optionally enable “Reusable” for multiple sandboxes

Ephemeral Node Behavior

Checking Node Status

ACL Configuration

Control what your VoidRun sandboxes can access using Tailscale ACLs. Create a tag-based access policy:

Example ACL Policy

This policy allows sandboxes with tag:voidrun to:
  • Access all ports on servers tagged api-server
  • Access port 5432 (PostgreSQL) on servers tagged database
  • SSH (port 22) to the dev group

Disconnecting

When a sandbox is terminated, its Tailscale node is automatically removed (for ephemeral nodes). To manually disconnect:

Troubleshooting

Common Issues

Debug Commands

Security Note: Auth keys provide access to your entire tailnet (limited by ACLs). Treat them like passwords. Rotate keys regularly and use tags to limit access scope.

Next Steps

SSH & VNC Access

Learn how to access sandboxes directly via SSH and VNC.

Nested Containers

Run Docker and Kubernetes inside your sandboxes.