Most home internet connections get a public IP address that can change without warning. If a name such as ddns.example.com has to keep pointing at your house, something needs to notice the change and tell your DNS provider. When your domain is on Cloudflare, a small container on Unraid can do that. This guide uses favonia/cloudflare-ddns and goes from a new Cloudflare token to a record that updates itself.
- Time
- 8 min
- Steps
- 13
- Updated
- 2 Dec 2026
You will learn
- Check that dynamic DNS can work on y…
- Why this updater
- Create an API token in Cloudflare
- Limit the token to one zone
- Put the token in a file on Unraid
I used oznu/cloudflare-ddns for this before. That project was archived in August 2022 and its image dates from March 2021, so I am replacing it. If you run it too, there is a section further down with the settings side by side.
What you get and what you need
After these steps an A record in your Cloudflare zone follows your public IPv4 address. The updater checks when it starts and then every five minutes.
You need:
- a domain whose DNS is managed by Cloudflare (the free plan is enough),
- an Unraid server with Docker enabled and access to its terminal,
- permission to create an API token in your Cloudflare account,
- a router where you can see your WAN address.
In every screenshot the real domain and IP address are replaced by example.com and the documentation address 203.0.113.10.
Step 1 of 13: Check that dynamic DNS can work on your connection
Some providers put many customers behind one shared address, which is called CGNAT. A DNS record then points at the shared address, and nothing from outside reaches your router. Look up the WAN address on your router. If it falls between 100.64.0.0 and 100.127.255.255, or differs from what a “what is my IP” site shows, ordinary dynamic DNS will not make your home reachable.
The project documentation points to a tunnel, such as Cloudflare Tunnel, for that case. For access to your own server, managing Unraid from anywhere with Tailscale also works without a public address.
Step 2 of 13: Why this updater
The project is maintained: at the time of writing the latest image is version 1.18.0, built in October 2026. A few things make it a good fit for a server at home.
- You give it full names such as
ddns.example.comand it works out the zone itself. - It asks Cloudflare for your public address over HTTPS, so no third party is involved by default.
- It keeps the proxy status, TTL and comment of a record that already exists.
- The image is small and can run as an unprivileged user with a read-only file system.
- It can report failures to Healthchecks, Uptime Kuma or a notification service.
Step 3 of 13: Create an API token in Cloudflare
The updater needs one permission: Zone, DNS, Edit. Use an API token and leave the Global API Key alone, which can do everything in your account.
Sign in to Cloudflare, open your profile, choose API tokens and press Create token. Pick the template Edit zone DNS and give the token a name you will recognise in a year, such as cloudflare-ddns.

The README adds a permission for account filter lists. That one is for keeping a firewall list of your addresses, which this guide does not use.
Step 4 of 13: Limit the token to one zone
Press the pencil next to the zone policy. At the top you choose which domains the token may touch. Pick Specific zone and select the domain you are going to update. A leaked token can then only change that domain.

An end date on the token is optional. If you set one, put a reminder in your calendar, because updates stop that day. Leave client IP filtering empty, since your address is the thing that changes. Create the token and copy it straight into a password manager. Cloudflare shows it only once.
Step 5 of 13: Put the token in a file on Unraid
Unraid stores container variables in a template on the flash drive, readable as plain text. The updater can read the token from a file instead, which keeps it out of the template. Open the Unraid terminal and run:
mkdir -p /mnt/user/appdata/cloudflare-ddns
read -rs TOKEN
The terminal now waits without showing anything. Paste the token, press Enter, and then run:
printf '%s' "$TOKEN" > /mnt/user/appdata/cloudflare-ddns/token
unset TOKEN
chown 99:100 /mnt/user/appdata/cloudflare-ddns/token
chmod 400 /mnt/user/appdata/cloudflare-ddns/token
Reading the token this way keeps it out of your shell history. User 99 and group 100 are nobody and users on Unraid, the account the container will run as. If your appdata share is part of a backup, the token is in that backup too.
Step 6 of 13: Add the container on Unraid
Open the Docker tab, press Add Container and switch on Advanced View. Fill in:
- Name:
cloudflare-ddns-favonia, or any name you like - Repository:
favonia/cloudflare-ddns:1 - Network Type: Bridge
- Extra Parameters:
--user 99:100 --read-only --cap-drop=all --security-opt=no-new-privileges

