Comprehensive Tailscale VPN setup, configuration, and management for mesh networking, secure access, and zero-trust infrastructure. Covers installation, CLI commands, subnet routers, exit nodes, Tailscale SSH, ACL/grants configuration, MagicDNS, Tailscale Serve/Funnel, API automation, and production deployment best practices. Use when setting up Tailscale, configuring tailnet access controls, deploying subnet routers or exit nodes, enabling Tailscale SSH, exposing services with Serve/Funnel, automating via the Tailscale API, troubleshooting connectivity, or planning production Tailscale deployments.
# Install (Linux)
curl -fsSL https://tailscale.com/install.sh | sh
# Install (macOS)
brew install tailscale
# Connect and authenticate
sudo tailscale up
# Check status
tailscale status
# Get your Tailscale IP
tailscale ip -4
tailscale up # Connect
tailscale down # Disconnect (daemon stays running)
tailscale status # View peers
tailscale status --json | jq # Detailed network map
tailscale ping machine-name # Test connectivity (ignores ACLs)
tailscale ping --icmp machine-name # Test with ACLs
tailscale set --exit-node=name # Use exit node
tailscale set --exit-node= # Stop using exit node
Use tailscale set to change settings without reconnecting. Use tailscale up for initial setup.
Run scripts/setup_subnet_router.sh <subnet_cidr> [auth_key] for automated setup.
Manual steps:
sudo tailscale up --advertise-routes=192.168.1.0/24sudo tailscale up --accept-routesRun scripts/setup_exit_node.sh [auth_key] for automated setup.
Manual steps:
sudo tailscale up --advertise-exit-nodetailscale set --exit-node=node-name --exit-node-allow-lan-access# Enable on server
sudo tailscale set --ssh
# Connect from client (no special setup needed)
ssh machine-name
Requires both network access grant and SSH ACL rule. See acl-examples.md for SSH ACL patterns.
# Serve locally to tailnet
tailscale serve 3000
# Expose to public internet (ports 443, 8443, o...