Technitium DNS

Network & Proxy rootful 1 container
technitium docker.io/technitium/dns-server:latest · 53:53, 5380:5380

Deployment rootful

1. Prepare the host

Operating System:
!

Prerequisites once as root

Install Podman (needs podman 4.3 or newer; Ubuntu 22.04 ships 3.4 and is too old, use 24.04)

apt update && apt install -y podman

2. Choose a format and deploy

The same pod in four forms. Pick one and follow only its steps.

Each tab says which podman it needs. Check yours with podman --version: Debian 12 ships 4.3, Ubuntu 24.04 4.9, Debian 13 5.4, Fedora 5.8, Arch 6.x.

Kubernetes YAML for podman kube play, started by systemd through a Quadlet .kube unit (podman 4.4+; older podman like Debian 12 uses podman-kube@, see the version check below).

Kubernetes YAML

apiVersion: v1
kind: Pod
metadata:
  name: technitium
  labels:
    app: technitium
spec:
  restartPolicy: Always
  containers:
  - name: technitium
    image: docker.io/technitium/dns-server:latest
    imagePullPolicy: Always
    ports:
    - containerPort: 53
      hostPort: 53
    - containerPort: 5380
      hostPort: 5380
    env:
    - name: DNS_SERVER_DOMAIN
      value: dns.local
    - name: DNS_SERVER_ADMIN_PASSWORD
      value: w_l8TNoxux2S-RnZzjNu8w
    volumeMounts:
    - name: vol-0
      mountPath: /etc/dns
  volumes:
  - name: vol-0
    persistentVolumeClaim:
      claimName: technitium-config
1

Save the YAML file

sudo mkdir -p /etc/containers/
sudo nano /etc/containers/technitium.yaml
2

Test the pod (without systemd)

sudo podman kube play /etc/containers/technitium.yaml

# Status:
sudo podman pod ps && sudo podman ps

# Stop:
sudo podman kube down /etc/containers/technitium.yaml

Check your podman version

podman --version

4.4 or newer: continue with step 3 below.

Older, e.g. 4.3 on Debian 12? There is no Quadlet yet: use podman's own podman-kube@ service instead of steps 3–5
sudo systemctl enable --now podman-kube@$(systemd-escape /etc/containers/technitium.yaml).service

# Status & logs:
sudo systemctl status podman-kube@$(systemd-escape /etc/containers/technitium.yaml).service
sudo journalctl -u podman-kube@$(systemd-escape /etc/containers/technitium.yaml).service -f

The day-to-day commands below have a block for this service.

3

Create Quadlet .kube file (systemd)

technitium.kube
[Unit]
Description=technitium pod
After=network-online.target
Wants=network-online.target

[Kube]
Yaml=/etc/containers/technitium.yaml

[Service]
Restart=always

[Install]
WantedBy=multi-user.target

Save to /etc/containers/systemd/:

sudo mkdir -p /etc/containers/systemd/
sudo nano /etc/containers/systemd/technitium.kube
4

Start systemd service (rootful)

sudo systemctl daemon-reload
sudo systemctl start technitium.service
5

Status & Logs

sudo systemctl status technitium.service
sudo journalctl -u technitium.service -f
sudo podman pod ps
sudo podman ps
6

Enable automatic image updates optional

Requires AutoUpdate=registry in the .kube file. Podman checks for new images and restarts the pod automatically:

sudo systemctl enable --now podman-auto-update.timer

# Check status:
sudo systemctl status podman-auto-update.timer

# Trigger manually:
sudo podman auto-update
Rootful mode:
  • Containers run as root — only use trusted images
  • Ports < 1024 can be bound directly
  • No loginctl enable-linger needed — systemd manages the service
  • Quadlet path: /etc/containers/systemd/ (not ~/.config/)
Day-to-day logs, restart, update, remove (click to open)

Logs & shell into a container

sudo podman logs -f technitium-technitium
sudo podman exec -it technitium-technitium /bin/sh

Restart

sudo systemctl restart technitium.service

Update an image by hand

Pull the new version, the restart recreates the containers from it:

sudo podman pull <image>:<tag>
sudo systemctl restart technitium.service

Stop & remove

Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:

