Self-hosted DynamicDNS solution with Bind and PHP
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


  1. BIND DNS server daemon
  2. Some HTTP web server
  3. PHP

Server side installation

Create DNSSec key

Log into your server as a root and generate a new key for your DNS updater:

dnssec-keygen -a hmac-sha512 -b 512 -n HOST

This will create two files starting with letter K, then your domain name, then some gibberish and ending with .key and .private. Get the key value from .key file:


this will output something like this: IN KEY 512 3 165 bwfb5O8+1VUiV3un66ucV1c9yAyT5Hdzs1gUHpcWWZrFEihtLlKl1E4E wFsTNbWg+EvK/ddOq7wWmZ9GYaPYbw==

Copy the Base64 part from the key file (the one that looks like: bwfb5O8+1VUiV3un66ucV1c9yAyT5Hdzs1gUHpcWWZrFEihtLlKl1E4E wFsTNbWg+EvK/ddOq7wWmZ9GYaPYbw==) The space in the key is OK, don't worry.

Create zone configuration

Open up named.conf in your favourite text editor and add your zone configurations:

key "" {
    algorithm hmac-sha512;
    secret "bwfb5O8+1VUiV3un66ucV1c9yAyT5Hdzs1gUHpcWWZrFEihtLlKl1E4E wFsTNbWg+EvK/ddOq7wWmZ9GYaPYbw==";
zone "" {
    type master;
    file "/path/to/your/zones/";
    allow-update { key ""; };
    notify yes;

Create zone file

Now create a zone file and update accordingly (add your NS and primary A records, update SOA record):

$TTL 7200               ; 2 hours      IN SOA (
                                2014010101 ; serial
                                3600       ; refresh (1 hour)
                                900        ; retry (15 minutes)
                                604800     ; expire (1 week)
                                3600       ; minimum (1 hour)
                        A       123.456.789.012

Reload your DNS server with:

rndc reload

and probably check your log files if everything went on smoothly.

Create a webservice

Create a virtual host in your favourite HTTP server and install all the server side scripts into your desired virtual host. Update your configuration files accordingly:

  • copy the to and edit it's contents
  • copy the to and add your clients

Test your updates through provided update form.

Client side installation

Place your files somewhere on your client server/computer. Update your configuration files accordingly:

  • copy the to

Test your updates by launching the client:

php updater.php

Copy the updater.cron.sample to updater.cron, edit it accordingly and add your updater script to crontab:

crontab updater.cron