Update Gandi LiveDNS based on the current (dynamic) ip.
Some (most ?) providers (Orange for example) don't provide you with a fix IP address: they give you a dynamic IP that changes over time. This makes it hard to self-host software and share them publicly via a domain because you have to constantly change the IP your domain is pointing to.
This program aims to solve that. It's intended to run on a always-on computer in your home (such as Raspberry Pi).
- Supports both IPv4 and IPv6.
- Ship as single binary with no OS dependencies.
- Reports failures and successful updates on a Discord channel. /!\ This is not optional (by design).
- From GitHub releases: download the binary corresponding to your OS and architecture.
- From source (make sure
$GOPATH/binis in your
go install go.mlcdf.fr/dyndns
dyndns requires the following environment variables to be set:
||your Discord channel webhook|
||your Gandi API Key|
Usage: dyndns --domain [DOMAIN] --record [RECORD] Options: --ttl Time to live in seconds. Defaults to 3600 --always-notify Always notify the Discord channel (even when nothing changes) -V, --version Print version Examples: export DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/xxx' export GANDI_TOKEN='foobar' dyndns --domain example.com --record "*.pi"
Setup as a
crontab -e # Run every 10 minutes */10 * * * * /path/to/dyndns --domain example.com --record "*.pi"
Check out the example contrib/deploy.sh script.
- go version > 1.19+
- docker-compose version > 2, installed as docker plugins (invoked via
Run the app
go run main.go
Run the tests
go test ./...
go test to run all the tests (and don't kill the docker-compose containers so the following runs will be faster).
There is no documentation for this package.