Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

meinside/google-ddns-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

google-ddns-updater

This application updates Google Domain's DDNS configurations.

It caches values and skip requests if there were no changes, so that it is not blocked by Google.

how to configure

$ cp config.json.sample config.json
$ vi config.json

screenshot_google_ddns_updater

Put your usernames and passwords in it.

ip address

If you want to update your DDNS configurations with a certain ip address, put ip in your config file like:

{
  "ip": "1.2.3.4",
  "configs": [
    {
      "hostname": "ddns.some-domain.com",
      "username": "no-such-username",
      "password": "wrong-password"
    }
  ]
}

Otherwise, it will fetch your external ip address from domains.google.com/checkip automatically.

how to build/install

$ git clone https://github.com/meinside/google-ddns-updater.git
$ cd google-ddns-updater/
$ go build

or

$ go install github.com/meinside/google-ddns-updater@latest

how to run

Run it with a config file at certain location:

$ ./google-ddns-updater -c /etc/ddns/config1.json
# or
$ ./google-ddns-updater --config /etc/ddns/config2.json

Or run with a config file which is located in the same directory as the binary:

$ /path/to/google-ddns-updater
# will load configs from /path/to/config.json

If you want to update specific domains only:

$ /path/to/google-ddns-updater some.domain.com another.domain.com andanother.domain.com

When you want to set your ip address manually, use -i or --ip argument:

$ /path/to/google-ddns-updater -i 123.123.123.123

priority of ip address

command line argument > configs file > external ip (from domains.google.com/checkip)

crontab

Following is a sample crontab:

0 6 * * * /path/to/google-ddns-updater -c /where/is/config1.json
0 7 * * * /path/to/google-ddns-updater -c /where/is/config2.json some.domain.com
0 8 * * * /path/to/google-ddns-updater -c /where/is/config3.json another.domain.com andanother.domain.com
0 9 * * * /path/to/google-ddns-updater -c /where/is/config4.json -i 12.23.34.45

license

MIT

About

Google Domain's DDNS Configuration Updater (written in Golang)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages