headscale-deploy

headscale-deploy is a skill for Claude Code from magnus919/agent-skills. It costs 43 tokens per session (1,247 once invoked), scanned B, original, MIT.

A guide to deploying and maintaining Headscale, an open-source self-hosted control server for Tailscale's encrypted private device network.

In plain words
What is it for?
Use it to install Headscale on Linux or Docker, configure its server settings, and troubleshoot the deployment.
Why use it?
It helps operate the control server without relying on Tailscale's hosted service and provides guidance for common deployment problems.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the tailscale plugin — 8 skills shipped together

Good fit Use it to install Headscale on Linux or Docker, configure its server settings, and troubleshoot the deployment.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/magnus919/agent-skills/headscale-deploy
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add magnus919/agent-skills --skill headscale-deploy
Clone the repo
git clone --depth 1 https://github.com/magnus919/agent-skills

Made for: Claude Code.

Or install tailscale, the plugin that ships this one along with the rest of its 8 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for headscale-deploy

README.md
[![agentmods](https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-deploy/github.svg)](https://agentmods.dev/skills/magnus919/agent-skills/headscale-deploy)
Your own site
<a href="https://agentmods.dev/skills/magnus919/agent-skills/headscale-deploy"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-deploy/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for headscale-deploy

Your own site · 80×15
<a href="https://agentmods.dev/skills/magnus919/agent-skills/headscale-deploy"><img src="https://agentmods.dev/badge/skills/magnus919/agent-skills/headscale-deploy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 43 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,247 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 2 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 27
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Rogue Agent · line 33
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00043 $0.01247
Opus 5 $0.00022 $0.00624
Sonnet 5 $0.00009 $0.00249
Haiku 4.5 $0.00004 $0.00125

Measured 5d ago against content hash 8701cac03a27, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

headscale-deploy scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

The scan reads SKILL.md. This mod also ships 3 executable files (scripts/configure-derp.sh, scripts/headscale-health-check.sh, scripts/install-headscale.sh), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Root or sudo access on the target machine

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -s https://headscale.example.com/health
tailscale/skills/headscale-deploy/SKILL.md · 125 lines

How it starts

The opening of the file, as written. The whole thing — 125 lines — stays where its author put it; the contents beside it link to each section on GitHub.

headscale-deploy

Overview

Headscale is an open-source, self-hosted implementation of the Tailscale control server. It allows you to run your own coordination plane for WireGuard-based mesh networking, giving you full control over your tailnet without relying on Tailscale's SaaS infrastructure. The Tailscale client connects to Headscale transparently — no client modifications needed.

Use this skill to deploy Headscale from scratch, configure server settings, manage DERP relay infrastructure, and diagnose deployment issues.

Prerequisites

  • Linux server (x86_64 or aarch64) or Docker host with compose support
  • DNS record pointing to the server (A/AAAA record for server_url)
  • Ports 80/443 accessible from the internet (or your tailnet's ingress point)
  • Port 3478/udp for STUN (optional, needed for NAT traversal)
  • Root or sudo access on the target machine

Deployment Methods

Docker Compose (Recommended)

The fastest and most maintainable approach. Use install-headscale.sh with --docker flag to generate a compose file and systemd drop-in, or create manually:

version: "3.9"
services:
  headscale:
    image: headscale/headscale:latest
    container_name: headscale
    restart: unless-stopped
    ports:
      - "8080:8080"
      - "3478:3478/udp"
    volumes:
      - ./data:/var/lib/headscale
      - ./config:/etc/headscale
    command: headscale serve

Binary Install

Direct binary installation on the host for lightweight or container-free environments. The install-headscale.sh script handles:

  1. Detecting platform (linux/amd64, linux/arm64)
  2. Downloading the release tarball from GitHub
  3. Installing the binary to /usr/local/bin
  4. Creating the headscale system user
  5. Writing a systemd unit file
  6. Creating default config at /etc/headscale/config.yaml

Configuration

Key config.yaml options:

Option Description Example
server_url Public URL of your Headscale instance https://headscale.example.com:443
listen_addr Local bind address 0.0.0.0:8080
metrics_listen_addr Prometheus metrics endpoint 127.0.0.1:9090
dns_config.base_domain MagicDNS domain suffix example.com
dns_config.magic_dns Enable MagicDNS true
derp.server.enabled Enable embedded DERP relay false
derp.server.region_id Numeric region ID 999
derp.server.region_name Human-readable region name "my-headscale"
derp.urls External DERP map URLs []
db_type Database backend: sqlite3 or postgres sqlite3
tls_letsencrypt_hostname Auto TLS via Let's Encrypt ""
tls_cert_path / tls_key_path Manual TLS cert paths ""

Read the full file on GitHub · 125 lines

Files

What ships with it

5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 125 lines · 43 tokens per session scan B 8701cac03a27

Subscribe to this mod's changes

headscale-deploy is a skill published in the GitHub repository magnus919/agent-skills (75 stars, last pushed today), licensed MIT. It adds 43 tokens to every session and 1,247 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

deployment-patterns

Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.

deepelementlab/clawcode · 31 tokens

docker-patterns

Docker and Docker Compose patterns for local development, container security, networking, volume strategies, and multi-service orchestration.

deepelementlab/clawcode · 27 tokens

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

local-ai-agents

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…

microsoft/ai-agents-for-beginners · 200 tokens

next-cache-components-adoption

Turn on Cache Components in a Next.js app and resolve the blocking routes it surfaces. Use when the user wants to enable, adopt, or migrate to Cache Components, flip the cacheComponents flag, work through a flood of blocking-prerender / instant validation errors, run the cache-components-instant-false codemod, or…

vercel/next.js · 95 tokens

insight-error-page

Write or audit an insight-kind error page for the Next.js dev overlay. Use when creating a new errors/ .mdx page, auditing an existing one, or checking that a page matches the framework fix cards. Covers page structure, title alignment, FixCard cards with Copy prompt button, code snippets, terminology verification…

vercel/next.js · 83 tokens