sudo systemctl stop technitium.service
sudo rm /etc/containers/systemd/technitium.kube
sudo systemctl daemon-reload

podman older than 4.4 (podman-kube@ from step 3)

sudo systemctl restart podman-kube@$(systemd-escape /etc/containers/technitium.yaml).service

# Update an image: pull, then restart as above
sudo podman pull <image>:<tag>

# Stop and remove from autostart:
sudo systemctl disable --now podman-kube@$(systemd-escape /etc/containers/technitium.yaml).service

Delete the data — permanent, only after stop & remove

sudo podman volume rm technitium-config

Native systemd units without the Kubernetes YAML: one .pod plus one .container per container. Each container becomes its own systemd service (restart, logs and ordering per container). Needs podman 5.0 or newer — Debian 12 ships 4.3, use the Kube YAML tab there.

1

Save the unit files

technitium.pod
[Unit]
Description=technitium pod

[Pod]
PodName=technitium
PublishPort=53:53
PublishPort=5380:5380
technitium-technitium.container
[Unit]
Description=technitium-technitium container

[Container]
Image=docker.io/technitium/dns-server:latest
Pod=technitium.pod
ContainerName=technitium-technitium
Pull=always
Environment=DNS_SERVER_DOMAIN=dns.local
Environment=DNS_SERVER_ADMIN_PASSWORD=w_l8TNoxux2S-RnZzjNu8w
Volume=technitium-config:/etc/dns:Z

[Service]
Restart=always

[Install]
WantedBy=multi-user.target

Save all of them to /etc/containers/systemd/:

sudo mkdir -p /etc/containers/systemd/
sudo nano /etc/containers/systemd/technitium.pod
sudo nano /etc/containers/systemd/technitium-technitium.container
2

Start the pod

The pod service pulls in every container service. Autostart at boot comes from the [Install] section of the units, no enable needed.

sudo systemctl daemon-reload
sudo systemctl start technitium-pod.service
3

Status & Logs

sudo systemctl status technitium-pod.service
sudo journalctl -u technitium-technitium.service -f
sudo podman pod ps && sudo podman ps
Day-to-day logs, restart, update, remove (click to open)

Logs & shell into a container

sudo podman logs -f technitium-technitium
sudo podman exec -it technitium-technitium /bin/sh

Restart

sudo systemctl restart technitium-pod.service

Update an image by hand

Pull the new version, the restart recreates the containers from it:

sudo podman pull <image>:<tag>
sudo systemctl restart technitium-pod.service

Stop & remove

Stop through systemd, otherwise Restart=always brings the pod back. To remove it for good, delete the unit files and reload:

sudo systemctl stop technitium-pod.service
sudo rm /etc/containers/systemd/technitium.pod
sudo rm /etc/containers/systemd/technitium-technitium.container
sudo systemctl daemon-reload

Delete the data — permanent, only after stop & remove

sudo podman volume rm technitium-config

A docker-compose.yml for podman-compose. Handy if you already work with Compose; there are no per-container systemd services.

1

Install podman-compose as root

apt install -y podman-compose
2

Save the compose file

docker-compose.yml
services:
  technitium:
    image: docker.io/technitium/dns-server:latest
    pull_policy: always
    restart: always
    ports:
    - '53:53'
    - 5380:5380
    environment:
    - DNS_SERVER_DOMAIN=dns.local
    - DNS_SERVER_ADMIN_PASSWORD=w_l8TNoxux2S-RnZzjNu8w
    volumes:
    - technitium-config:/etc/dns:Z
volumes:
  technitium-config: null
sudo mkdir -p /opt/technitium
sudo nano /opt/technitium/docker-compose.yml
3

Start, status & logs

cd /opt/technitium
sudo podman-compose up -d
sudo podman-compose ps
sudo podman-compose logs -f

# Stop:
sudo podman-compose down
4

Start after reboot

podman-restart.service starts every container with restart: always at boot:

sudo systemctl enable podman-restart.service
5

Update images

cd /opt/technitium
sudo podman-compose pull
sudo podman-compose up -d
Day-to-day logs, restart, update, remove (click to open)

Logs & shell into a container

sudo podman logs -f technitium_technitium_1
sudo podman exec -it technitium_technitium_1 /bin/sh

Restart

