From 41fbe47cdfba72fa3038b3b1b16e615fda1581f2 Mon Sep 17 00:00:00 2001 From: lachy-2849 <98844035+lachy-2849@users.noreply.github.com> Date: Tue, 1 Feb 2022 14:23:18 -0500 Subject: [PATCH] Note when running as another user in systemd Headscale commands fail when running them as the current user instead of the user defined in the systemd file. This note provides 2 methods of how to correctly run the headscale commands. --- docs/running-headscale-linux.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/running-headscale-linux.md b/docs/running-headscale-linux.md index 973a6eb8..1bb72f63 100644 --- a/docs/running-headscale-linux.md +++ b/docs/running-headscale-linux.md @@ -138,6 +138,16 @@ RuntimeDirectory=headscale WantedBy=multi-user.target ``` +Note that when running as the headscale user ensure that, either you add your current user to the headscale group: +```shell +usermod -a -G headscale current_user +``` +or run all headscale commands as the headscale user: + +```shell +su - headscale +``` + 2. In `/etc/headscale/config.yaml`, override the default `headscale` unix socket with a SystemD friendly path: ```yaml