🎬

Video tutorial coming soon.

🌐 Setup Headscale — Self-Hosted Tailscale Control Server

Deploy Headscale, an open-source implementation of the Tailscale control server. Build your own private mesh VPN network fully under your control.

⚠️ This script is provided for demo and testing purposes only.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along.

Automated install script — Headscale control server deployed instantly.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/vpn/headscale/headscale-ubuntu.sh
chmod +x headscale-ubuntu.sh
sudo bash headscale-ubuntu.sh

Tutorial Steps

1 Download & Run the Script

The script installs Docker, configures Headscale with your server domain or IP, and starts the control server and web UI.

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/vpn/headscale/headscale-ubuntu.sh
chmod +x headscale-ubuntu.sh
sudo bash headscale-ubuntu.sh

2 Access the Web UI

Open your browser and navigate to the Headscale UI:

http://YOUR-SERVER-IP:8090

3 Create a User and Generate Auth Key

Use the Headscale CLI or web UI to create a user namespace and generate a pre-auth key. Clients use this key to register with your control server.

4 Connect Tailscale Clients

Install Tailscale on each device and point it to your Headscale server. Run: tailscale up --login-server http://YOUR-SERVER-IP:8090 --authkey YOUR-KEY

Ports Used

PortProtocolPurpose
8090TCPHeadscale Control Server
8091TCPHeadscale Web UI

Files Location

/root/docker/headscale/docker-compose.yml