User:Maffblaster/Drafts/Headscale
Headscale is a WireGuard-powered, self-hosted implementation of the Tailscale control server.
Installation
Kernel
Ensure {{Link|WireGuard|section=#Kernel]] has been loaded to the Linux Kernel.
USE flags
USE flags for net-vpn/headscale An open source, self-hosted implementation of the Tailscale control server
Emerge
root #
emerge --ask net-vpn/headscale
Configuration
Headscale will configuration before it can be used in production.
Files
- /etc/headscale/config.yaml - Headscale will search the /etc/headscale directory for a config.yaml or config.json file. The configuration file will need to be created from the example file provided in the installation (see below).
- /etc/conf.d/headscale - OpenRC's service configuration file.
- /var/lib/headscale - Directory containing keys that are automatically generated with the service runs.
Create the example configuration file:
root #
bzcat /usr/share/doc/headscale-*/config-example.yaml.bz2 > /etc/headscale/config.yaml
Edit the configuration file as appropriate for the network situation in which Headscale will be deployed.
Usage
Create accounts
Follow upstream's documentation to create user accounts on the Headscale server.
When using the commandline interface, ensure commands are ran as the headscale user:
root #
doas -u headscale headscale users create larry
Service
The headscale service will be running on the server using one of the service managers listed below.
OpenRC
To start to the headscale service now:
root #
openrc-service headscale start
To add the service to start on system boot:
root #
rc-update add headscale default
systemd
To start and enable the service to start on boot:
root #
systemctl enable --now headscale
Connecting to the control service
Troubleshooting
Issue 1
When X happens, Y is how to fix it.
Removal
File clean up
Ensure any sensitive configuration files have been removed from the /etc directory:
root #
rm /etc/headscale/*
Unmerge
root #
emerge --ask --depclean --verbose net-vpn/headscale
See also
- WireGuard — a modern, simple, and secure VPN that utilizes state-of-the-art cryptography.