Skip to content

Setup Technitium

Overview

Technitium DNS Server is an open source tool that can be used for blocking Internet Ads using DNS Sinkhole, self hosting a local DNS server for privacy & security or, used for experimentation/testing by software developers on their computer.

It can be configured to use DNS-over-TLS or DNS-over-HTTPS forwarders, making all DNS queries private & secure for all your applications form being spied or hijacked.

Important Docker Files

.env file

.env
NAME=dns
DOMAIN=
APPDATA=
PORT=5380
SUB=

docker-compose.yml file

docker-compose.yml
services:
  dns:
    container_name: ${NAME}
    image: technitium/dns-server
    hostname: ${SUB}.${DOMAIN}
    restart: unless-stopped
    ports:
      - 53:53/udp
      - 53:53/tcp
    volumes:
      - ${APPDATA}/${NAME}/config:/etc/dns
    networks:
      - main
    sysctls:
      - net.ipv4.ip_local_port_range=1024 65000
    environment:
      DNS_SERVER_DOMAIN: ${SUB}.${DOMAIN}
      DNS_SERVER_LOG_USING_LOCAL_TIME: true
    labels:
      swag: enable
      swag_address: ${NAME}
      swag_port: ${PORT}
      swag_url: ${SUB}.${DOMAIN}
      com.centurylinklabs.watchtower.enable: true
networks:
  main:
    external: true

Start the Container

Start the Container
docker compose up -d