Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use tinydns to serve up DNS records for my domain name. What is a minimal example of how to set this up in Ubuntu? You can assume that I've already set the name server for the domain to point to the IP of my server.

share|improve this question
up vote 5 down vote accepted

Install tinydns (which is included with djbdns) and other required packages:

aptitude install djbdns daemontools-run make

Once the daemontools-run package is installed, we need to start it manually the first time (it will start automatically on boot):

initctl start svscan

tinydns needs two users to run. Create them now:

adduser --system --no-create-home --disabled-login --group tinydns
adduser --system --no-create-home --disabled-login --group dnslog

Create the service configuration directory in the standard location:

mkdir -p /etc/sv

Run tinydns-conf to create the skeleton for the service:

tinydns-conf tinydns dnslog /etc/sv/tinydns <server-ip>

where tinydns and dnslog are the names of the user accounts that we previously created; <server-ip> is the IP address on the server that tinydns will listen on.

An empty tinydns-data file (analogous to BIND's zone file) will have been created at /etc/sv/tinydns/root/data. You will need to edit it and enter in the details for your domain. See the official documentation and this for details on what to enter and example data files.

Whenever you make changes to the tinydns-data file, you must rebuild the tinydns database:

cd /etc/sv/tinydns/root

A file named data.cdb should have been created in the same directory.

Finally, enable the tinydns service by running:

update-service --add /etc/sv/tinydns

You should see tinydns running in ps. You can verify that your DNS server is serving up requests correctly by running something like this:

dig @<server-ip> <your-domain-name> ANY
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.