Tailscale client setup
Connect to the Headscale private network from anywhere
Overview¶
Once Tailscale is installed and connected to the Headscale server, you can access all private servers from anywhere in the world — just like being connected to the castisthai WiFi network.
Your Computer (Tailscale ON)
↓
Headscale Server
(headscale.castis.io)
↓
nuc-b (<NUC_B_TAILSCALE_IP> / <NUC_B_LAN_IP>)
↓ subnet routing
├── nuc-a (<NUC_A_LAN_IP>)
├── other device (<OFFICE_LAN_HOST_IP>)
└── ... (any host in <OFFICE_LAN_CIDR>)
Accessible Servers¶
| Server | Tailnet IP | Local IP | Tailscale Installed | Access Method |
|---|---|---|---|---|
| nuc-a | — | No | SSH via local IP (routed through nuc-b) | |
| nuc-b | Yes | SSH via Tailnet IP, local IP, or MagicDNS | ||
| Other subnet devices | — | any host in |
No | SSH via local IP (routed through nuc-b) |
All devices in
<OFFICE_LAN_CIDR>are reachable as long as nuc-b is online and connected to Headscale.
Before You Start¶
You need a preauth key from the admin to connect. Ask your admin to generate one:
# Admin runs this on the Headscale server
kubectl exec -n headscale headscale-0 -- \
headscale preauthkeys create --user <user-id> --reusable --expiration 24h
The key looks like:
Installation¶
macOS¶
Step 1 — Install from App Store
Or searchTailscale in the App Store and click Get.
Step 2 — Connect to Headscale via Terminal
The Tailscale UI connects to Tailscale's official servers by default. You must use Terminal once to point it to the Headscale server.
/Applications/Tailscale.app/Contents/MacOS/Tailscale up \
--login-server=https://headscale.castis.io \
--authkey=<preauth-key> \
--accept-routes
Step 3 — Verify connection
# Check status
/Applications/Tailscale.app/Contents/MacOS/Tailscale status
# Check your Tailnet IP
/Applications/Tailscale.app/Contents/MacOS/Tailscale ip
Note: On macOS quitting the menu bar app does NOT stop Tailscale. It runs as a background system service. Use
Tailscale downto fully disconnect.Tip: Disable macOS autocorrect in Terminal to prevent
--being changed to—System Settings → Keyboard → Text Input → Turn off "Use smart quotes and dashes"
Linux¶
Step 1 — Install Tailscale
Step 2 — Enable IP forwarding (required only if this node will do subnet routing)
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Step 3 — Connect to Headscale
# Regular client (just accessing the network)
sudo tailscale up \
--login-server https://headscale.castis.io \
--authkey <preauth-key> \
--accept-routes
# Subnet router (advertising a private subnet)
sudo tailscale up \
--login-server https://headscale.castis.io \
--authkey <preauth-key> \
--advertise-routes=<OFFICE_LAN_CIDR> \
--accept-routes
Step 4 — Verify connection
Windows¶
Step 1 — Download and install
Step 2 — Connect via Command Prompt (Run as Administrator)
Step 3 — Verify
Connecting to Headscale¶
After installation use these commands to manage your connection:
# Connect (Linux/macOS)
sudo tailscale up --login-server https://headscale.castis.io --authkey <preauth-key> --accept-routes
# Disconnect
sudo tailscale down
# Reconnect (after first setup — no authkey needed)
sudo tailscale up
You only need to run the full
tailscale upcommand once. After the first connection, Tailscale remembers your settings and reconnects automatically on reboot.
Accessing Servers via SSH¶
Once Tailscale is connected (ON), SSH to any server as if you were on castisthai WiFi:
# SSH to nuc-b (multiple options)
ssh castis@<NUC_B_TAILSCALE_IP> # via Tailnet IP
ssh castis@<NUC_B_LAN_IP> # via local IP
ssh castis@nuc-b.ts.castis.io # via MagicDNS hostname
# SSH to nuc-a (no Tailscale — routed through nuc-b automatically)
ssh castis@<NUC_A_LAN_IP> # via local IP only
# SSH to any device in <OFFICE_LAN_CIDR> subnet
ssh castis@<OFFICE_LAN_HOST_A_IP>
ssh castis@<OFFICE_LAN_HOST_B_IP>
ssh castis@<OFFICE_LAN_HOST_C_IP>
# Any host in <OFFICE_LAN_CIDR> is reachable
You do NOT need to install Tailscale on devices in the
<OFFICE_LAN_CIDR>subnet. They are reachable automatically through nuc-b's subnet routing.
Managing Your Connection¶
Check connection status¶
# Linux / macOS Terminal
tailscale status
# macOS — click Tailscale icon in menu bar (blue = connected, grey = disconnected)
Turn on / off¶
Does turning on Tailscale slow down my internet? No. Only traffic to Tailnet devices (
<TAILNET_IP>or<OFFICE_LAN_CIDR>) goes through the tunnel. All other internet traffic (Google, YouTube etc.) goes directly as normal.
Check your Tailnet IP¶
Check connected devices¶
Troubleshooting¶
Cannot connect — authkey error¶
Cannot reach devices¶
# Check --accept-routes is active
tailscale status
# Reconnect with accept-routes
sudo tailscale up --accept-routes
SSH hangs after connection established¶
Cause: MTU issue through the Tailscale tunnel
Fix: Contact admin to check nuc-b IP forwarding and iptables settings