News for hackers. Stuff that matters.
Re:Show HN: Caddy 2 by nklmilojevic on Monday May 04, 2020 @03:19PM (#23072154)
Hi @mholt, thanks a lot for Caddy. It is really awesome and we are considering using it for www.mailerlite.com landing pages. The problem that we have right now is that there is no Cloudflare plugin built-in for V2 so it is a show stopper for us.

Congrats on the release!

Re:Show HN: Caddy 2 by mholt on Monday May 04, 2020 @03:25PM (#23072228)
Cloudflare plugin, that does what exactly?

You mean like this one? https://github.com/caddy-dns/cloudflare

(I'm using it today, works great. Assuming that's what you meant.)

Re:Show HN: Caddy 2 by jlelse on Monday May 04, 2020 @04:14PM (#23072734)
How to use this plugin with a Caddyfile?
Re:Show HN: Caddy 2 by mholt on Monday May 04, 2020 @04:16PM (#23072759)

    tls {
        dns cloudflare <api_token>
    }
Replace <api_token> with your API token, or you can store it in an env variable and use {env.CLOUDFLARE_API_TOKEN} for example.
Re:Show HN: Caddy 2 by nklmilojevic on Monday May 04, 2020 @04:21PM (#23072804)
That's what I already tried and got:

Error during parsing: getting DNS provider module named 'cloudflare': module not registered: tls.dns.cloudflare

Using latest docker image.

Re:Show HN: Caddy 2 by mholt on Monday May 04, 2020 @04:28PM (#23072881)
"Latest", as in "1 hour ago" latest, or "15 minutes ago" latest? Because the 2.0 image (not RCs) is needed and I think it only got published a few minutes ago.

Edit: You also need to plug it in.

    xcaddy build --with github.com/caddy-dns/cloudflare
Re:Show HN: Caddy 2 by nklmilojevic on Monday May 04, 2020 @04:34PM (#23072940)
I have just tried again, used caddy:latest and got the same error. Didn't mean to take much of your time, I can open up a GitHub issue if it's the better way to resolve this.

EDIT: I have just seen your edit. Will try and report back.

Thanks for your time!

Re:Show HN: Caddy 2 by francislavoie on Monday May 04, 2020 @04:40PM (#23072997)
Make sure to run "docker pull caddy"!

Also, see the docs on docker hub: https://hub.docker.com/_/caddy/

You'll need to build Caddy with the builder image to add the DNS plugin, see the section titled "Adding custom Caddy modules".

Re:Show HN: Caddy 2 by nklmilojevic on Monday May 04, 2020 @04:45PM (#23073045)
Yes, it works like this, thanks @mholt and @francislavoie for the help. I thought it was baked into caddy already. :-)
Re:Show HN: Caddy 2 by jlelse on Monday May 04, 2020 @04:20PM (#23072795)
Thanks!