Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
headscale-deploy【部署与运维】Deploy, configure, and maintain a self-hosted Headscale control server on Linux or Docker. Use when setting up a new Headscale instance, troubleshooting deployment issues, or configuring server settings.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
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.
server_url)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
Direct binary installation on the host for lightweight or container-free environments. The install-headscale.sh script handles:
/usr/local/binheadscale system user/etc/headscale/config.yamlKey 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 | "" |
After deployment, verify the instance is healthy:
# Quick health check
curl -s https://headscale.example.com/health
# Comprehensive diagnostics
headscale-health-check.sh --json
# Check registered nodes
headscale nodes list
# Verify API access
headscale apikeys list
listen_addr in config. Ensure no other service binds port 3478/udp for STUN.systemctl restart headscale or docker compose restart./var/lib/headscale/db.sqlite3 (or your PostgreSQL DB) regularly.Use this skill when the user says any of:
Do not use this skill for client-side setup (load tailscale-client instead), for ACL/policy authoring (load tailnet-policy), or for day-to-day management of an already-running server. It covers initial deployment and server configuration only.