All apps · 0 apps
cloudflareddns
Docker app from hotio's Repository
Overview
Readme
View on GitHub| Tags | Description | Commit | Last Updated |
|---|---|---|---|
latest release release-860b1d2 | Modified: meta.json | 2026-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.
0will give no log output. It's not recommended to use.1will give you the following output types. It's the recommended value when all things are configured and running as expected.
UPDATE, WARNING, ERROR
2will give you the following output types. Use this if you always wanna see what's going on, but3gives you too much output.
UPDATE, WARNING, ERROR, INFO
3will 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.
Requirements
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/hotio/cloudflareddns:latestRuntime arguments
- Network
bridge- Shell
bash- Privileged
- false
- Extra Params
--hostname=cloudflareddns.internal --cap-add=NET_ADMIN
Template configuration
Container Path: /config
- Target
- /config
Container Variable: INTERVAL
- Default
- 300
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
Container Variable: LOG_LEVEL<br>3 - Debug logging<br>2 - Verbose logging<br>1 - Normal logging<br>0 - No logging
- Default
- 3|2|1|0
Container Variable: APPRISE<br>Send notifications with Apprise.
Container Variable: UPDATE_IPV4
- Default
- true|false
Container Variable: UPDATE_IPV6
- Default
- false|true
Container Variable: CF_USER<br>Leave blank if you use CF_APITOKEN.
Container Variable: CF_APIKEY<br>Leave blank if you use CF_APITOKEN.
Container Variable: CF_APITOKEN
Container Variable: CF_HOSTS<br>Example: test.example.com;test.foobar.com;test2.foobar.com
Container Variable: PRIVOXY_ENABLED
- Default
- false|true
Container Variable: UNBOUND_ENABLED
- Default
- false|true
Container Variable: UNBOUND_NAMESERVERS
Container Variable: VPN_ENABLED
- Default
- false|true
Container Variable: VPN_CONF
- Default
- wg0
Container Variable: VPN_PROVIDER
- Default
- generic|proton|pia
Container Variable: VPN_LAN_NETWORK
Container Variable: VPN_LAN_LEAK_ENABLED
- Default
- false|true
Container Variable: VPN_EXPOSE_PORTS_ON_LAN
Container Variable: VPN_AUTO_PORT_FORWARD
- Default
- false
Container Variable: VPN_PORT_REDIRECTS
Container Variable: VPN_HEALTHCHECK_ENABLED
- Default
- false|true
Container Variable: VPN_NAMESERVERS
Container Variable: VPN_PIA_USER
Container Variable: VPN_PIA_PASS
Container Variable: VPN_PIA_PREFERRED_REGION
Container Variable: VPN_PIA_DIP_TOKEN
Container Variable: VPN_PIA_PORT_FORWARD_PERSIST
- Default
- false|true
Container Variable: PUID
- Default
- 99
Container Variable: PGID
- Default
- 100
Container Variable: UMASK
- Default
- 002