1. Caddy version (caddy version
):
v2.3.0 h1:fnrqJLa3G5vfxcxmOH/+kJOcunPLhSBnjgIvjXV/QTA=
2. How I run Caddy:
a. System environment:
Ubuntu 20.04
b. Command:
xcaddy build master --with github.com/caddy-dns/cloudflare@latest
sudo systemctl restart caddy
c. Service/unit/compose file:
n/a
d. My complete Caddyfile:
{
debug
}
darrenter.cyou, *.darrenter.cyou {
root * /var/www/html/darrenter.cyou
# Enable the static file server.
file_server
# Compress Response
encode gzip
log {
output file /var/log/caddy/darrenter.cyou.access.log {
roll_size 1gb
roll_keep 1000
roll_keep_for 2880h
}
}
tls {
dns cloudflare [REDACTED]
}
}
3. The problem I’m having:
I have installed the cloudflare module via
xcaddy build master --with github.com/caddy-dns/cloudflare@latest
View the result of command here
but the dns.providers.cloudflare doesn’t listed inside caddy list-modules
Full List of my list-modules
admin.api.load
admin.api.metrics
caddy.adapters.caddyfile
caddy.listeners.tls
caddy.logging.encoders.console
caddy.logging.encoders.filter
caddy.logging.encoders.filter.delete
caddy.logging.encoders.filter.ip_mask
caddy.logging.encoders.json
caddy.logging.encoders.logfmt
caddy.logging.encoders.single_field
caddy.logging.writers.discard
caddy.logging.writers.file
caddy.logging.writers.net
caddy.logging.writers.stderr
caddy.logging.writers.stdout
caddy.storage.file_system
http
http.authentication.hashes.bcrypt
http.authentication.hashes.scrypt
http.authentication.providers.http_basic
http.encoders.gzip
http.encoders.zstd
http.handlers.acme_server
http.handlers.authentication
http.handlers.encode
http.handlers.error
http.handlers.file_server
http.handlers.headers
http.handlers.map
http.handlers.metrics
http.handlers.push
http.handlers.request_body
http.handlers.reverse_proxy
http.handlers.rewrite
http.handlers.static_response
http.handlers.subroute
http.handlers.templates
http.handlers.vars
http.matchers.expression
http.matchers.file
http.matchers.header
http.matchers.header_regexp
http.matchers.host
http.matchers.method
http.matchers.not
http.matchers.path
http.matchers.path_regexp
http.matchers.protocol
http.matchers.query
http.matchers.remote_ip
http.matchers.vars
http.matchers.vars_regexp
http.reverse_proxy.selection_policies.cookie
http.reverse_proxy.selection_policies.first
http.reverse_proxy.selection_policies.header
http.reverse_proxy.selection_policies.ip_hash
http.reverse_proxy.selection_policies.least_conn
http.reverse_proxy.selection_policies.random
http.reverse_proxy.selection_policies.random_choose
http.reverse_proxy.selection_policies.round_robin
http.reverse_proxy.selection_policies.uri_hash
http.reverse_proxy.transport.fastcgi
http.reverse_proxy.transport.http
pki
tls
tls.certificates.automate
tls.certificates.load_files
tls.certificates.load_folders
tls.certificates.load_pem
tls.handshake_match.sni
tls.issuance.acme
tls.issuance.internal
tls.issuance.zerossl
tls.stek.distributed
tls.stek.standard
For references, my DNS record configured to be:
A darrenter.cyou {my server ip} DNS only
A * {my server ip} DNS only
4. Error messages and/or full log output:
parsing caddyfile tokens for 'tls': /etc/caddy/Caddyfile:33 - Error during parsing: getting DNS provider module named 'cloudflare': module not registered: dns.providers.cloudflare
5. What I already tried:
I saw similar issue in repo of cloudflare module, the maintainer suggest to build the xcaddy with tagged release.
So I run
xcaddy build v2.2.0-rc.1 --with github.com/caddy-dns/cloudflare@latest
Instead of:
xcaddy build --with github.com/caddy-dns/cloudflare
But I still doesn’t saw cloudflare module in list-modules
Another thing I notice with this issue is, when I run xcaddy
in terminal, error message occur:
go list -m: not using modules
2021/03/31 03:18:50 [ERROR] exec [go list -m]: exit status 1:
Not sure whether it cause the issue I face now.