Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

digital-ocean-dynamic-dns

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

digital-ocean-dynamic-dns

Dynamically update Domain Records on Digital Ocean

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
increased by700%
Maintainers
1
Weekly downloads
 
Created
Source

digital-ocean-dynamic-dns

Dynamically update Domain Records on Digital Ocean.

Build Status

Installation

$ npm install -g digital-ocean-dynamic-dns

Basic Usage

You can specify an address with the -a parameter, or don't and dodd will use your public IP instead.

$ dodd -t <DigitalOceanApiToken> -a <someIp> -d <yourDomain.tld> -r <domainRecordTitle>
$ dodd -t <DigitalOceanApiToken> -d <yourDomain.tld> -r <domainRecordTitle>

Example with a specific IP

To change home.example.com to direct to 123.456.789.123:

$ dodd -t abc123def456ghi789 -a 123.456.789.123 -d example.com -r home

Example using the public IP

To change home.example.com to direct to whatever your public IP is:

$ dodd -t abc123def456ghi789 -d example.com -r home

Create

If the -c or --create flag is set and the record does not exist under the given domain, it will be created.

$ dodd -t abc123def456ghi789 -d example.com -r home --create

Run automatically

On Linux you can run dodd at boot and then repeatedly at a certain interval using systemd. Set up the command in systemd/dodd.service and set a time interal in systemd/dodd.timer. Then copy both to /etc/systemd/system/ and start them with

$ systemctl start dodd.service
$ systemctl start dodd.timer

To auto-start the service after boot run.

$ systemctl enable dodd.service
$ systemctl enable dodd.timer

The above will run dodd with the parameters defined in dodd.service after boot, as soon as the network is available. After that it will run the same command regularly as defined by the interval in the dodd.timer file (hourly by default).

You can veryify that the dodd timer is active by running systemctl list-timers.

More Options

There are more optional parameters. Use dodd --help for details.

$ dodd --help

  Usage: dodd [options]

  Options:

    -h, --help                             output usage information
    -t, --token <token>                    Your Digital Ocean API token
    -a, --address <address>                The address the DNS record should direct to. Uses the public IP if none is provided.
    -d, --domainName <domainName>          The domain name itself (<domainName>.tld)
    -r, --recordName <recordName>          The name of the comain record (<recordName>.domain.tld)
    -y, --recordType <recordType>          The type of DNS record (A, CNAME, TXT, ...). Defaults to A.
    -l, --recordTtl <recordTtl>            The time to live for the record, in seconds. Deafults to 1800.
    -p, --recordPriority <recordPriority>  The priority of the host (SRV and MX records only).
    -o, --recordPort <recordPort>          The port that the service is accessible on (SRV records only).
    -w, --recordWeight <recordWeight>      The weight of records with the same priority (SRV records only).
    -c, --create                           Create a new domain record if none exists. Creates the domain RECORD, not a domain.

Keywords

FAQs

Package last updated on 15 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc