Lucas Janin | Headscale & Tailscale - Debian Linux Installation - Lucas Janin

Headscale & Tailscale – Debian Linux Installation

3 January 2025
  • Headscale et Tailscale – Debian Featured

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.

Leave a Reply

Your feedback is valuable for us. Your email will not be published.