GoLang Google Domains Dynamic DNS Update Client
google-ddns-updater is a program, writen in Go, for updating Google Domains dynamic DNS records via the Google Domains API. See Google documentation for API usage and other details: https://support.google.com/domains/answer/6147083?hl=en
ggoogle-ddns-updater will compare the current external IP address as obtained from http://myexternalip.com, with the currently resolving IP address of the DNS record. If they are identical, no further action is taken other than logging. If they differ, an authenticated request is sent to the Google Domains API to update the record, with logging of the request response and status.
- An existing dynamic DNS record hosted by Google Domains
- Environment variables set for GOOG_DDNS_HOSTNAME, GOOG_DDNS_USERNAME, & GOOG_DDNS_PASSWORD
- Clone this repository
- Build the binary from src for your architecture:
go build
- Set environment variables for GOOG_DDNS_HOSTNAME, GOOG_DDNS_USERNAME, & GOOG_DDNS_PASSWORD
- Run google-ddns-updater
- Updates in this repo are automatically built via Dockerfile and a GitHub Action into a container image (ARM architecture) located at https://github.com/users/clayshek/packages/container/package/google-ddns-updater.
docker pull ghcr.io/clayshek/google-ddns-updater:latest
. Required environment variables will need to be provided to the container.
- The included
ddns-k8s-deployment.yml
file can be used to pull the continer image into a Kubernetes or K3s cluster, which runs as an hourly CronJob. The secrets must be populated in the deployment file to be passed as environment variables to the pod.
- Improve logging
- Add better code comments
- Versioning
- Create Helm chart