A simple app that sends Discord notifications whenever the public IP address changes.
- Go 1.24 or later.
- Docker (optional).
Before running ensure that all required envs are set.
DISCORD_WEBHOOK_URL. Required. The webhook URL for sending Discord notifications.SCHEDULE. Optional. Default is@every 1h. A CRON string supported by robfig/cron/v3.LOG_LEVEL. Optional. Default isinfo. The logging level for the application (error,info,debug, etc.).
go run .- Build the application:
go build -o ip-addr-notifier . - Run the application:
./ip-addr-notifier
- Build the Docker image:
docker build -t ip-addr-notifier . - Run the Docker container:
docker run --rm ip-addr-notifier
services:
ip-addr-notifier:
image: ghcr.io/exec-astraea/ip-change-notifier:latest
environment:
- DISCORD_WEBHOOK_URL=${DISCORD_WEBHOOK_URL}
- SCHEDULE=${SCHEDULE}
volumes:
- /srv/ip-addr-notifier/last_ip.txt:/app/last_ip.txtThis project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.