
用于为多个DNS提供商保持DNS A和/或AAAA记录更新的程序
!https://raw.githubusercontent.com/qdm12/ddns-updater/master/readme/ddnsgopher.svg
https://github.com/qdm12/ddns-updater/actions/workflows/build.yml/badge.svg](https://github.com/qdm12/ddns-updater/actions/workflows/build.yml)
!最新版本 !最新Docker标签 !GitHub最新发布日期 !发布后提交数
!代码大小 !GitHub仓库大小 !Go版本
!访问量统计
本README和https://github.com/qdm12/ddns-updater/blob/master/docs/%E7%9B%AE%E5%BD%95%E4%B8%8E%E7%A8%8B%E5%BA%8F%E7%89%88%E6%9C%AC**%E4%BF%9D%E6%8C%81%E4%B8%80%E8%87%B4**%EF%BC%9A
| 版本 | README链接 | 文档链接 |
|---|---|---|
| 最新 | https://github.com/qdm12/ddns-updater/blob/master/README.md | https://github.com/qdm12/ddns-updater/tree/master/docs |
v2.8 | https://github.com/qdm12/ddns-updater/blob/v2.8.0/README.md | https://github.com/qdm12/ddns-updater/blob/v2.8.0/docs |
v2.7 | https://github.com/qdm12/ddns-updater/blob/v2.7.1/README.md | https://github.com/qdm12/ddns-updater/blob/v2.7.1/docs |
v2.6 | https://github.com/qdm12/ddns-updater/blob/v2.6.1/README.md | https://github.com/qdm12/ddns-updater/blob/v2.6.1/docs |
v2.5 | https://github.com/qdm12/ddns-updater/blob/v2.5.0/README.md | https://github.com/qdm12/ddns-updater/blob/v2.5.0/docs |
提供Docker镜像 https://hub.docker.com/r/qmcgaw/ddns-updater 和 https://github.com/qdm12/ddns-updater/pkgs/container/ddns-updater
提供https://github.com/qdm12/ddns-updater/releases
🆕 在AUR中可用,包名为 ddns-updater - 详见 https://github.com/qdm12/ddns-updater/discussions/808
定期为不同DNS提供商更新A记录:
Web用户界面(桌面端)
!https://github.com/qdm12/ddns-updater/raw/master/readme/webui-desktop.gif
Web用户界面(移动端)
!https://github.com/qdm12/ddns-updater/raw/master/readme/webui-mobile.png
通过 SHOUTRRR_ADDRESSES 使用Shoutrrr发送通知
容器(Docker/K8s)特定特性:
amd64、386、arm64、armv7、armv6、s390x、ppc64le、riscv64 CPU架构的镜像使用JSON文件 updates.json 持久化存储每条记录的旧IP地址和更改时间
从https://github.com/qdm12/ddns-updater/releases%E4%B8%8B%E8%BD%BD%E9%80%82%E7%94%A8%E4%BA%8E%E6%82%A8%E5%B9%B3%E5%8F%B0%E7%9A%84%E9%A2%84%E6%9E%84%E5%BB%BA%E7%A8%8B%E5%BA%8F%E3%80%82%E6%88%96%E8%80%85%EF%BC%8C%E6%82%A8%E5%8F%AF%E4%BB%A5%E5%AE%89%E8%A3%85Go%EF%BC%8C%E7%84%B6%E5%90%8E%E8%BF%90%E8%A1%8C go install github.com/qdm12/ddns-updater/cmd/ddns-updater@latest 下载、构建并安装最新版本的程序。
对于Linux和MacOS,使用 chmod +x ddns-updater 使程序可执行。
在程序保存目录中,创建 data 目录。
在 data/config.json 中编写JSON配置,例如:
json{ "settings": [ { "provider": "namecheap", "domain": "sub.example.com", "password": "e5322165c1d74692bfa6d807100c0310" } ] }
您可以在https://github.com/qdm12/ddns-updater/blob/master/README.md#configuration%E6%89%BE%E5%88%B0%E6%9B%B4%E5%A4%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BF%A1%E6%81%AF%E3%80%82
使用 ./ddns-updater(Windows上为 ./ddns-updater.exe)运行程序,或双击程序图标。
以下为可选步骤。
LOG_LEVEL 对应标志 --log-level。https://github.com/qdm12/ddns-updater/issues/708
创建一个目录,例如 data,要求:
1000(ddns-updater容器的内置用户ID)shmkdir data chown 1000 data chmod u+r+w+x data
如果您想使用其他用户ID,可以https://github.com/qdm12/ddns-updater/blob/master/README.md#build-the-image%EF%BC%8C%E5%B9%B6%E6%8C%87%E5%AE%9A --build-arg UID=<您的用户ID>。您也可以使用 --user="0" 以root用户运行容器,但从安全角度不建议这样做。
类似地,创建 data/config.json 文件,要求:
1000shtouch data/config.json chmod u+r data/config.json
编辑 data/config.json,例如:
json{ "settings": [ { "provider": "namecheap", "domain": "sub.example.com", "password": "e5322165c1d74692bfa6d807100c0310" } ] }
您可以在https://github.com/qdm12/ddns-updater/blob/master/README.md#configuration%E6%89%BE%E5%88%B0%E6%9B%B4%E5%A4%9A%E8%87%AA%E5%AE%9A%E4%B9%89%E4%BF%A1%E6%81%AF%E3%80%82
使用以下命令运行容器:
shdocker run -d -p 8000:8000/tcp -v "$(pwd)"/data:/updater/data qmcgaw/ddns-updater
以下为可选步骤。
docker-compose up -d。docker pull qmcgaw/ddns-updater 更新镜像。CONFIG 环境变量(即 {"settings": [{"provider": "namecheap", ...}]}),其优先级高于 config.json。但请注意,如果不挂载 /updater/data 目录,将不会有持久化数据库文件 /updater/updates.json,但程序仍可运行。首先,在 config.json 或 CONFIG 环境变量中包含以下内容:
json{ "settings": [ { "provider": "", }, { "provider": "", } ] }
对于每个设置,您需要填写参数。请查看您的DNS提供商文档:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。






探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务