doddns

command module
v0.0.0-...-c25416f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 12 Imported by: 0

README

doddns.go

Script that recurringly checks the host's public IP address and updates DigitalOcean DNS records.

Public IP address is obtained using the free public service ipify.

Updates both A and AAAA records. All records of the same type will be set to the same IP address. You must create your DigitalOcean DNS domain and domain record(s) ahead of time. This script will only update existing records, not create new ones.

Configuration

Must be a JSON file on disk. Supply the config path with --config path/to/conf.json.

Options:

  • token_file: Path to file on disk containing only your DigitalOcean personal access token.
  • domain: The domain managed in DigitalOcean.
  • hostname: The hostname or subdomain that should point to this host.
  • period: Update period, specified in seconds.
  • ipv4 and ipv6: One or both of these must be set to true. Enables updating A and AAAA records respectively.

Example:

{
    "token_file": "/home/me/my_doddns_token",
    "domain": "example.com",
    "hostname": "rhombus",
    "period": 600,
    "ipv4": true,
    "ipv6": false
}

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL