[新服务] ddns-updater to update dynamic dns动态域名 + cloudflare

date
Feb 12, 2025
slug
newservice-ddns-ddbs-updater
status
Published
summary
新服务 docker部署ddclient
tags
service
type
Post
URL
notion image

Summary

 

cloudflare设置域名

  • xxx.domain.tld ⇒ 127.0.0.1(任意)
  • 获得API Token (2 rights + all zones/all accounts)
notion image
notion image

Docker

Mac/Linux

services:
  ddns-updater:
    user: "0:0"  # Replace with your user ID and group ID
    image: qmcgaw/ddns-updater
    container_name: ddns-updater
    #network_mode: bridge
    ports:
      - 42080:8000/tcp
    volumes:
      - /data_n001/data/udata/real/1660/_ssd_docker/ddns-updater/data:/updater/data
    environment:
      - CONFIG=
      - PERIOD=5m
      - UPDATE_COOLDOWN_PERIOD=5m
      - PUBLICIP_FETCHERS=all
      - PUBLICIP_HTTP_PROVIDERS=all
      - PUBLICIPV4_HTTP_PROVIDERS=all
      - PUBLICIPV6_HTTP_PROVIDERS=all
      - PUBLICIP_DNS_PROVIDERS=all
      - PUBLICIP_DNS_TIMEOUT=3s
      - HTTP_TIMEOUT=10s

      # Web UI
      - LISTENING_ADDRESS=:8000
      - ROOT_URL=/

      # Backup
      - BACKUP_PERIOD=300m # 0 to disable
      - BACKUP_DIRECTORY=/updater/data

      # Other
      - LOG_LEVEL=info
      - LOG_CALLER=hidden
      - SHOUTRRR_ADDRESSES=
    restart: always
networks:
  default:
    name: npm_nginx_proxy_manager-network
    external: true
 
 

确保配置文件

  • zone_id # specific to the domain
  • token: # need to make sure with the right to edit this domain
{
  "settings": [
    {
      "provider": "cloudflare",
      "zone_identifier": "5243f2ad2946ef75355",
      "domain": "us-ysq.xsboy.com",
      "ttl": 600,
      "token": "tTGU_nB0KOFSgAZ06hRJ",
      "ip_version": "ipv4",
      "proxied": false
    }
  ]
}    
 
notion image

© Ying Bun 2021 - 2026