247 words
1 minute
Dynamic DNS with ddns-go
2024-12-25

What Is ddns-go#

ddns-go is an open-source dynamic DNS (DDNS) tool. It automatically keeps your current public IP in sync with your DNS provider, so you can always reach your home network, server, or other devices by domain name — even when the public IP keeps changing.

Why You Need It#

Most residential public IPs are dynamic, which means you’d otherwise have to update DNS records by hand every time the address changes. ddns-go does that for you automatically.

Getting Started#

I run ddns-go in Docker. If you don’t have Docker yet, see the install guide.

Here’s the docker-compose.yml:

services:
ddns-go:
image: jeessy/ddns-go
container_name: ddns-go
restart: always
ports:
- '9876:9876'
volumes:
- ./ddns-go:/root

With that in place, start the container:

Terminal window
docker-compose up -d

Configuring ddns-go#

Open http://127.0.0.1:9876 in a browser, set the initial username and password, and click Save.

Then pick your DNS provider — I use Cloudflare — and enter your DNS token:

  1. Sign in to Cloudflare
  2. Go to Manage Account → Account API Tokens → Create Token
  3. Create an Edit zone DNS token, select your domain under Zone Resources, and set the permission to Edit
  4. Copy the token once it’s created
  5. Paste it into the DNS Token field in ddns-go

Under Domains, add your domain and click Save.

If you’d like change notifications, you can also configure a WebHook.

Finally, click Save in the top-left corner to finish.

ddns-go

Verify#

With everything configured, your internal services are reachable at http://<your-domain>:<port>.

For example, http://mihouo.com:5244 gets you to my AList instance.

Final Notes#

ddns-go lets you reach home services by domain name and stops you having to worry about a shifting public IP.

Dynamic DNS with ddns-go
https://www.mihouo.com/en/posts/network/ddns-go/
Author
Jia
Published at
2024-12-25
License
CC BY-NC-SA 4.0