JGAntunes / do-dynamic-dns

A small nodejs tool that dynamically updates a DNS record on Digital Ocean based on your public ip

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Digital Ocean Dynamic DNS

A small nodejs tool that dynamically updates a DNS record on Digital Ocean based on your public ip.

Useful for when you have services running behind a NAT with a dynamic public IP.

Usage

Set your configuration using the specified env vars or using the config.js file:

DOMAIN='root.domain.i.want.to.check'
RECORD='record.to.insert'
DO_TOKEN='Your Digital Ocean personal access token'

Using Docker

If you have docker and bash it's as easy as:

DO_TOKEN="123456789" DOMAIN="jgantunes.com" RECORD="test" RUN=1 ./build.sh

This will ensure an A record is created for test under your jgantunes.com domain resource.

If you only have docker just run the appropriate docker setup with the provided Dockerfile.

Using Node

To run the project using Node just install the deps:

npm i
# or yarn

And run the project with the appropriate configuration:

DO_TOKEN="123456789" DOMAIN="jgantunes.com" RECORD="test" npm start
# or yarn start

Contributing

This project uses standard js.

License

MIT

About

A small nodejs tool that dynamically updates a DNS record on Digital Ocean based on your public ip

License:MIT License


Languages

Language:JavaScript 80.7%Language:Shell 10.1%Language:Dockerfile 9.2%