Go + Telegram utility to keep Porkbun A-records in sync with your current public IP.
- Main
.envstores secrets and base settings. - Private runtime env stores mutable state: update mode and tracked subdomains.
- Telegram commands update the runtime env directly, so no service restart is needed.
- Manual edits in the runtime env are picked up on the next
/updateand after restart.
Recommended layout:
/etc/ddns-updater/.env/etc/ddns-updater/.runtime.env
MODE=selected
SUBDOMAINS=home,nas,@MODE=selected: update only subdomains from the list.MODE=all: update all existing A-records in Porkbun.@means the root domain.
The runtime env is written with 0600 permissions and the install target creates /etc/ddns-updater with 0700.
/updateruns sync immediately./listshows current runtime env./add <subdomain>adds a subdomain toSUBDOMAINS./remove <subdomain>removes a subdomain fromSUBDOMAINS./mode selectedswitches to list-based mode./mode allswitches to update-all mode./helpshows help.
Important:
/addand/removedo not create or delete DNS records in Porkbun.- If the A-record already exists in Porkbun,
/addonly updates local runtime env. - If the A-record does not exist, the service keeps the subdomain in runtime env and reports it as missing during update.
sudo mkdir -p /etc/ddns-updater
sudo cp .env.example /etc/ddns-updater/.env
sudo cp runtime.env.example /etc/ddns-updater/.runtime.env
sudoedit /etc/ddns-updater/.env
sudoedit /etc/ddns-updater/.runtime.env
make installLegacy migration:
- If
.runtime.envdoes not exist yet, the service bootstraps it fromSUBDOMAINSin the main.env.
Check timer status:
systemctl status ddns-updater.timerRemove completely:
make uninstall