title: Setting up Cloudflare DDNS on Ubuntu using cloudflare-ddns-updater date: 2026-03-20 draft: false tags:
- cloudflare
- ddns
- homelab
- ubuntu
- automation
🧩 Problem
My home network uses a dynamic public IP address, which changes periodically. This breaks remote access to my self-hosted services.
🛠️ Solution Overview
I used an open-source tool (cloudflare-ddns-updater) to automatically update my Cloudflare DNS records whenever my public IP changes.
🔧 Environment
- Ubuntu Server (DDNS host)
- Cloudflare domain
- API Token with DNS edit permissions
- Git installed
🚀 Step 1: Create Cloudflare API Token
- Log in to Cloudflare
- Go to My Profile → API Tokens
- Create a token with:
- Zone → DNS → Edit
- Zone Resources → Specific Zone (your domain)
Save the token securely.