diff --git a/development/ref/dns/index.html b/development/ref/dns/index.html index 3c65b99f..09b662fd 100644 --- a/development/ref/dns/index.html +++ b/development/ref/dns/index.html @@ -1,4 +1,4 @@ - DNS - Headscale
Skip to content

DNS

Headscale supports most DNS features from Tailscale. DNS related settings can be configured within dns section of the configuration file.

Setting extra DNS records

Headscale allows to set extra DNS records which are made available via MagicDNS. Extra DNS records can be configured either via static entries in the configuration file or from a JSON file that Headscale continuously watches for changes:

  • Use the dns.extra_records option in the configuration file for entries that are static and don't change while Headscale is running. Those entries are processed when Headscale is starting up and changes to the configuration require a restart of Headscale.
  • For dynamic DNS records that may be added, updated or removed while Headscale is running or DNS records that are generated by scripts the option dns.extra_records_path in the configuration file is useful. Set it to the absolute path of the JSON file containing DNS records and Headscale processes this file as it detects changes.

An example use case is to serve multiple apps on the same host via a reverse proxy like NGINX, in this case a Prometheus monitoring stack. This allows to nicely access the service with "http://grafana.myvpn.example.com" instead of the hostname and port combination "http://hostname-in-magic-dns.myvpn.example.com:3000".

  1. Configure extra DNS records using one of the available configuration options:

    config.yaml
    dns:
    + DNS - Headscale      

    DNS

    Headscale supports most DNS features from Tailscale. DNS related settings can be configured within dns section of the configuration file.

    Setting extra DNS records

    Headscale allows to set extra DNS records which are made available via MagicDNS. Extra DNS records can be configured either via static entries in the configuration file or from a JSON file that Headscale continuously watches for changes:

    • Use the dns.extra_records option in the configuration file for entries that are static and don't change while Headscale is running. Those entries are processed when Headscale is starting up and changes to the configuration require a restart of Headscale.
    • For dynamic DNS records that may be added, updated or removed while Headscale is running or DNS records that are generated by scripts the option dns.extra_records_path in the configuration file is useful. Set it to the absolute path of the JSON file containing DNS records and Headscale processes this file as it detects changes.

    An example use case is to serve multiple apps on the same host via a reverse proxy like NGINX, in this case a Prometheus monitoring stack. This allows to nicely access the service with "http://grafana.myvpn.example.com" instead of the hostname and port combination "http://hostname-in-magic-dns.myvpn.example.com:3000".

    1. Configure extra DNS records using one of the available configuration options:

      config.yaml
      dns:
         ...
         extra_records:
           - name: "grafana.myvpn.example.com"
      diff --git a/versions.json b/versions.json
      index 8ae89265..93cf3a6f 100644
      --- a/versions.json
      +++ b/versions.json
      @@ -10,8 +10,8 @@
           "version": "0.26.1",
           "title": "0.26.1",
           "aliases": [
      -      "stable",
      -      "latest"
      +      "latest",
      +      "stable"
           ]
         },
         {