A Python 3 script to update DNS on DigitalOcean. https://gitlab.no/rune/py-dyndns
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.
rune 7ac8ba3432 Removed unused code, added space after comma 1 year ago
.gitignore Updates 1 year ago
README.md Added ability to add a new domain. 1 year ago
config-template.ini Added support for multiple domains 1 year ago
py-dyndns.py Removed unused code, added space after comma 1 year ago



PY-DYNDNS is a small Python app that updates DNS records on you Digital Ocean account. This app is not as polished as its NodeJs counterpart DYNDNS, amongst other things you have to be able to find the domain id(s) of the domain(s) you wish to update.


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! Edit the config.json file with your information.

Rename the config-template.ini to config.ini and fill in the values needed.

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; ./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
  • 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