记录使用ddclient配置ddns的方法
目前很多发行版自带的ddclient包版本都太老了,而ddclient又是c语言写的安装比较麻烦,用docker是最方便的,如果机器内存很少可以试下nerdctl
docker-compose.yaml
:
yaml---
services:
ddclient:
image: lscr.io/linuxserver/ddclient:latest
container_name: ddclient
environment:
- PUID=1000
- PGID=1000
- TZ=Asia/Hong_Kong
volumes:
- /root/ddclient/config:/config
restart: unless-stopped
docker compose up -d
启动
待补充
/root/ddclient/config/ddclient.conf
confdaemon=120 # check every 300 seconds syslog=yes # log update msgs to syslog #mail=root # mail all msgs to root #mail-failure=root # mail failed update msgs to root pid=/var/run/ddclient/ddclient.pid # record PID in file. ssl=yes # use ssl-support. Works with # ssl-library use=web, web='https://cloudflare.com/cdn-cgi/trace', web-skip='ip=' # found after IP Address ## ## CloudFlare (www.cloudflare.com) ## protocol=cloudflare zone=your.domain ttl=1 login=token # Only needed if you are using your global API key. If you are using an API token, set it to "token" (wihtout double quotes). password=your_token # This is either your global API key, or an API token. If you are using an API token, it must have the permissions "Zone - DNS - Edit" and "Zone - Zone - Read". The Zone resources must be "Include - All zones". sub.your.domain
修改后重启服务
docker compose down
docker compose up -d
本文作者:renbear
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC 2.0 许可协议。转载请注明出处!