Headscale & Tailscale – Debian Linux Installation
This is the procedure for adding a Debian system to Headscale (native or via a virtual machine). This post is available in French too.
First, the signature key of the package and the Tailscale repository must be added to the system via a terminal or SSH.
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | tee /etc/apt/sources.list.d/tailscale.list
Then install Tailscale proper:
apt-get update
apt-get install tailscale -y
And initialize the Tailscale to Headscale connection:
tailscale login --login-server https://hs.xxxx.xxx --accept-dns=false
Retrieve the value of mkey, then open a terminal on the Headscale machine and execute this command:
docker exec headscale headscale nodes register --user USERNAME --key mkey:xxxxxxxxxxxxxxxxxxxxxxxx
To do this via the HeadPlane interface, on the “Machinery” page, click “Add Device”, add the character string mkey:xxx, choose the user and click “Register”.

I invite you to read or return to the Headscale and Tailscale post.
2 Comments
on Headscale & Tailscale – Debian Linux Installation.
Leave a Reply
Your feedback is valuable for us. Your email will not be published.

I’m using Tailscale to connect a Raspberry Pi 5 to a GPU laptop. The Pi runs an AI agent inside Docker that sends its heavy model requests over to the laptop for processing. I really want to nail down access control so only the Pi can hit the inference port on the laptop. Do you tag your nodes and lock them down with ACLs in Headscale, or do you prefer to keep things simple using user-based rules?
ACL is the best way, in my opinion.