The tag :1 follows version 1, so updates arrive without a surprise jump to a new major version. The extra parameters run the container as an ordinary user, with no write access to its own file system and no Linux capabilities. It needs no ports.
Step 7 of 13: Add the path and the variables
Press Add another Path, Port, Variable, Label or Device for each setting. First a Path: container path /secrets/token, host path /mnt/user/appdata/cloudflare-ddns/token, access mode Read Only.
Then these variables:
CLOUDFLARE_API_TOKEN_FILE=/secrets/tokenDOMAINS=ddns.example.com. Use the full name. Several names go in one line, separated by commas.IP6_PROVIDER=none, if you only want IPv4. Existing IPv6 records are left alone.PROXIED=false
PROXIED decides the proxy status of records the updater creates. A record that already exists keeps its own setting. Keep the proxy off for anything that is not web traffic, such as SSH, a VPN or a game server.

Step 8 of 13: Start it and read the log
Press Apply, then switch Autostart on for the container on the Docker tab. Click the container icon and choose Logs. The updater prints the settings it read, detects your address and reports what it did with each name. If something is wrong with the token or a setting, it says so here and stops. These lines are from my first start, shortened and with an example name and address:
🌟 Cloudflare DDNS (v1.18.0)
📖 Reading settings . . .
🔸 Using default IP4_PROVIDER=cloudflare.trace
🔸 Using default UPDATE_CRON=@every 5m
📖 Current settings:
🔸 IPv4-enabled domains: ddns.example.com
🔸 TTL: 1 (auto)
🔸 Unproxied domains: ddns.example.com
🌐 Detected IPv4 address: 203.0.113.10
🤷 The A records for ddns.example.com are already up to date
⏰ Checking the IP addresses in about 4m58s . . .
The line that matters is the one about your record. Already up to date means Cloudflare holds the same address the updater detected. The last line tells you when it looks again.
Step 9 of 13: Check the record in Cloudflare
Open your domain in Cloudflare, go to DNS, then Records, and search for the name. You should see an A record with your public address.

Then ask a public resolver from your computer:
dig +short ddns.example.com @1.1.1.1
The answer should match the address on your router. A proxied record returns Cloudflare addresses instead.
Step 10 of 13: Move over from oznu/cloudflare-ddns
Your old token keeps working if it can edit DNS for the zone. The settings translate like this:
API_KEYbecomesCLOUDFLARE_API_TOKENorCLOUDFLARE_API_TOKEN_FILE.ZONEandSUBDOMAINbecome one full name inDOMAINS.PROXIEDkeeps its name.RRTYPE=AbecomesIP6_PROVIDER=none.CRONbecomesUPDATE_CRON, with@every 5mas the default.
Start the new container first and read its log. When it reports your record correctly, stop the old one and switch its Autostart off. Both pointing at the same address for a few minutes does no harm. Keep the old template for a week before you remove it.

Step 11 of 13: Point other names at the same record
For more services, add CNAME records in Cloudflare that point at the updated name, for example photos to ddns.example.com. When your address changes, only the A record is rewritten and the others follow. A wildcard *.example.com does this for every name at once, and it also makes every name you can think of resolve to your house.
Step 12 of 13: Open only what you need on the router
A DNS record opens nothing by itself. Traffic reaches a service only when your router forwards a port to it. Forward as little as possible, put web services behind a reverse proxy with HTTPS, and never forward the Unraid web interface or SSH to the whole internet.
For things only you use, you may not need an open port at all. I wrote about why I dropped my reverse proxy for Tailscale.
Step 13 of 13: Fix the problems you may run into
- The log complains about the token file: check the path mapping and that the file belongs to user 99. The container cannot read a file it has no rights to.
- exec /bin/ddns: operation not permitted: some kernels dislike
--security-opt=no-new-privileges. Remove that one option and try again. - error code: 1034: set
IP4_PROVIDER=cloudflare.doh. - The detected address differs from the router: check for CGNAT, or a VPN on the server that changes where traffic leaves from.
- You want to see when something happened: the updater writes no timestamps of its own.
docker logs --timestamps cloudflare-ddns-favoniaadds them.
A container that runs is no proof that updates succeed. Read the log after changes, or connect Healthchecks or Uptime Kuma so a failure reaches you.
