I am trying to build caddy with the cloudflare DNS plugin. The build is failing.
2. Error messages and/or full log output:
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:386:9: invalid composite literal type libdns.Record
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:445:17: zrec.record.Type undefined (type libdns.Record has no field or method Type)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:449:45: zrec.record.Name undefined (type libdns.Record has no field or method Name)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:462:42: zrec.record.Type undefined (type libdns.Record has no field or method Type)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:463:45: zrec.record.Value undefined (type libdns.Record has no field or method Value)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:467:74: zrec.record.Value undefined (type libdns.Record has no field or method Value)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:469:116: zrec.record.Name undefined (type libdns.Record has no field or method Name)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:507:39: zrec.record.ID undefined (type libdns.Record has no field or method ID)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:508:41: zrec.record.Name undefined (type libdns.Record has no field or method Name)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:509:41: zrec.record.Type undefined (type libdns.Record has no field or method Type)
/home/proxybox/go/pkg/mod/github.com/caddyserver/certmagic@v0.21.6/solvers.go:509:41: too many errors
3. Caddy version:
This is not a Caddy issue, it is a Caddy build issue.
xcaddy v0.4.4
go 1.24.0
4. How I installed and ran Caddy:
a. System environment:
Debian linux, zsh, nothing else seems relevant.
b. Command:
go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
xcaddy build --with github.com/caddy-dns/cloudflare
Either use an older version of the cloduflare plugin (eg: --with github.com/caddy-dns/cloudflare@188b4850c0f2f5565a6310810c936ea960e2210f) or upgrade the certmagic and caddy components: