cloudflareddns

cloudflareddns

Docker app from hotio's Repository

Overview

WireGuard VPN, Privoxy and Unbound built-in! Update your Cloudflare A/AAAA records with your dynamic IP, turning Cloudflare into a Dynamic DNS service.

GitHub
ghcr.io

Tags Description Commit Last Updated
latest
release
release-860b1d2
Modified: meta.json2026-07-14 19:07:03

Starting the container

cli

docker run --rm \
    --name="cloudflareddns" \
    -e PUID=1000 \
    -e PGID=1000 \
    -e UMASK=002 \
    -e TZ="Etc/UTC" \
    -e INTERVAL=300 \
    -e DETECTION_MODE="dig-whoami.cloudflare" \
    -e LOG_LEVEL=3 \
    -e APPRISE="" \
    -e UPDATE_IPV4="true" \
    -e UPDATE_IPV6="true" \
    -e CF_USER="your.cf.email@example.com" \
    -e CF_APIKEY="your.global.apikey" \
    -e CF_APITOKEN="" \
    -e CF_HOSTS="test.example.com,test.foobar.com,*.foobar.com" \
    -v /<host_folder_config>:/config \
    ghcr.io/hotio/cloudflareddns

compose

services:
  cloudflareddns:
    container_name: cloudflareddns
    image: ghcr.io/hotio/cloudflareddns
    environment:
      - PUID=1000
      - PGID=1000
      - UMASK=002
      - TZ=Etc/UTC
      - INTERVAL=300
      - DETECTION_MODE=dig-whoami.cloudflare
      - LOG_LEVEL=3
      - APPRISE
      - UPDATE_IPV4=true
      - UPDATE_IPV6=true
      - CF_USER=your.cf.email@example.com
      - CF_APIKEY=your.global.apikey
      - CF_APITOKEN
      - CF_HOSTS=test.example.com,test.foobar.com,*.foobar.com
    volumes:
      - /<host_folder_config>:/config

Possible values for DETECTION_MODE are dig-google.com, dig-opendns.com, dig-whoami.cloudflare, curl-icanhazip.com, curl-wtfismyip.com, curl-showmyip.ca, curl-da.gd, curl-seeip.org, curl-ifconfig.co and curl-ipw.cn. If you want to get the local ip from a network interface, use something like local:eth0 as DETECTION_MODE.

If you use CF_APITOKEN (Permissions: Zone.DNS - Edit), you can leave CF_USER and CF_APIKEY empty.

!!! important

All the domains in `CF_HOSTS` should have properly configured DNS records on Cloudflare, they will not be created.

Log levels

For LOG_LEVEL you can pick 0, 1, 2 or 3.

  • 0 will give no log output. It's not recommended to use.

  • 1 will give you the following output types. It's the recommended value when all things are configured and running as expected.

UPDATE, WARNING, ERROR
  • 2 will give you the following output types. Use this if you always wanna see what's going on, but 3 gives you too much output.
UPDATE, WARNING, ERROR, INFO
  • 3 will give you the following output types. This is the default.
UPDATE, WARNING, ERROR, INFO, DEBUG

JSON log

Every IP update is also logged to /config/cf-ddns-updates.json. This can be used with the Telegraf JSON parser and the tail input, to get your domain updates into InfluxDB. Example output below.

{"domain":"vpn.example.com","recordtype":"A","ip":"1.1.1.1","timestamp":"2020-05-17T20:27:14Z"}
{"domain":"vpn.example.com","recordtype":"A","ip":"1.1.1.1","timestamp":"2020-05-17T20:29:26Z"}

Cached results from Cloudflare

The returned results from Cloudflare are cached. This means minimal api calls to Cloudflare. If you have made any manual changes to the IP on the Cloudflare webinterface, for instance when wanting to test an update, a container restart is needed to clear the cache.

The proxy setting (orange cloud) and TTL is also cached and re-set based on the previous value, so if you made any modifications to these settings, you should restart the container so that the script is aware of the new settings.

Sending notifications

You can send notifications when a DNS record gets updated with a new IP using Apprise. Use the environment variable APPRISE to configure notifications, see below for some examples.

-e APPRISE="pover://user@token"
-e APPRISE="pover://user@token,discord://webhook_id/webhook_token"

Install Cloudflareddns on Unraid in a few clicks.

