A simple dynamic DNS solution to be used with Digital Ocean's DNS service. Get the API key from you DO account. https://blog.rune.pm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.2 KiB


PY-DYNDNS is a small Python app that updates DNS records on you Digital Ocean account.


Clone this repo with git clone https://gitlab.no/rune/py-dyndns.git. To get your API key, log in to your Digital Ocean account and click the API link at the top of the page. Follow the instructions! Rename the config-template.ini to config.ini Edit the config.ini file with your information.

This is made based on Python 3 so you need Python3 to use it!


Change permission of the file to be excecutable chmod +x py-dyndns.py and run it with ./py-dyndns.py

  • To list all subdomains on main domain in config.ini; ./py-dyndns.py -l
  • To show current IP's for domains in config.ini; ./py-dyndns.py -c
  • To add a new domain; ./py-dyndns.py -a domainname
  • To show help; ./py-dyndns.py -h

To update all subdomains in config.ini run the app without arguments.

The best way to use this is with cron. To run the app every second hour create a cron job like this:

0 1-23/2 * * * py-dyndns.py >/dev/null 2>&1


  • Add IPv6
  • Add possibility to list sub domain(s) with domainid(s)
  • Add help text
  • Add possibility to update more than one domain
  • Add possibilty to send log file to email