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 1/2] 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 From 7b607b3fe892e2668bf5af7b4e657ecc55975455 Mon Sep 17 00:00:00 2001 From: lachy-2849 <98844035+lachy-2849@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:32:13 -0500 Subject: [PATCH 2/2] Forgot to run Prettier --- docs/running-headscale-linux.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/running-headscale-linux.md b/docs/running-headscale-linux.md index 1bb72f63..09e43dc7 100644 --- a/docs/running-headscale-linux.md +++ b/docs/running-headscale-linux.md @@ -139,9 +139,11 @@ 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