cd /opt/technitium
sudo podman-compose restart

Stop & remove

cd /opt/technitium
sudo podman-compose down

Delete the data — permanent, only after stop & remove

sudo podman volume rm technitium_technitium-config

Plain podman pod create / podman create commands. Good for a quick test or to see what happens under the hood.

1

Save the script

technitium.sh
#!/bin/bash
set -e

# ── Create named volumes ───────────────────────────────────────────
# Named volumes are created automatically — no UID/GID permission adjustment needed.
sudo podman volume exists technitium-config || sudo podman volume create technitium-config

# ── Create pod ─────────────────────────────────────────────────────
sudo podman pod create \
  --name technitium \
  -p 53:53 \
  -p 5380:5380

# ── Container: technitium-technitium ─────────────────────────────────────────────
sudo podman create \
  --pod technitium \
  --name technitium-technitium \
  --restart always \
  --pull always \
  -e DNS_SERVER_DOMAIN='dns.local' \
  -e DNS_SERVER_ADMIN_PASSWORD='w_l8TNoxux2S-RnZzjNu8w' \
  -v technitium-config:/etc/dns:Z \
  docker.io/technitium/dns-server:latest

# ── Start pod ──────────────────────────────────────────────────────
sudo podman pod start technitium

# ── Stop & clean up ───────────────────────────────────────────────
# sudo podman pod stop technitium
# sudo podman pod rm technitium
nano technitium.sh
2

Run it, status & logs

bash technitium.sh
sudo podman pod ps && sudo podman ps
sudo podman logs -f <container-name>
3

Start after reboot

podman-restart.service starts every container with --restart always at boot:

podman 6.1 does not bring rootful pods created by hand back after a reboot (the infra container fails with stale file handle, and the failing podman-restart.service then stops the other containers it started). If the pod must survive reboots, use the Kube YAML or Quadlet tab.

sudo systemctl enable podman-restart.service
4

Remove or rebuild

The script creates the pod once. To apply changes or new images, remove the pod and run the script again (named volumes stay):

sudo podman pod rm -f technitium
bash technitium.sh
Day-to-day logs, restart, update, remove (click to open)

Logs & shell into a container

sudo podman logs -f technitium-technitium
sudo podman exec -it technitium-technitium /bin/sh

Restart

sudo podman pod stop technitium
sudo podman pod start technitium

Stop & remove

sudo podman pod rm -f technitium

Delete the data — permanent, only after stop & remove

sudo podman volume rm technitium-config

Ports < 1024 (e.g. 80, 443)

Rootless cannot open privileged ports. Solution:

sysctl net.ipv4.ip_unprivileged_port_start=80

Make persistent in /etc/sysctl.d/99-podman.conf.

Containers communicate via localhost

All containers in the pod share the same network namespace. Always use localhost, not container names.

# Correct (e.g. app → db):
localhost:5432

# Wrong (doesn't work in a pod):
db-container:5432

List open ports

Which ports are the running containers publishing? See the PORTS column:

podman ps

Custom DNS for the pod

Set a custom DNS server (e.g. local Pi-hole) in the generator under DNS server. Every format picks it up.

Set volume ownership

Fix permission errors by adjusting UID/GID in the user namespace:

podman unshare chown 1000:1000 /path/to/volume

SELinux volume labels

On SELinux systems (RHEL, Fedora) set the volume suffix:

/host/path:/container/path:Z   # private
/host/path:/container/path:z   # shared

List all volumes

podman volume ls
podman volume inspect <volume-name>

Volume backup

Back up data from a named volume:

podman run --rm \
  -v <volume-name>:/data:ro \
  -v $(pwd):/backup \
  busybox tar czf /backup/backup.tar.gz /data

Cleanup

Remove unused images, containers and volumes:

podman system prune -f        # containers + images
podman image prune -f         # untagged images only
podman volume prune -f        # unused volumes

Check for outdated images

List local images; auto-update only covers units with AutoUpdate= (Kube and Quadlet tabs):

podman images
podman auto-update --dry-run

All containers, including stopped ones

podman pod ps
podman ps -a

Resource usage

podman stats --no-stream

Customize this stack
Change ports, volumes, environment variables and more in the generator.
Open in Generator