Find Cloudflareddns in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Cloudflareddns Review the template variables and paths Click Install

Requirements

Don't forget to click **Show more settings...** for all **Variables**! If you do not use the VPN feature, you can remove all VPN related **Variables** and **Extra Parameters** (turn on **ADVANCED VIEW**).

Categories

Related apps

Explore more like this

Explore all

Details

Repository
ghcr.io/hotio/cloudflareddns:latest
Last Updated2026-07-17
First Seen2023-08-20

Runtime arguments

Network
bridge
Shell
bash
Privileged
false
Extra Params
--hostname=cloudflareddns.internal --cap-add=NET_ADMIN

Template configuration

Host Path for /configPathrw

Container Path: /config

Target
/config
INTERVALVariable

Container Variable: INTERVAL

Default
300
DETECTION_MODEVariable

Container Variable: DETECTION_MODE

Default
dig-whoami.cloudflare|dig-google.com|dig-opendns.com|curl-icanhazip.com|curl-wtfismyip.com|curl-showmyip.ca|curl-da.gd|curl-seeip.org|curl-ifconfig.co|curl-ipw.cn|local
LOG_LEVELVariable

Container Variable: LOG_LEVEL&lt;br&gt;3 - Debug logging&lt;br&gt;2 - Verbose logging&lt;br&gt;1 - Normal logging&lt;br&gt;0 - No logging

Default
3|2|1|0
APPRISEVariable

Container Variable: APPRISE&lt;br&gt;Send notifications with Apprise.

UPDATE_IPV4Variable

Container Variable: UPDATE_IPV4

Default
true|false
UPDATE_IPV6Variable

Container Variable: UPDATE_IPV6

Default
false|true
CF_USERVariable

Container Variable: CF_USER&lt;br&gt;Leave blank if you use CF_APITOKEN.

CF_APIKEYVariable

Container Variable: CF_APIKEY&lt;br&gt;Leave blank if you use CF_APITOKEN.

CF_APITOKENVariable

Container Variable: CF_APITOKEN

CF_HOSTSVariable

Container Variable: CF_HOSTS&lt;br&gt;Example: test.example.com;test.foobar.com;test2.foobar.com

PRIVOXY_ENABLEDVariable

Container Variable: PRIVOXY_ENABLED

Default
false|true
UNBOUND_ENABLEDVariable

Container Variable: UNBOUND_ENABLED

Default
false|true
UNBOUND_NAMESERVERSVariable

Container Variable: UNBOUND_NAMESERVERS

VPN_ENABLEDVariable

Container Variable: VPN_ENABLED

Default
false|true
VPN_CONFVariable

Container Variable: VPN_CONF

Default
wg0
VPN_PROVIDERVariable

Container Variable: VPN_PROVIDER

Default
generic|proton|pia
VPN_LAN_NETWORKVariable

Container Variable: VPN_LAN_NETWORK

VPN_LAN_LEAK_ENABLEDVariable

Container Variable: VPN_LAN_LEAK_ENABLED

Default
false|true
VPN_EXPOSE_PORTS_ON_LANVariable

Container Variable: VPN_EXPOSE_PORTS_ON_LAN

VPN_AUTO_PORT_FORWARDVariable

Container Variable: VPN_AUTO_PORT_FORWARD

Default
false
VPN_PORT_REDIRECTSVariable

Container Variable: VPN_PORT_REDIRECTS

VPN_HEALTHCHECK_ENABLEDVariable

Container Variable: VPN_HEALTHCHECK_ENABLED

Default
false|true
VPN_NAMESERVERSVariable

Container Variable: VPN_NAMESERVERS

VPN_PIA_USERVariable

Container Variable: VPN_PIA_USER

VPN_PIA_PASSVariable

Container Variable: VPN_PIA_PASS

VPN_PIA_PREFERRED_REGIONVariable

Container Variable: VPN_PIA_PREFERRED_REGION

VPN_PIA_DIP_TOKENVariable

Container Variable: VPN_PIA_DIP_TOKEN

VPN_PIA_PORT_FORWARD_PERSISTVariable

Container Variable: VPN_PIA_PORT_FORWARD_PERSIST

Default
false|true
PUIDVariable

Container Variable: PUID

Default
99
PGIDVariable

Container Variable: PGID

Default
100
UMASKVariable

Container Variable: UMASK

Default
002