From 2cf51a84f9068ac74d1422c4d42e04323e2327d6 Mon Sep 17 00:00:00 2001 From: Jack Spiering <46534141+jackspiering@users.noreply.github.com> Date: Wed, 7 Oct 2026 19:24:16 +0200 Subject: [PATCH] Technitium: store settings and zones on the host Mount the data folder at /etc/dns, where Technitium keeps its settings, zones, logs, and statistics. The stack mounted it at /config, which Technitium does not use, so everything was lost when the container was recreated. Add upgrade steps to the README for existing installations. --- services/technitium/README.md | 27 +++++++++++++++++++++++++-- services/technitium/compose.yaml | 2 +- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/services/technitium/README.md b/services/technitium/README.md index 9b964053..70b818e7 100644 --- a/services/technitium/README.md +++ b/services/technitium/README.md @@ -12,7 +12,7 @@ This stack runs Technitium DNS Server with a Tailscale sidecar, as described in | Service port | `5380` | | DNS | Port `53` (TCP and UDP) on the Tailscale IP address of `technitium` and on the Docker host | | Image | `technitium/dns-server` | -| Data | None on the host, see the deviations | +| Data | `./technitium-data/app/config` (settings, zones, logs, and statistics) | ## Before you start @@ -23,7 +23,6 @@ This stack runs Technitium DNS Server with a Tailscale sidecar, as described in ## Deviations from the standard setup - **Published host ports.** The `ports` block is active. It publishes the web interface on port `5380`, DNS on port `53`, DNS-over-TLS and DNS-over-QUIC on port `853`, and DNS-over-HTTPS on port `443` of the Docker host. Devices in your local network can therefore reach Technitium without Tailscale. Remove the lines that you do not need. -- **Settings are not stored on the host.** Technitium keeps its settings and zones in `/etc/dns` in the container. The stack mounts `./technitium-data/app/config` at `/config`, which Technitium does not use. Your settings are lost when the container is recreated, for example after an image update. Back up your settings in the web interface before you update. - **Settings through environment variables.** `compose.yaml` sets the server name, recursion, and forwarders. Technitium reads these variables only at the first start, when it has no configuration yet. ## First run @@ -37,6 +36,30 @@ This stack runs Technitium DNS Server with a Tailscale sidecar, as described in In the Tailscale admin console, open the **DNS** page. Add the Tailscale IP address of the `technitium` device as a custom nameserver and enable **Override DNS servers**. +## Upgrading + +Earlier versions of this stack mounted the data folder at `/config`, which Technitium does not use. Technitium kept its settings and zones inside the container, and they were lost when the container was recreated. The stack now mounts the folder at `/etc/dns`. + +If you run an earlier version, copy your settings to the host before you start the new version. Otherwise Technitium starts without them. + +1. Stop Technitium, so that it writes all changes to disk: + + ```bash + docker compose stop application + ``` + +2. Copy the settings from the container to the data folder. Docker created this folder as user `root`, so the command needs `sudo`: + + ```bash + sudo docker cp app-technitium:/etc/dns/. ./technitium-data/app/config/ + ``` + +3. Start the stack with the updated `compose.yaml`: + + ```bash + docker compose up -d + ``` + ## Links - [Technitium DNS Server help](https://technitium.com/dns/help.html) diff --git a/services/technitium/compose.yaml b/services/technitium/compose.yaml index 218ab009..8ba3799a 100644 --- a/services/technitium/compose.yaml +++ b/services/technitium/compose.yaml @@ -82,7 +82,7 @@ services: # - DNS_SERVER_LOG_USING_LOCAL_TIME=true #Enable this option to use local time instead of UTC for logging. - TZ=${TZ} volumes: - - ./${SERVICE}-data/app/config:/config + - ./${SERVICE}-data/app/config:/etc/dns # Technitium settings and zones depends_on: tailscale: condition: service_healthy