ipwarn is a simple Dynamic DNS Update Client.
- Multiple DNS Providers: Update records on Porkbun and GoDaddy
- Automatic IP Detection: Checks your public IP with automatic failover between multiple services
- Telegram Notifications: Get notified instantly when your IP changes
- Easy Configuration: Simple config file with sensible defaults
- Production Ready: Docker images ready for easy deployment
- Test Once: Run in dry-run mode to verify your setup before going live
# Get the example config from the repository or running container
docker run --rm ghcr.io/caldito/ipwarn:v2.0.0 cat /etc/ipwarn/ipwarn.conf > ipwarn.conf
# Edit it with your settings
vim ipwarn.conf # or your preferred editor
# Run the container with your config
docker run -d \
--name ipwarn \
--mount type=bind,source=$(pwd)/ipwarn.conf,target=/etc/ipwarn/ipwarn.conf \
ghcr.io/caldito/ipwarn:v2.0.0Note: An example config is available at config/ipwarn.conf.example in this repository and at /etc/ipwarn/ipwarn.conf inside the container.
The example config file is available at config/ipwarn.conf.example in this repository or at /etc/ipwarn/ipwarn.conf inside the container.
To create your config:
# From the repository
cp config/ipwarn.conf.example ipwarn.conf
# Or from a running container
docker run --rm ghcr.io/caldito/ipwarn:v2.0.0 cat /etc/ipwarn/ipwarn.conf > ipwarn.confThen edit ipwarn.conf with your settings:
# Check interval in seconds (default: 30)
INTERVAL=30
# IP checking services (comma-separated, in order)
IP_CHECKERS=icanhazip.com,ipify.org,ifconfig.me
# Telegram Notifications
UPDATE_TELEGRAM=false
TEL_API_TOKEN=your_bot_token
TEL_CHAT_ID=your_chat_id
# GoDaddy DNS
UPDATE_GODADDY=false
GD_DOMAIN=example.com
GD_RECORD_NAME="@" # Use "@" for root domain or "www" for subdomain
GD_RECORD_TYPE="A"
GD_API_KEY=your_api_key
GD_API_SECRET=your_api_secret
# Porkbun DNS
UPDATE_PORKBUN=false
PB_DOMAIN=example.com
PB_RECORD_NAME="@" # Use "@" for root domain or "www" for subdomain
PB_RECORD_TYPE="A"
PB_API_KEY=your_api_key
PB_SECRET_API_KEY=your_secret_api_key
PB_TTL=600 # Time to live in seconds
# Logging level (DEBUG, INFO, WARNING, ERROR)
LOG_LEVEL=INFOTip: Test your configuration first with --dry-run flag:
docker run --rm \
--mount type=bind,source=$(pwd)/ipwarn.conf,target=/etc/ipwarn/ipwarn.conf \
ghcr.io/caldito/ipwarn:v2.0.0 ipwarn --dry-run --onceipwarn [-h] [--version] [-c CONFIG] [--once] [--dry-run]
Options:
-h, --help Show help message
-v, --version Show version
-c, --config CONFIG Path to config file (default: /etc/ipwarn/ipwarn.conf)
--once Run once and exit (for testing)
--dry-run Don't actually update DNS records (for testing)- Go to developer.godaddy.com
- Sign in and go to Keys & Credentials
- Create a new API key
- Select Production and copy your Key and Secret
- Log in to porkbun.com
- Go to Account → API Access
- Create a new API key
- Copy your API Key and Secret API Key
- Open Telegram and start a chat with @BotFather
- Send
/newbotand follow the instructions - Copy your bot token
- To get your chat ID, send a message to your bot and visit:
https://api.telegram.org/bot<TOKEN>/getUpdates
- Python 3.12+
- uv (Python package manager)
# Clone the repository
git clone https://github.com/caldito/ipwarn.git
cd ipwarn
# Setup development environment with uv
make setup
# Run tests
make test
# Format code
make format
# Run linters
make lint
# Run locally for testing
make run-oncemake setup # Setup venv with uv
make test # Run tests
make lint # Run linters (ruff, mypy)
make format # Format code (black, ruff)
make run # Run continuously
make run-once # Run once for testing
make clean # Clean build artifactsMIT License - see the LICENSE file for details