Skip to content

nilbot/nextdns-ip-updater

Repository files navigation

NextDNS IP Updater

A service that automatically updates NextDNS with your current WAN IP address at regular intervals by directly calling the NextDNS endpoint from within your home network.

Available in two implementations:

  • Python version: Docker-based service (this README)
  • Go version: Static binaries for manual deployment (README-go.md)

Features

  • Regularly updates the NextDNS endpoint with your WAN IP
  • NextDNS automatically detects your WAN IP when called from your network
  • Uses structured logging for better visibility
  • Runs in a Docker container (Python) or as static binaries (Go)
  • Configurable update interval

Configuration

Configuration is done through environment variables:

Usage

Using Docker Compose (recommended)

  1. Clone this repository
  2. (Optional) Edit the docker-compose.yml file to change the environment variables
  3. Run:
docker-compose up -d

Using Docker directly

docker build -t nextdns-ip-updater .
docker run -d --name nextdns-ip-updater \
  -e NEXTDNS_ENDPOINT=https://link-ip.nextdns.io/YOUR_ID/YOUR_EXT_ID \
  -e UPDATE_INTERVAL_SECONDS=300 \
  nextdns-ip-updater

Logs

View the logs with:

docker logs -f nextdns-ip-updater

Security Considerations

This image runs as the default (root) user. For production environments, consider implementing additional security measures.

About

Update WAN IP to NextDNS

Resources

Stars

Watchers

Forks

Packages