UsageΒΆ
The following examples were run on a Debian system using the Gandi DNS provider.
See the Supported providers section for more on supported DNS providers.
Make sure you have the necessary system prerequisites with:
$ sudo apt update
$ sudo apt install -y python3 python3-dev python3-pip
And then install hdyndns
with:
$ sudo useradd -m hdyndns
$ sudo -u hdyndns pip3 install --user hdyndns
If you have an DNS A record for mysite.com
and subdomains
foo.mysite.com
and bar.mysite.com
that looks like the following:
@ 1800 IN A 86.91.199.200
foo 1800 IN A 86.91.199.200
bar 1800 IN A 86.91.199.200
Then create a configuration file at /home/hdyndns/.hdyndns/hdyndns.ini
:
[mysite.com]
provider = gandi
api_secret = mySuperSecretApiPassword
subdomains = foo,bar
ip_versions = 4,6
Finally, add it your root crontab (sudo crontab -e
) to run it every 15 minutes:
*/15 * * * * runuser -l hdyndns -c '$HOME/.local/bin/hdyndns' &>/dev/null
Regarding the &>/dev/null
part, see issue #8.