From 32e1d77663e50ec607e512640d281857ce5fb3c8 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Sun, 12 Apr 2026 18:50:16 +0200 Subject: [PATCH] Install config-example.yaml as example for the debian package The directory /usr/share/doc/headscale/examples may be used to install arbitrary example files. This is useful to get a matching configuration for the release which gets also overwritten automatically. --- .goreleaser.yml | 7 ++++--- CHANGELOG.md | 1 + docs/setup/install/official.md | 3 ++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 6d72bad6..2683361d 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -42,10 +42,9 @@ source: - "vendor/" nfpms: - # Configure nFPM for .deb and .rpm releases + # Configure nFPM for .deb releases # - # See https://nfpm.goreleaser.com/configuration/ - # and https://goreleaser.com/customization/nfpm/ + # See https://goreleaser.com/customization/package/nfpm/ # # Useful tools for debugging .debs: # List file contents: dpkg -c dist/headscale...deb @@ -79,6 +78,8 @@ nfpms: dst: /usr/lib/systemd/system/headscale.service - dst: /var/lib/headscale type: dir + - src: ./config-example.yaml + dst: /usr/share/doc/headscale/examples/config-example.yaml - src: LICENSE dst: /usr/share/doc/headscale/copyright scripts: diff --git a/CHANGELOG.md b/CHANGELOG.md index c8978520..86078132 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -96,6 +96,7 @@ internet is a security-sensitive choice. `autogroup:danger-all` can only be used - Fix exit node approval not triggering filter rule recalculation for peers [#2180](https://github.com/juanfont/headscale/pull/2180) - Policy validation error messages now include field context (e.g., `src=`, `dst=`) and are more descriptive [#2180](https://github.com/juanfont/headscale/pull/2180) - Remove old migrations for the debian package [#3185](https://github.com/juanfont/headscale/pull/3185) +- Install `config-example.yaml` as example for the debian package [#3186](https://github.com/juanfont/headscale/pull/3186) ## 0.28.1 (202x-xx-xx) diff --git a/docs/setup/install/official.md b/docs/setup/install/official.md index 3989a77a..b2b89ca0 100644 --- a/docs/setup/install/official.md +++ b/docs/setup/install/official.md @@ -24,7 +24,8 @@ distributions are Ubuntu 22.04 or newer, Debian 12 or newer. sudo apt install ./headscale.deb ``` -1. [Configure headscale by editing the configuration file](../../ref/configuration.md): +1. [Configure headscale by editing the configuration file](../../ref/configuration.md). An up-to date example + configuration file is also available in `/usr/share/doc/headscale/examples/config-example.yaml`: ```shell sudo nano /etc/headscale/config.yaml