From 35f8395df77d2f58f6ac3ff977b3adaaa6aff237 Mon Sep 17 00:00:00 2001 From: Florian Preinstorfer Date: Sat, 14 Sep 2024 20:27:02 +0200 Subject: [PATCH] Add configuration reference --- docs/ref/configuration.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 docs/ref/configuration.md diff --git a/docs/ref/configuration.md b/docs/ref/configuration.md new file mode 100644 index 00000000..29218f37 --- /dev/null +++ b/docs/ref/configuration.md @@ -0,0 +1,39 @@ +# Configuration + +- Headscale loads its configuration from a YAML file +- It searches for `config.yaml` in the following paths: + - `/etc/headscale` + - `$HOME/.headscale` + - the current working directory +- Use the command line flag `-c`, `--config` to load the configuration from a different path +- Validate the configuration file with: `headscale configtest` + +!!! example "Get the [example configuration from the GitHub repository](https://github.com/juanfont/headscale/blob/main/config-example.yaml)" + + Always select the [same GitHub tag](https://github.com/juanfont/headscale/tags) as the released version you use to + ensure you have the correct example configuration. The `main` branch might contain unreleased changes. + + === "View on GitHub" + + * Development version: + * Version 0.23.0: + + === "Download with `wget`" + + ```shell + # Development version + wget -O config.yaml https://raw.githubusercontent.com/juanfont/headscale/main/config-example.yaml + + # Version 0.23.0 + wget -O config.yaml https://raw.githubusercontent.com/juanfont/headscale/v0.23.0/config-example.yaml + ``` + + === "Download with `curl`" + + ```shell + # Development version + curl -o config.yaml https://raw.githubusercontent.com/juanfont/headscale/main/config-example.yaml + + # Version 0.23.0 + curl -o config.yaml https://raw.githubusercontent.com/juanfont/headscale/v0.23.0/config-example.yaml + ```