Digital Ocean Dynamic DNS Updater in Python

Given the abysmal state of Dynamic DNS (mostly pay or worse — like, I decided it made sense to use my domain name to setup a psuedo-DDNS system. There are many options — including installing PowerDN — which I may do in the future for fun.

However, thankfully, Digital Ocean offers some helpful APIs with on-demand key generation. Furthermore, there are some decent Python scripts already written for the job (though, they’re not that complicated).

Python 3.x

You should note that (as I found out) urlib2 has been split into 2 libraries for Python 3.x

Python 2.x
My machine is still running Py2.7 — so I decided to go with the original script the above was based on. I’m a bit too lazy to resetup pip+distribute on its own env for Py3 at the moment.


  • Make an A record on your domain, e.g. “home” with your current public IP
  • Setup the variables in the scripts (e.g. api key, record, domain, etc) — e.g.  domain=’’ record=’home’
  • Schedule the job in task scheduler, cron, etc.

I love RCN, but they’re not getting $10/m for a static ;)


Leave a Reply

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