ZDDNS
A Python utility to automatically update Cloudflare DNS records with your network's external IP address.
Features
- Automatically discovers your external IP address
- Updates specified Cloudflare DNS records
- Configurable via YAML configuration file
- Command-line interface for easy usage
- Logging for tracking updates and troubleshooting
- Docker support for containerized deployment
- CI/CD pipeline for automated testing and deployment
Installation
From PyPI
# Install the latest version
pip install zddns
From Source
# Clone the repository
git clone https://github.com/gzamboni/zddns.git
cd zddns
# Using uv (recommended)
uv pip install .
# Or using pip
pip install .
Using Docker
# Pull from Docker Hub
docker pull gzamboni/zddns:latest
# Or pull from GitHub Container Registry
docker pull ghcr.io/gzamboni/zddns:latest
# Run with Docker
docker run -v /path/to/config:/config gzamboni/zddns
See DOCKER.md for more detailed Docker instructions.
Configuration
Create a configuration file at ~/.config/zddns/config.yaml with the following structure:
cloudflare:
api_token: "your-cloudflare-api-token"
zone_id: "your-zone-id"
record_name: "subdomain.example.com"
ttl: 120 # Optional, defaults to 1 (automatic)
proxied: true # Optional, defaults to false
ip_providers:
- "https://api.ipify.org"
- "https://ifconfig.me/ip"
- "https://icanhazip.com"
check_interval: 300 # Seconds between checks, defaults to 300 (5 minutes)
You can also specify a custom configuration file location using the --config option.
Usage
# Run once and exit
zddns --once
# Run as a daemon, checking periodically
zddns
# Specify a custom configuration file
zddns --config /path/to/config.yaml
# Show current IP without updating DNS
zddns --show-ip
# Show help
zddns --help
Docker Compose Example
version: '3'
services:
zddns:
image: gzamboni/zddns:latest
container_name: zddns
restart: unless-stopped
volumes:
- ./config:/config
environment:
- TZ=UTC
Contributing
Contributions are welcome! Please see CONTRIBUTING.md for details on how to contribute to this project.
Security
For security issues, please see our Security Policy.
Code of Conduct
Please note that this project is released with a Code of Conduct. By participating in this project you agree to abide by its terms.
Changelog
See CHANGELOG.md for a list of changes in each release.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for zddns 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| zddns-0.1.0.tar.gz | 9.4 kB | Without provenance | Details for zddns-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zddns-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for zddns-0.1.0-py3-none-any.whl |
Total release size: 20.0 kB
Release files / zddns-0.1.0.tar.gz
| Download URL | zddns-0.1.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd22fee1b82ba97b2635e831cdac693d1d7eb125deff3b8577f3ec1551d71017
|
|
BLAKE2b-256 checksum How to use checksums |
3ef1172ac12f133f933e0422b8191298bfb39605d41de920e60530aad1e07a42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / zddns-0.1.0-py3-none-any.whl
| Download URL | zddns-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c3b9f04c41575be85e9a46845ec1efff7dfd0b42d11438f80386b6705385c3c
|
|
BLAKE2b-256 checksum How to use checksums |
4b7e6a3003367e91027b19aab7241850500d603338b5e80fe8cdcc00d923e5b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for zddns 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.