博文

目前显示的是标签为“DuckDNS”的博文

How to run DuckDNS on Raspberry Pi?

图片
 Here’s a clean, reliable way to run DuckDNS on a Raspberry Pi . You can use either a tiny systemd timer (my pick) or a classic cron job. Both call DuckDNS’s HTTPS update API. 0) Get your DuckDNS domain + token Sign in at DuckDNS, add a subdomain, copy your token .  DuckDNS update API (HTTPS) accepts: https://www.duckdns.org/update?domains=<DOMAINS>&token=<TOKEN>[&ip=][&ipv6=][&verbose=true] Leave ip= blank to auto-detect IPv4; add ipv6= if you want to set IPv6 explicitly.  Option A — systemd service + timer (every 5 minutes) 1) Make the updater script sudo mkdir -p /usr/local/lib/duckdns sudo nano /usr/local/lib/duckdns/update.sh Paste (edit the two variables): #!/usr/bin/env bash DOMAINS= "yourdomain1,yourdomain2" # comma-separated, no .duckdns.org TOKEN= "your-token" # Optional: detect a global IPv6 (uncomment next line if you want IPv6 set too) # IPV6_ADDR=$(ip -6 addr show scope global | awk '/inet6...