C.W.K.
Stream
Lesson 11 of 12 · published

Headscale — Self-Hosted Tailscale

~12 min · headscale, self-hosted, tailscale-alternative

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

Run your own coordination server

Headscale is an open-source, self-hosted re-implementation of Tailscale's coordination server. The same Tailscale clients connect to it instead of Tailscale's hosted control plane. You get the WireGuard mesh, MagicDNS, ACLs — minus dependence on Tailscale Inc.

When self-hosting actually makes sense

  • You truly need to control the metadata — compliance regimes that require all coordination data stay in-house.
  • Cost at scale — paid Tailscale tiers above 100 devices add up; Headscale on a $5 VPS is cheaper for very large fleets.
  • You enjoy maintaining infrastructure and treat the homelab as a hobby in itself.

Honest trade-offs

You give up a lot for that control: no admin console, no native iOS/Android beyond what the Tailscale apps provide via custom login server, slower feature parity, you maintain the server's uptime. For a personal fleet under 100 devices, hosted Tailscale is almost always the right choice — even if you philosophically prefer self-hosting.

Code

Headscale at a glance·bash
# Install on a Linux server (see GitHub releases)
# https://github.com/juanfont/headscale

# Server setup (very abbreviated):
# 1. Configure /etc/headscale/config.yaml
# 2. Start the service
sudo systemctl enable --now headscale

# 3. Create a user, generate a pre-auth key
sudo headscale users create you_username
sudo headscale --user you_username preauthkeys create --reusable

# On client machines, use Tailscale CLI but point at your server:
sudo tailscale up \
    --login-server https://headscale.example.com \
    --auth-key=tskey-...

# After that, all Tailscale CLI commands work as normal

External links

Exercise

Read the trade-offs above. Decide for your own situation: hosted Tailscale or Headscale? For most readers — including for cwkPippa-shaped fleets — hosted Tailscale is the right answer. Make the decision deliberately, not by default.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.