VPS Provider

Headscale on a VPS: self-host the Tailscale control server

Published

Headscale is an open-source server that replaces Tailscale's coordination server, so the normal Tailscale apps log in to a machine you control. It needs a server with a public IP address and HTTPS on port 443, which makes a small VPS the usual home for it: on our price list, 1 vCPU, 1 GB of memory and 20 GB of NVMe cost $4.60 a month.

The Headscale facts below come from its documentation and its GitHub releases as we read them on 3 December 2026, when the latest release was 0.29.8, published on 26 November. Tailscale's prices are from tailscale.com on the same day. Our prices are per month and without tax.

What Headscale does, and what it does not

Tailscale has two parts. The apps on your devices build WireGuard tunnels between each other; a coordination server tells them who is in the network, hands out keys and pushes the access rules. Headscale is that second part. Your traffic still goes straight from device to device, and the server only sees who connects to whom.

Its scope is narrow on purpose. The documentation says Headscale runs a single tailnet, "suitable for a personal use, or a small open-source organisation", and its FAQ says it "is not enterprise software". It can handle hundreds of devices when the network changes little. There is no built-in web interface: you use the headscale command, or one of the community interfaces the project lists, such as Headplane or headscale-ui.

When Tailscale's own plan is the better deal

Be honest about the sums first. Tailscale's Personal plan is free for up to 6 users with no limit on their devices. For one household or a small home lab, that costs nothing and needs no upkeep, while Headscale costs a server and your time. If price is the only reason, stay on Tailscale.

Headscale makes sense in three cases. You want the list of your devices and keys on a server you run, not on someone else's. You have more than 6 people: Tailscale Standard is $8 per user a month, so a team of 10 pays $80 a month, and Premium is $18 per user. Or you want a relay server near your users, which Tailscale offers on its own service only as an alpha feature. In exchange you lose Tailscale's support and its admin console, and you do the updates yourself.

The server it needs

Headscale publishes no CPU or memory minimum. What it does ask for is a server with a public IP address, ideally both IPv4 and IPv6, a reasonably modern Linux, and HTTPS on port 443. It is one Go program with a SQLite database, which the project recommends over PostgreSQL. These sizes are our suggestion.

VPS sizeForPer month
1 vCPU, 1 GB, 20 GB NVMeHeadscale for a family or a small team$4.60
1 vCPU, 2 GB, 40 GB NVMeHeadscale with the embedded relay turned on, plus a web interface$6.67

Every VPS here has a dedicated public IPv4 address, a /64 IPv6 subnet and a 1 Gbit/s port, which covers the dual-stack setup the documentation recommends. Choose Ubuntu 24.04 LTS or Debian 12: the official package supports Ubuntu 22.04 or newer and Debian 12 or newer.

Do not put Headscale on a machine that is itself part of the tailnet. The FAQ says it can cause problems with subnet routers, relays and MagicDNS, and that this setup is not supported. A separate small VPS avoids the question.

Open the right ports

Our servers start with a firewall that lets in only SSH, so the Tailscale apps cannot reach Headscale until you open its ports. These are the ones the documentation lists:

PortOpen it when
443/tcpAlways: the apps talk to Headscale over HTTPS
80/tcpOnly if Headscale's built-in Let's Encrypt client gets its certificate with the HTTP-01 challenge
3478/udpOnly if you turn on the embedded relay server (STUN)
50443/tcpOnly if you control Headscale remotely over gRPC

Keep port 9090, the metrics and debug endpoint, closed to the internet. Open the others in ufw on the server, and in the Console firewall if you use it.

Install it: the package, or Docker

The project supports its own binaries and DEB packages. The package creates a local user, installs a default configuration in /etc/headscale/config.yaml and adds a systemd service, so on Ubuntu or Debian the install is: download the .deb for your version from the GitHub releases page, run sudo apt install ./headscale.deb, set your public address in server_url in the configuration, and restart the service with sudo systemctl restart headscale.

Container images exist, docker.io/headscale/headscale and ghcr.io/juanfont/headscale, but the FAQ says the project does not officially support Docker, and its container page is community documentation that the maintainers have not checked. If you use Docker anyway, pin a version tag instead of latest, and keep the ports bound to 127.0.0.1 as that page does. Docker routes published ports before ufw's rules apply, so a plain 8080:8080 would put Headscale on the internet without HTTPS. The FAQ also says the maintainers do not use reverse proxies themselves, so a proxy in front of Headscale is a setup you support on your own.

Connect the first devices

Check that https://your-domain/health answers from outside, then create a user with headscale users create and a key with headscale preauthkeys create. By default that key works once and expires after one hour. On each device, install the normal Tailscale app and run tailscale up --login-server with your Headscale address and the key. Release 0.29.8 needs Tailscale apps from version 1.80.0.

The relay, and where to put the server

Most connections are direct. When two devices cannot reach each other through their routers, the traffic goes through a DERP relay. By default Headscale uses Tailscale's public relays, and it also has its own relay built in, off by default. Turned on, it uses 443/tcp and 3478/udp and accepts only clients of your own network. The documentation warns that it has no speed optimisations, and that removing Tailscale's relays makes your server a single point of failure.

Relayed traffic travels to the relay and back, so it is worth placing the server near your users. We have 14 datacenters in Europe, the Americas, the Middle East, Africa and Asia-Pacific; by our own estimate, delay grows by about 1.2 ms for every 100 km between a user and the server.

Keep it current

Headscale must be upgraded one minor version at a time: the FAQ says not to skip minor versions in between. Releases come often, and some fix security problems, as 0.29.7 did on 30 October, so check the releases page every month and back up /var/lib/headscale before each upgrade. That folder holds the SQLite database with your users, devices and keys.

Questions

Is Headscale free?

Yes. Headscale is open source and free to use. What you pay for is the server it runs on: on our price list, a VPS with 1 vCPU, 1 GB of memory and 20 GB of NVMe costs $4.60 a month, with no setup fee.

Can I use the official Tailscale apps with Headscale?

Yes. You install the normal Tailscale app and point it at your server with tailscale up --login-server. Headscale 0.29.8 needs Tailscale apps from version 1.80.0.

What ports does Headscale need?

443/tcp always. 80/tcp only for the built-in Let's Encrypt HTTP-01 challenge, 3478/udp only with the embedded relay, and 50443/tcp only for remote control over gRPC. Keep the metrics port 9090 closed to the internet.

Does Headscale support Docker?

Container images are published, but the Headscale FAQ says Docker is not officially supported. The supported ways are the binaries and the DEB packages for Ubuntu 22.04 or newer and Debian 12 or newer.

Sources, read on 3 December 2026: Headscale documentation, requirements, official install, container install, FAQ, DERP, web interfaces, getting started, Headscale releases, Tailscale pricing, Tailscale custom DERP servers, Docker and ufw.

Written and checked by the VPS Provider team.