Tech

IP Monitor: A Discord Bot for Dynamic DNS

I run a few services from a home server. The IP changes occasionally. When it changes, everything breaks until I update DNS. I needed something that watches the IP and tells me when it moves.

What it does

A Go application that polls your external IP on a schedule. When it detects a change, it updates a pinned message in a specified Discord channel and sends a broadcast notification. The pinned message always shows the current IP.

How it works

Simple loop: fetch external IP from a public API, compare to last known value, update Discord if changed. Stores state in memory, survives restarts by reading the current pinned message on startup. No database. Runs in a Docker container with a 12MB image.

View on GitHub