Skip to content

Support us

Created: 2022-07-23 | Last update: 2022-08-02

UDM Cloudflare DDNS

Github Repository: UDM Cloudflare DDNS

What It Does

This will allow to to span a container with podman to handle DDNS updates for main internet IP address.
The container will run the background without any system permissions.

Compatibility

Requirements

Persistence on Reboot is required.
This can be accomplished with a boot script. Flow this guide: UDM Boot Script

  • Cloudflare API Toke

Creating a Cloudflare API token

To create a CloudFlare API token for your DNS zone go to https://dash.cloudflare.com/profile/api-tokens and follow these steps:

  1. Click Create Token
  2. Select Create Custom Token
  3. Provide the token a name, for example, example.com-dns-zone
  4. Grant the token the following permissions: - Zone - DNS - Edit
  5. Set the zone resources to: - Include - Specific Zone - example.com
  6. Complete the wizard.
  7. Use the generated token at the API_KEY variable for the container

Installation

curl -s https://raw.githubusercontent.com/fire1ce/UDM-Cloudflare-DDNS/main/install.sh | sh

Configuration

Edit the configuration file located at

/mnt/data/on_boot.d/30-cloudflare-ddns.sh

Parameters

For detailed information on the parameters, see the oznu/docker-cloudflare-ddns Github Page

Parameter Description Example Type Required
PI_KEY Cloudflare API Token change_me string Yes
ZONE Cloudflare Domain example.com string Yes
SUBDOMAIN Remove Proxied Records ddns string Yes
CRON Pi-hole hostname/IP "* * * * *" string(cron syntax) Yes

Access DDNS Container Logs

In order to check that everything is working, you can access the logs of the container using the following command:

podman logs -f cloudflare-ddns

Credit

Based on oznu/docker-cloudflare-ddns by oznu, unifios-utilities/cloudflare-ddns

Comments