How to install DuckDNS

DuckDNS is perfect free dynamic DNS service that does not require manually updating your up tp 5 free dynamic DNS domain names. It is easy to setup the shell script to do this for you via crontab.

To install DuckDNS, first create one directory to store your DuckDNS update script and one for DuckDNS log. In this example the update script is stored in the existing scripts directory under /home. But the log directory needs to be created.

# mkdir /var/log/duckdns

Now open vim editor to create the script:

# cd /home/scripts
# vim

Paste the following line and make sure to edit highlighted parts exampledomain  needs to be fqdn (i.e. and the token you can find under your account.

echo url="" | curl -k -o /var/log/duckdns/duck.log -K -

In case you are updating multiple domains (up to 5), separate each domain with coma and no space (i.e.,,

Close the script and make it executable:

# chmod 700

Edit the crontab:

# crontab -e

and paste the following like. Remember to update your path to reflect location of your dns update script.

*/5 * * * * /home/scripts/ >/dev/null 2>&1

Save and exit. Now run the script:

# ./

You should receive output similar to this:

 % Total % Received % Xferd Average Speed Time  Time  Time    Current
Dload Upload Total Spent Left Speed
100 2 0 2 0 0 2 0 --:--:-- --:--:-- --:--:-- 2

Check that the log does not contain any errros:

# cat /var/log/duckdns/duck.log

If everythings is OK you should get only work OK in the log file.

If your crontab service is not started, start it now:

# systemctl start cron 



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.