Skip to content

Commit 53e5ddb

Browse files
authored
[headscale] fix and update guide (#1975)
1 parent 95bed0f commit 53e5ddb

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

source/guide_headscale.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ If you want to use Headscale with your own domain you need to add it first:
4848
Installation
4949
============
5050

51-
Download the latest Headscale binary from the official GitHub releases_ page. Replace ``0.26.1`` with the latest version:
51+
Download the latest Headscale binary from the official GitHub releases_ page. Replace ``0.27.1`` with the latest version:
5252

5353
.. code-block:: console
5454
5555
[isabell@stardust ~]$ wget -O ~/bin/headscale \
56-
https://github.com/juanfont/headscale/releases/download/v0.26.1/headscale_0.26.1_linux_amd64
56+
https://github.com/juanfont/headscale/releases/download/v0.27.1/headscale_0.27.1_linux_amd64
5757
[isabell@stardust ~]$ chmod +x ~/bin/headscale
5858
5959
By default, Headscale loads the configuration from ``$HOME/.headscale/config.yaml``, so we continue with creating the directory:
@@ -67,7 +67,7 @@ Then download the example configuration file:
6767
.. code-block:: console
6868
6969
[isabell@stardust ~]$ wget -O ~/.headscale/config.yaml \
70-
https://github.com/juanfont/headscale/raw/v0.26.1/config-example.yaml
70+
https://github.com/juanfont/headscale/raw/v0.27.1/config-example.yaml
7171
7272
7373
Configuration
@@ -83,29 +83,32 @@ To run Headscale behind Uberspace's native web backend (reverse proxy), you need
8383
- Set the correct ``server_url`` (your public domain, with https) by setting ``server_url`` to ``https://isabell.uber.space:443``.
8484
- Set a encryption key for the Headscale connection by setting the ``private_key_path`` to ``private.key`` (will be generated after configuration).
8585

86-
Edit ``~.headscale/config.yaml`` with your favourite editor and make the following adjustments:
86+
To make management via the CLI possible, you also need to:
87+
88+
- Set ``unix_socket`` to ``/home/isabell/.headscale/headscale.sock``, it is important that you provide the full path here so that the CLI can connect to the socket.
89+
90+
Edit ``~/.headscale/config.yaml`` with your favourite editor and make the following adjustments:
8791

8892
.. warning::
89-
Review and adjust the configuration to suit your environment. At minimum, set the ``server_url``, ``private_key_path``, and ``database.sqlite``.
93+
Review and adjust the configuration to suit your environment. At minimum, set the ``server_url``, ``listen_addr``, ``private_key_path``, ``unix_socket`` and ``database.sqlite``.
9094

9195
.. note::
92-
TLS is handled by Uberspace's web backend, do not set ``tls_cert_path`` or ``tls_key_path`` in your Headscale config. See Headscale's TLS_ documentation for more information.
96+
TLS is handled by Uberspace's web backend, do not set ``tls_cert_path`` or ``tls_key_path`` in your Headscale config. See Headscale's TLS_ documentation for more information.
9397

94-
For a simple and minimal setup, set the following values:
98+
For a simple and minimal setup, adjust the following values in the configuration file which was downloaded before:
9599

96100
.. code-block:: yaml
97-
:emphasize-lines: 1
98101
99102
server_url: "https://isabell.uber.space:443"
100103
listen_addr: "0.0.0.0:8080"
101104
102105
tls_cert_path: ""
103106
tls_key_path: ""
104107
105-
unix_socket: "headscale.sock"
108+
unix_socket: "/home/isabell/.headscale/headscale.sock"
106109
107110
noise:
108-
private_key_path: "noise_private.key"
111+
private_key_path: "private.key"
109112
110113
database:
111114
type: "sqlite"
@@ -181,11 +184,11 @@ Create a user:
181184
182185
[isabell@stardust ~]$ headscale users create <USER>
183186
184-
Generate a preauth key for device registration:
187+
Generate a preauth key for device registration (you can get the ``<USER-ID>`` via ``headscale users list``):
185188

186189
.. code-block:: console
187190
188-
[isabell@stardust ~]$ headscale preauthkeys create --user <USER>
191+
[isabell@stardust ~]$ headscale preauthkeys create --user <USER-ID>
189192
190193
Use the preauth key with the Tailscale client on your device:
191194

@@ -216,6 +219,6 @@ To update Headscale, download the new binary and replace the old one. Then resta
216219

217220
----
218221

219-
Tested with Headscale 0.26.1, Uberspace 7.16.7
222+
Tested with Headscale 0.27.1, Uberspace 7.16.9
220223

221224
.. author_list::

0 commit comments

Comments
 (0)