Dynamic DNS server for Google Cloud DNS managed zones on Cloud Run.
This is not an officially supported Google product. This project is maintained soley by David Claridge, and not in association with his employment at Google.
- Create a GCP project and enable Datastore, Cloud DNS & Cloud Run.
- Create a Zone in Cloud DNS.
- Clone this GitHub repository.
- Change the
Projectandzoneconstants inddns/google.go. - Build using
docker build -t gcr.io/<project>/ddns-server:latest .. - Push the image to GCR using
docker push gcr.io/<project>/ddns-server:latest. - (optional) Create a service account with the roles "Cloud Datastore User" and "DNS Administrator". Pass that service account to the next command as
--service-account <custom-account>. - Deploy the Cloud Run application
gcloud run deploy --image gcr.io/<project>/ddns-server:latest --project <project> --platform managed --allow-unauthenticated. - Create tokens for your domains using:
go run ./cmd/adddomain. The created token corresponds to the password to use in the next step. - Configure the dynamic DNS client on your router to use the Cloud Run app's address. Specify any value as the username, if required, and the created token as the password.
This project is a work in progress. Unfinished work includes:
- UI for managing domains (instead of
adddomainCLI utility). - Moving project/zone configuration to environment variables.
- Listening based on the
PORTenvironment variable, rather than a constant8080.