Use a Gandi.Net subdomain you own as a replacement for a DynDNS host.
- Every hour (by default), it will run a script.
- That script will determine your externally-facing IPv4 and/or IPv6 address.
- It will create or update A or AAAA records for a subdomain under a domain you have registered at Gandi.Net.
I got a renewal notice for DynDNS.com and noticed that the cost had shot up precipitously. I thought there had to be a better way. I went searching at my registrar, Gandi.Net, and saw that they had an example of how to do this, using an older API. So I created a new version based on that with their v5 API.
- Installs a
systemduser timer and user service. - Accepts necessary parameters (API key, domain name, subdomain)
- Determines your IPv4 and/or IPv6 address
- Submits those 4 pieces of information to Gandi.Net to create or update an A and/or AAAA record with a TTL of 30m
- Expects every invocation to run like
systemd start --user gandi-dyndns.service(no standalone execution)
git clone https://github.com/KlfJoat/gandi.net-dns-dynamic.git
cd gandi.net-dns-dynamic
make install(stub)
Prerequisite: Pay for a domain hosted by Gandi.Net.
- Go to Gandi.Net
- Create an API key
- Configure the API key & domain in the
systemdenvironment file at$XDG_CONFIG_HOME/gandi-dyndns.confor in the script itself - Further optional configuration can be performed in the
systemdenvironment file at$XDG_CONFIG_HOME/gandi-dyndns.confor in the script itself- Subdomain - defaults to
hostname --short - DNS record TTL (in seconds) - defaults to 1800 (30 minutes)
- Service to get your external IP address - defaults to
me.gandi.net - API endpoint - defaults to
api.gandi.net/v5/. Override this to test using the Gandi API Sandbox atapi.sandbox.gandi.net/v5/.
- Subdomain - defaults to
- Due to a bug in
systemd257, it is not currently (Ubuntu 2025.11) possible to use the nifty systemd Credentials mechanism to pass in the API key. - I should make the Setup section above clearer and more step-by-step.
I might accept PRs, I might not. I'm trying to keep this relatively simple. But give it a shot if you have something to add!