
Technitium DNS Server is an open-source, authoritative, and recursive DNS server designed for privacy and security. It offers advanced features such as DNS-over-TLS (DoT) and DNS-over-HTTPS (DoH). It features a modern, user-friendly web console for managing zones, records, and logs.
This article demonstrates how to deploy Technitium DNS Server on Ubuntu 24.04 using Docker Compose. The stack includes Traefik for secure HTTPS access to the administration dashboard.
Before you begin:
technitium.example.com, to point to your server’s public IP address for the web dashboard.By default, Ubuntu 24.04 runs a local stub resolver systemd-resolved that occupies port 53. To run your own DNS server, you must disable this service to allow Technitium to bind to the port.
Stop the systemd-resolved service.
Disable the service so it does not start again when you reboot.
Remove the symbolic link for /etc/resolv.conf.
To ensure the server itself can still connect to the internet to download updates, you need to configure the server to use a public DNS provider. Create a new DNS configuration file.
This configuration tells your server to send its own DNS queries to 1.1.1.1, a public DNS server provided by Cloudflare.
Technitium requires persistent folders for configuration and data, along with environment variables that specify your domain and other settings. This section prepares both the directory structure and the .env file.
Create the project folders.
config - Persistent storage for Technitium logs, zones, and settings.letsencrypt - Traefik ACME certificates.Navigate to the root Technitium directory.
Create a file named .env in the project directory.
Add the following values:
Replace technitium.example.com with your domain, and admin@example.com with your email address. Save and close the file.
This section sets up the Technitium deployment. The stack includes Traefik for handling HTTPS connections to the administrative web panel and the Technitium service for handling actual DNS queries.
Add your user account to the docker user group.
Apply new group membership.
Create the Docker Compose manifest file.
Add the following contents:
Save and close the file.
This Docker Compose configuration deploys Technitium DNS Server behind Traefik, providing secure HTTPS access to the administrative panel while exposing DNS ports directly for network-wide DNS resolution. Each service plays a specific role in the deployment:
dns-server service (Technitium DNS Server)
technitium/dns-server image.53/udp and 53/tcp so local devices can use this server for regular DNS queries../config directory, preserving DNS zones and settings across restarts.${DOMAIN}) to Technitium’s web management interface running internally on port 5380.traefik service
./letsencrypt directory.Start all services in detached mode.
Check the container status.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
Technitium is now running, but you need to set the administrative password and configure the upstream resolvers (forwarders), so your server can resolve domains it doesn't host locally.
Open your web browser and navigate to your Technitium domain, such as https://technitium.example.com.
You will be greeted by the initial login screen. The default user is admin, and the default password is admin.
Upon logging in, the system will immediately prompt you to change the password. Enter a strong password and save.
The dashboard will load, showing current statistics.
Navigate to the Settings tab in the main menu.
Select the Proxy & Forwarders sub-tab.
Go to the Forwarders section. In the text box, enter your preferred upstream DNS providers (one per line), such as 1.1.1.1 and 8.8.8.8. This ensures your server can resolve public domains, such as vultr.com, by querying these providers.
Scroll to the bottom of the page and click Save Settings.
If you wish to control who can query your server, the Recursion tab allows you to set the server to "Allow Recursion Only For Private Networks" (default) or define a specific "Network Access Control List (ACL)".
Verify that the server is working correctly and accessible from your client.
Run this command from your local computer. Replace SERVER_IP with your server's public IP address.
You should get a response containing the A records of the vultr.com domain.
You have successfully deployed Technitium DNS Server on Ubuntu 24.04. You now have a private, secure DNS resolver that can block ads and manage custom DNS records. For more information, refer to the Technitium Help page.
0 Comments
Be the first to comment and share your perspective with the community.