cloudflarespeedtestddns
Intelligent DDNS updater that finds the fastest Cloudflare IP and updates DNS records automatically
945
š An intelligent DDNS update tool that automatically finds the fastest Cloudflare IP and updates your DNS records.
git clone https://github.com/DeepBlueThought/Cloudflare-SpeedTest-DDNS.git
cd Cloudflare-SpeedTest-DDNS
cp .env.example .env
# Edit .env with your Cloudflare credentials
docker compose up -d
docker run -d \
--name cloudflare-ddns \
--restart unless-stopped \
-e zone_id="your_cloudflare_zone_id" \
-e api_token="your_cloudflare_api_token" \
-e host_name="testip.yourdomain.com" \
-e host_ip_max=2 \
-e speedtest_para="-n 1000 -dn 2 -sl 5 -tl 100" \
-e cron="0 * * * *" \
deepbluethought/cloudflarespeedtestddns:latest
| Variable | Required | Default | Description |
|---|---|---|---|
zone_id | Yes | - | Cloudflare Zone ID |
api_token | Yes | - | Cloudflare API Token (needs Zone.DNS edit permission) |
host_name | Yes | - | Domain to update (e.g., testip.example.com) |
host_ip_max | No | 2 | Number of IPs to maintain in DNS records |
speedtest_para | Yes | - | CloudflareSpeedTest parameters |
cron | Yes | - | Cron expression for scheduling (e.g., "0 * * * *" for hourly) |
.env file:
zone_id=your_zone_id_here
api_token=your_api_token_here
host_name=testip.yourdomain.com
host_ip_max=2
speedtest_para="-n 1000 -dn 2 -sl 5 -tl 100 -url https://download.example.com/largefile.bin"
cron=0 * * * *
[2026-02-09 12:00:00] [INFO] Testing 2 existing DNS record(s)...
[2026-02-09 12:00:10] [INFO] Existing IP 1.0.0.1: 45.23ms / 35.67MB/s
[2026-02-09 12:00:10] [INFO] Existing IP 1.0.0.2: 48.10ms / 32.10MB/s
[2026-02-09 12:00:10] [INFO] Search thresholds: Latency < 48ms, Speed > 32MB/s
[2026-02-09 12:00:10] [INFO] Searching for better IPs...
[2026-02-09 12:05:30] [INFO] New candidate IP: 1.0.0.3 (42.10ms / 38.21MB/s)
[2026-02-09 12:05:30] [SUCCESS] Selected top 2 IP(s) for DNS:
[2026-02-09 12:05:30] [INFO] #1: 1.0.0.3 (42.10ms / 38.21MB/s) [NEW]
[2026-02-09 12:05:30] [INFO] #2: 1.0.0.1 (45.23ms / 35.67MB/s) [KEEP]
[2026-02-09 12:05:31] [SUCCESS] DNS update completed
MIT License - See LICENSEā for details
Powered by CloudflareSpeedTestā
Content type
Image
Digest
sha256:2b0f16b0fā¦
Size
13.5 MB
Last updated
5 months ago
docker pull deepbluethought/cloudflarespeedtestddns