DuckDNS problem Incorrect TXT record

I recently moved to a new Pi, and everything was working fine (including DuckDNS). Now, I have a problem with the LetsEncript challenge. As the original domain was not correct I an trying to use a new one but it still does not work. I have the port forwarding pointing to the new pi (8123, 443 and 80).

 + Signing domains...
 + Generating private key...
 + Generating signing request...
 + Requesting new certificate order from CA...
 + Received 2 authorizations URLs from the CA
 + Handling authorization for YYYY.duckdns.org
 + Found valid authorization for YYYY.duckdns.org
 + Handling authorization for XXXX.duckdns.org
 + 1 pending challenge(s)
 + Deploying challenge tokens...
OK + Responding to challenge for XXXX.duckdns.org authorization...
 + Cleaning challenge tokens...
OK + Challenge validation has failed :(
ERROR: Challenge is invalid! (returned: invalid) (result: ["type"]	"dns-01"
["url"]	"https://acme-v02.api.letsencrypt.org/acme/chall-v3/431967910177/OLosIg"
["status"]	"invalid"
["validated"]	"2024-11-18T14:56:43Z"
["error","type"]	"urn:ietf:params:acme:error:unauthorized"
["error","detail"]	"Incorrect TXT record \"\" found at _acme-challenge.XXXX.duckdns.org"
["error","status"]	403
["error"]	{"type":"urn:ietf:params:acme:error:unauthorized","detail":"Incorrect TXT record \"\" found at _acme-challenge.XXXX.duckdns.org","status":403}
["token"]	"kVcZqL9AD1Dz_B7V2Cht33CoblbmTO-QneBXGUZ7Q4Y")

It works with the internal URL.

You are using DNS challenges, so what portforwarding you have set up is not important.
The important part is that your system can update the DNS record for that domain.

OK, it’s DuckDNS and seems the whole point is you can update the DNS easily. Any idea how I can fix this?

You need to figure out how it should be set up.
I do not use DuckDNS and it is a special setup for DuckDNS, because it is a subdomain you make a certificate for, so I do simply not know.

OK, thanks, got the key working but still getting time out on domain, will post another message as initial problem is sorted.