Simple NodeJs app to keep one or more DNS records updated at Digital Oceans DNS.
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.
Mariano Aloi a294d6ebf5 Funcionando perfeitamente 1 year ago
.gitignore all 2 years ago
.npmignore New repo 4 years ago
config.json Funcionando perfeitamente 1 year ago
index.js Funcionando perfeitamente 1 year ago
package-lock.json Funcionando perfeitamente 1 year ago
package.json Funcionando perfeitamente 1 year ago Update '' 4 years ago


DYNDNS is a small Node CLI (command line) app that updates DNS records on you Digital Ocean account.


Clone this repo with git clone 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.

If you don't know your subdomains ID, just fill in the parts with api_key and name. Install with npm install -g. The name parameter is the top level domain name, eg.

Then run the app dyndns --config "/path/to/your/config.json" --list

Depending on your operating system, the config file and the path to it should be either inside quotation marks or not.

You will get a JSON looking something like this:

   { id: 000000, <-- The ID
   type: 'A',
   name: 'YOU SUB DOMAIN',
   data: '', <-- Current IP
   priority: null,
   port: null,
   ttl: 1800,
   weight: null,
   flags: null,
   tag: null },

Place the value of id in the correct place(s) in your config.json file.


As describe above, you use the app by runnig it with parameters. You HAVE to include --config "/path/to/your/config.json". The file can be anywhere on the system, but the user running the app should be able to read the file! You can name the file what you like as well.

To include IPv6 add -ip6 to the command. eg. dyndns --config "/path/to/your/config.json" -ip6

I use it with Cron. My crontab contains the line 0 * * * * dyndns --config "/path/to/your/config.json" -ip6 >/dev/null 2>&1. This runs the command once an hour with no logging. If you want a log, you can use 0 * * * * dyndns --config "/path/to/your/config.json" -ip6 >> /var/log/dyndns.login your crontab. This logs all events and errors to a log file (dyndns.log). You can of course name your log file as you wish! Digital Ocean has a rate limit on 5000 requests per hour.