Deploy Headscale
Self-hosted Tailscale control server — your own WireGuard mesh VPN
headscale
Just deployed
Deploy and Host Headscale on Railway
Headscale is an open-source, self-hosted implementation of the Tailscale control server. It lets you create your own WireGuard-based mesh VPN using standard Tailscale clients, without routing coordination through Tailscale's hosted infrastructure.
About Hosting Headscale
Hosting Headscale requires a publicly accessible server with persistent storage for the SQLite database and encryption keys. This template handles that automatically — it deploys Headscale with a persistent volume at /var/lib/headscale, auto-detects the server URL from your Railway domain, and runs behind Railway's TLS termination. The server listens on port 8080 for the HTTP API and uses the standard Tailscale DERP relay network for NAT traversal. No external databases or dependencies are needed. Once deployed, you create users and auth keys via the CLI, then point any Tailscale client at your Railway domain.
Common Use Cases
- Connecting servers, laptops, and phones into a private mesh network across locations with WireGuard encryption
- Securely accessing home lab or office resources from anywhere without exposing ports
- Linking development machines to staging and production services over a private overlay network
Dependencies for Headscale Hosting
- No external dependencies required (uses embedded SQLite)
Deployment Dependencies
Resource Usage
This template deploys 1 service with a persistent volume. Resource usage scales with the number of connected nodes — expect minimal costs at idle.
Why Deploy Headscale on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Headscale on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
headscale
Sokanon/railway-headscale