No way to get SSL DuckDNS

1. The problem I’m having:

Hello Experts!
I use reverse Proxy to get HTTPS from duckdns subdomain to my local servers.
caddy+duckDns did run smoothly on W11 for a while now, but it suddenly stop working some days ago.

I don’t know what I’m supposed to do to make it work again:

  • tried multiple time renewing certificate: KO
  • tried with deactivated firewall: KO
  • updated to last caddy version 2.7.6 +duckdns 0.4.0: KO
  • cleaned everything a restarted from scratch: KO
  • renewed my duckdns token: KO

I’m somehow out of option and miss network basic knowledge to figure it out what’s going on without your guidance. Thanks a lot for your help!

2. Error messages and/or full log output:

2024/03/21 23:35:08.453 INFO    using adjacent Caddyfile
2024/03/21 23:35:08.462 INFO    admin   admin endpoint started  {"address": "localhost:2019", "enforce_origin": false, "origins": ["//localhost:2019", "//[::1]:2019", "//"]}
2024/03/21 23:35:08.462 INFO    tls.cache.maintenance   started background certificate maintenance      {"cache": "0xc00040a100"}
2024/03/21 23:35:08.462 INFO    http.auto_https server is listening only on the HTTPS port but has no TLS connection policies; adding one to enable TLS   {"server_name": "srv0", "https_port": 443}
2024/03/21 23:35:08.462 INFO    http.auto_https enabling automatic HTTP->HTTPS redirects        {"server_name": "srv0"}
2024/03/21 23:35:08.462 DEBUG   http.auto_https adjusted config {"tls": {"automation":{"policies":[{"subjects":[""]},{}]}}, "http": {"servers":{"remaining_auto_https_redirects":{"listen":[":80"],"routes":[{},{}]},"srv0":{"listen":[":443"],"routes":[{"handle":[{"handler":"subroute","routes":[{"handle":[{"handler":"reverse_proxy","upstreams":[{"dial":""}]}]}]}],"terminal":true}],"tls_connection_policies":[{}],"automatic_https":{}}}}}
2024/03/21 23:35:08.462 INFO    http    enabling HTTP/3 listener        {"addr": ":443"}
2024/03/21 23:35:08.463 DEBUG   http    starting server loop    {"address": "[::]:443", "tls": true, "http3": true}
2024/03/21 23:35:08.463 INFO    http.log        server running  {"name": "srv0", "protocols": ["h1", "h2", "h3"]}
2024/03/21 23:35:08.463 DEBUG   http    starting server loop    {"address": "[::]:80", "tls": false, "http3": false}
2024/03/21 23:35:08.463 INFO    http.log        server running  {"name": "remaining_auto_https_redirects", "protocols": ["h1", "h2", "h3"]}
2024/03/21 23:35:08.463 INFO    http    enabling automatic TLS certificate management   {"domains": [""]}
2024/03/21 23:35:08.463 INFO    autosaved config (load with --resume flag)      {"file": "C:\\Users\\myself\\AppData\\Roaming\\Caddy\\autosave.json"}
2024/03/21 23:35:08.463 INFO    serving initial configuration
2024/03/21 23:35:08.463 WARN    tls     storage cleaning happened too recently; skipping for now        {"storage": "FileStorage:C:\\Users\\myself\\AppData\\Roaming\\Caddy", "instance": "4980a706-1e0b-4e3c-8848-d9811afd8c28", "try_again": "2024/03/22 23:35:08.463", "try_again_in": 86400}
2024/03/21 23:35:08.463 INFO    tls     finished cleaning storage units
2024/03/21 23:35:08.463 INFO    tls.obtain      acquiring lock  {"identifier": ""}
2024/03/21 23:35:08.463 INFO    tls.obtain      lock acquired   {"identifier": ""}
2024/03/21 23:35:08.463 INFO    tls.obtain      obtaining certificate   {"identifier": ""}
2024/03/21 23:35:08.463 DEBUG   events  event   {"name": "cert_obtaining", "id": "4a5e2dbf-9532-4a43-8284-c10a1dac0b4d", "origin": "tls", "data": {"identifier":""}}
2024/03/21 23:35:08.473 DEBUG   tls.obtain      trying issuer 1/2       {"issuer": ""}
2024/03/21 23:35:08.473 INFO    tls.issuance.acme       waiting on internal rate limiter        {"identifiers": [""], "ca": "", "account": ""}
2024/03/21 23:35:08.473 INFO    tls.issuance.acme       done waiting on internal rate limiter   {"identifiers": [""], "ca": "", "account": ""}
2024/03/21 23:35:08.986 DEBUG   tls.issuance.acme.acme_client   http request    {"method": "GET", "url": "", "headers": {"User-Agent":["Caddy/2.7.6 CertMagic acmez (windows; amd64)"]}, "response_headers": {"Cache-Control":["public, max-age=0, no-cache"],"Content-Length":["752"],"Content-Type":["application/json"],"Date":["Thu, 21 Mar 2024 23:35:08 GMT"],"Server":["nginx"],"Strict-Transport-Security":["max-age=604800"],"X-Frame-Options":["DENY"]}, "status_code": 200}
2024/03/21 23:35:09.136 DEBUG   tls.issuance.acme.acme_client   http request    {"method": "HEAD", "url": "", "headers": {"User-Agent":["Caddy/2.7.6 CertMagic acmez (windows; amd64)"]}, "response_headers": {"Cache-Control":["public, max-age=0, no-cache"],"Date":["Thu, 21 Mar 2024 23:35:08 GMT"],"Link":["<>;rel=\"index\""],"Replay-Nonce":["m9Z1lv7vN_bFofkIUbkBAecy3mViL-zRvxqkT3kYM1CTOoqgIO0"],"Server":["nginx"],"Strict-Transport-Security":["max-age=604800"],"X-Frame-Options":["DENY"]}, "status_code": 200}
2024/03/21 23:35:09.324 DEBUG   tls.issuance.acme.acme_client   http request    {"method": "POST", "url": "", "headers": {"Content-Type":["application/jose+json"],"User-Agent":["Caddy/2.7.6 CertMagic acmez (windows; amd64)"]}, "response_headers": {"Boulder-Requester":["1630967757"],"Cache-Control":["public, max-age=0, no-cache"],"Content-Length":["352"],"Content-Type":["application/json"],"Date":["Thu, 21 Mar 2024 23:35:08 GMT"],"Link":["<>;rel=\"index\""],"Location":[""],"Replay-Nonce":["Wej4SY7DGrm6NKF8V2eVnLnhoOoE7msB7cxgjiurAjtDuEKgDN8"],"Server":["nginx"],"Strict-Transport-Security":["max-age=604800"],"X-Frame-Options":["DENY"]}, "status_code": 201}
2024/03/21 23:35:09.497 DEBUG   tls.issuance.acme.acme_client   http request    {"method": "POST", "url": "", "headers": {"Content-Type":["application/jose+json"],"User-Agent":["Caddy/2.7.6 CertMagic acmez (windows; amd64)"]}, "response_headers": {"Boulder-Requester":["1630967757"],"Cache-Control":["public, max-age=0, no-cache"],"Content-Length":["810"],"Content-Type":["application/json"],"Date":["Thu, 21 Mar 2024 23:35:08 GMT"],"Link":["<>;rel=\"index\""],"Replay-Nonce":["m9Z1lv7vqb0uIzbxEj29Ote3KPhvif9CfzylKHYl2c0VQPSoGWk"],"Server":["nginx"],"Strict-Transport-Security":["max-age=604800"],"X-Frame-Options":["DENY"]}, "status_code": 200}
2024/03/21 23:35:09.499 DEBUG   tls.issuance.acme.acme_client   no solver configured    {"challenge_type": "tls-alpn-01"}
2024/03/21 23:35:09.500 INFO    tls.issuance.acme.acme_client   trying to solve challenge       {"identifier": "", "challenge_type": "dns-01", "ca": ""}
2024/03/21 23:35:11.779 ERROR   tls.issuance.acme.acme_client   cleaning up solver      {"identifier": "", "challenge_type": "dns-01", "error": "no memory of presenting a DNS record for \"\" (usually OK if presenting also failed)"}
2024/03/21 23:35:11.942 DEBUG   tls.issuance.acme.acme_client   http request    {"method": "POST", "url": "", "headers": {"Content-Type":["application/jose+json"],"User-Agent":["Caddy/2.7.6 CertMagic acmez (windows; amd64)"]}, "response_headers": {"Boulder-Requester":["1630967757"],"Cache-Control":["public, max-age=0, no-cache"],"Content-Length":["814"],"Content-Type":["application/json"],"Date":["Thu, 21 Mar 2024 23:35:11 GMT"],"Link":["<>;rel=\"index\""],"Replay-Nonce":["m9Z1lv7v_n8QbV-MTYvTd56YXfZLLIIxxd5zafeKrhjGDySzD1M"],"Server":["nginx"],"Strict-Transport-Security":["max-age=604800"],"X-Frame-Options":["DENY"]}, "status_code": 200}
2024/03/21 23:35:11.946 ERROR   tls.obtain      could not get certificate from issuer   {"identifier": "", "issuer": "", "error": "[] solving challenges: presenting for challenge: adding temporary record for zone \"\": DuckDNS request failed, expected (OK) but got (KO), url: [], body: KO (order= (ca="}

3. Caddy version:

Now under:
caddy version 2.7.6 + duckdns 0.4.0

4. How I installed and ran Caddy:

I downloaded windows amd64 version from
Download Caddy

a. System environment:

Windows 11 Family 23H2

b. Command:

simply execute from cmd:
caddy_windows_amd64_custom.exe run

c. Service/unit/compose file:

d. My complete Caddy config:

} {
	tls {
		dns duckdns {env.MyToken0-0000-0000-0000-MyTokenEndSt}

5. Links to relevant resources:

Not sure if this will help, but here are a few links that may have helpful information

  1. DNS Challenge with DuckDNS
  2. Automatic HTTPS — Caddy Documentation
  3. GitHub - caddy-dns/duckdns: Caddy module: dns.providers.duckdns
  4. Renewing certificate - Help - Let's Encrypt Community Support
  5. Troubles with DNS-01 challenge using DuckDNS
1 Like

That looks weird. If you’re using {env.*}, this is a placeholder to be replaced with an environment variable. If you’re not using environment variables, your actual token should appear after dns duckdns with no additional formatting.


Thanks for your answer, I appreciate.
I did remove the “env.” (while keeping curly brackets), but it unfortunately did not change a thing.

Tanks to Francis (for pointing out the env.) and Bruce forcing me to RTFM,
I managed to make it work by removing brackets and inverting tls auth. (not sure the last point changed something): {
	tls {
		dns duckdns MyToken0-0000-0000-0000-MyTokenEndSt

Now challenge is accepted.
Thank you guys!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.