I've tested this on Dahua NVR but it should work on both any Dahua component. Skip to SOLUTION if you just want to know how to setup DuckDNS.
I am hiding my personal information in this post. DuckDNS token will be deleted after I post and I'm editing the IP Address in the picture. Let me know if I miss something
INTRODUCTION
Dahau comes with 4 DDNS options: Dahua own DDNS, NO-IP, CN99, DynDns.
I have multiple Dahua NVRs so I want a free service with multiple DDNS domains that is set and forget. When searching for a free DDNS service I was recommended DuckDNS. DuckDNS even has a DynDns compatible endpoint.
Unfortunately when setting up my NVR according to DuckDNS instructions I could never get the DDNS domain to update.
DuckDNS instructions:

Dahua NVR:

After looking around on Google, I'm certain this is the correct setup. I was suspicious of the password as DuckDNS token is very long, maybe too long. I manually inputted the token into the password field and tried copy/paste but neither worked.
I tried looking around to get a shorter DuckDNS token but I don't think it's possible. Time to get more technical.
I enable port mirroring on my switch and breakout WireShark.
This is the capture on WireShark. We can see the NVR sending a DDNS update to DuckDNS.

Here is what the NVR is sending:

Looking at Credentials we get:
Lets also check if the URL is correct. The sent URL is
So the problem is the DuckDNS token. It's too long to be inputted into the web interface. I come from a datacenter background so my first instinct when I encounter an issue with the web interface is to use SSH. Unfortunately Dahua SSH is mostly useless.
While looking around this forum I saw someone reply to a problem with a http solution. Apparently you can use HTTP API to program Dahua. I searched around and found the Dahua HTTP API (Included below) and have my solution.
SOLUTION
We will use Dahua HTTP API to set the token password.
I am hiding my personal information in this post. DuckDNS token will be deleted after I post and I'm editing the IP Address in the picture. Let me know if I miss something
INTRODUCTION
Dahau comes with 4 DDNS options: Dahua own DDNS, NO-IP, CN99, DynDns.
- If you don't trust Chinese DDNS then that rules out Dahua and CN99.
- NO-IP has a free tier, which I've been using, but you need to verify each domain each month.
- DynDns is a paid service.
I have multiple Dahua NVRs so I want a free service with multiple DDNS domains that is set and forget. When searching for a free DDNS service I was recommended DuckDNS. DuckDNS even has a DynDns compatible endpoint.
Unfortunately when setting up my NVR according to DuckDNS instructions I could never get the DDNS domain to update.
DuckDNS instructions:

Dahua NVR:

After looking around on Google, I'm certain this is the correct setup. I was suspicious of the password as DuckDNS token is very long, maybe too long. I manually inputted the token into the password field and tried copy/paste but neither worked.
I tried looking around to get a shorter DuckDNS token but I don't think it's possible. Time to get more technical.
I enable port mirroring on my switch and breakout WireShark.
This is the capture on WireShark. We can see the NVR sending a DDNS update to DuckDNS.

Here is what the NVR is sending:

Looking at Credentials we get:
The correct Credentials according to DuckDNS isnouser:87e07ed6-0208-4d5e-88d1-4ea0514
So the username is correct but the password as I suspected is wrong because the token is too long.nouser:87e07ed6-0208-4d5e-88d1-4ea05149ad69
Lets also check if the URL is correct. The sent URL is
And the expected URL is
The URL is correct! The part after the IP Address can be ignored.
So the problem is the DuckDNS token. It's too long to be inputted into the web interface. I come from a datacenter background so my first instinct when I encounter an issue with the web interface is to use SSH. Unfortunately Dahua SSH is mostly useless.
While looking around this forum I saw someone reply to a problem with a http solution. Apparently you can use HTTP API to program Dahua. I searched around and found the Dahua HTTP API (Included below) and have my solution.
SOLUTION
We will use Dahua HTTP API to set the token password.
- First setup DynDns according to your DuckDNS
- Next verify your Dahua DDNS settings use the following link:
- Now we create the HTTP API
-
http://username:password@IP:PORT/cgi-bin/configManager.cgi?action=setConfig&DDNS[3].UserName=nouser&DDNS[3].Password=TOKEN
- username: Is your device login username
- password: Is your device login password
- IP: PORT: Is your device IP Address and Port Number
- TOKEN: Is your DuckDNS Token
- You should get an "OK" after you use the link.
-
- Check DuckDNS
Attachments
Last edited: