There have been multiple accounts created with the sole purpose of posting advertisement posts or replies containing unsolicited advertising.

Accounts which solely post advertisements, or persistently post them may be terminated.

Caddy with Cloudflare DNS fails to solve acme challenge

Hello, I am a pretty new beginner to website stuff and was trying to get my personal website to run on my VPS. The website’s DNS is Cloudflare and I am trying to get it to work using Caddy. I’ve been trying to get past the acme challenge solving thing, but always get this error message:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">ERROR   tls.obtain      could not get certificate from issuer   {"identifier": "asudox.dev", "issuer": "acme-v02.api.letsencrypt.org-directory", "error": "[asudox.dev] solving challenges: waiting for solver certmagic.solverWrapper to be ready: timed out waiting for record to fully propagate; verify DNS provider configuration is correct - last error: <nil> (order=https://acme-staging-v02.api.letsencrypt.org/acme/order/111399894/9853568284) (ca=https://acme-staging-v02.api.letsencrypt.org/directory)"}
</span>

As much as I’ve seen from the Cloudflare dashboard, the acme challenge record gets created. What is the problem? I also tried to change the resolver to Cloudflare’s as it is a troubleshooting step in the Cloudflare Caddy module github page, but that also did not work.

Here’s the Caddyfile:

<pre style="background-color:#ffffff;">
<span style="color:#323232;">asudox.dev {
</span><span style="color:#323232;">        respond "Test"
</span><span style="color:#323232;">        tls {
</span><span style="color:#323232;">                dns cloudflare {env.CF_API_TOKEN}
</span><span style="color:#323232;">        }
</span><span style="color:#323232;">}
</span>
AndyM ,

Try adding

<pre style="background-color:#ffffff;">
<span style="color:#323232;">resolvers 1.1.1.1
</span>

in the tls block below dns cloudflare

Asudox OP ,
@Asudox@lemmy.world avatar

As mentioned, I’ve already tried that.

silver ,

It’s been a while since I use caddy but I use the dns for nginx, make sure you are using the correct api key, it does not like using a too permissive one.
So a zone token instead of an account token.

Asudox OP ,
@Asudox@lemmy.world avatar

Already done that. The permissions of the API are Zone:Read & DNS:Edit That was what was stated in the Caddy github page.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • [email protected]
  • random
  • lifeLocal
  • goranko
  • All magazines