How I Automated Namecheap Dynamic DNS Updates from Unraid for My EdgeRouter 4 and Caddy Setup

Background: Home Lab DNS Troubles
Can’t think of a way to introduce this. You’re probably here if you’re trying to setup dynamic DNS with Namecheap. And your dynamic DNS client isn’t taking a wildcard. Well, hello to all 7 of you. Hopefully this post saves you some time.
I’ve been updating my home network/home lab setup recently.
Three different components are relevant here.
Ubiquiti EdgeRouter 4: My main router and firewall.
Caddy: A powerful reverse proxy and automatic HTTPS provider.
Namecheap: My registrar and DNS host.
The goal was straightforward: use Dynamic DNS (DDNS) to ensure my domain always points to my current home IP address. This is critical for two reasons:
My ISP (like most) gives me a dynamic, not static, IP—so it changes occasionally.
I want to access self-hosted services remotely (and automate SSL certificates with Caddy), so I need my domain to resolve to the correct IP at all times.
The Problem: Wildcard DNS and EdgeRouter’s Limitation
I wanted to update the wildcard DNS A record (*) at Namecheap.
A wildcard record lets you use any subdomain (e.g., foo.mydomain.com
, bar.mydomain.com
) and still have it resolve to your home IP. This is perfect when you might want to host multiple services or experiment with different subdomains.
However, when I tried to set this up using the EdgeRouter 4’s built-in DDNS client, I hit a wall:
The EdgeRouter 4 DDNS client won’t accept a wildcard (“*”) as the host for dynamic DNS updates.
It’d require me to configure a specific subdomain. The settings allow for multiple to be configured but that’s obnoxious to setup every added subdomain by hand any time you need a new one.
This means I couldn’t automate updates for wildcard DNS using the built-in tools, and any subdomains I wanted to use wouldn’t resolve if my IP changed.
In short: the router’s built-in DDNS was too limited for wildcard records, which I needed.
Namecheap Dynamic DNS Beta Client
Namecheap offers an official Dynamic DNS client in beta (DNS Client Version 2.0x ). This Windows-based tool supports more flexible record updates, including wildcard records, unlike some routers’ built-in clients.
But running another Windows app 24/7 for one API call? Not ideal.
Automating Namecheap DDNS from Unraid
Since I already have an Unraid server that’s always on, I decided to automate the Dynamic DNS update with a shell script. You could use any always-on system for this (Raspberry Pi, Linux VM, NAS, etc.), but Unraid is perfect for hands-off automation.
How Namecheap Dynamic DNS Works
Namecheap DDNS uses a simple HTTP(S) URL to update your DNS record. Here’s the URL format:
https://dynamicdns.park-your-domain.com/update?host=[HOST]&domain=[DOMAIN]&password=[DDNS_PASSWORD]&ip=[IP_ADDRESS]
[HOST]: The subdomain (use “*” for wildcard, or “@” for root)
[DOMAIN]: Your domain name (e.g., mydomain.com)
[DDNS_PASSWORD]: Find this in your Namecheap dashboard under “Advanced DNS” → “Dynamic DNS Password”
[IP_ADDRESS]: Optional. If omitted, the server sees your public IP.
Example for wildcard (*) record:
https://dynamicdns.park-your-domain.com/update?host=*&domain=mydomain.com&password=YOURPASSWORD
How to Automate with a Script (Unraid or Linux)
Create a shell script (e.g.,
update-namecheap-ddns.sh
):#!/bin/bash HOST="*" DOMAIN="yourdomain.com" PASSWORD="your_ddns_password" curl "https://dynamicdns.park-your-domain.com/update?host=${HOST}&domain=${DOMAIN}&password=${PASSWORD}"
Make it executable:
chmod +x update-namecheap-ddns.sh
Schedule with cron or Unraid’s User Scripts plugin:
On Unraid, use the User Scripts plugin to schedule the script to run at your desired interval. Choose something longer than 5 minutes.
On Linux, add to your crontab:
*/15 * * * * /path/to/update-namecheap-ddns.sh
Conclusion: Reliable Dynamic DNS for Home Labs
If your EdgeRouter 4 or other router can’t handle updating wildcard (“*”) DNS records on Namecheap, skip the hassle!
Just use the HTTP API directly from any always-on system—Unraid, a Linux box, even a lightweight container. This gives you full control and works perfectly with Caddy for reverse proxy setups, SSL automation, and more.
Disclaimer:
Most of the formatting and a lot of the wording in this article were put together by ChatGPT 4.1, working from my notes and technical experience. I’m not a professional writer—just sharing what I’ve learned in the hope it might save someone else some time. Both ChatGPT and I can make mistakes, so always use your own judgment and double-check things before making changes to your own setup.
Subscribe to my newsletter
Read articles from Tyler H directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
