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.
$ cp config.json.sample config.json
$ vi config.json
Put your usernames and passwords in it.
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.
$ 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
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
command line argument > configs file > external ip (from domains.google.com/checkip)
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
MIT