1. Caddy version (caddy version
):
2.2.1
2. How I run Caddy:
Running caddy via docker-compose in a debian VM (proxmox host environment)
a. System environment:
latest debian
docker version 19.03.13
b. Command:
docker-compose up -d
c. Service/unit/compose file:
full Dockerfile
FROM caddy:2.2.1-builder AS builder
RUN xcaddy build v2.2.1 --with github.com/caddy-dns/cloudflare@latest
FROM caddy:2.2.1
COPY --from=builder /usr/bin/caddy /usr/bin/caddy
full docker-compose.yml
version: "3.7"
services:
caddy:
build:
context: .
dockerfile: Dockerfile
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
environment:
- "CADDYPATH=/web/certs"
- CLOUDFARE_EMAIL=MY_EMAIL
- CLOUDFARE_API_TOKEN=MY_TOKEN
volumes:
- /web/Caddyfile:/etc/caddy/Caddyfile
- $HOME/.caddy:/web/certs
- /web/site:/srv
- /var/docks/caddy:/data
- /var/docks/caddy:/config
d. My complete Caddyfile or JSON config:
http://plex.greatwhitelab.net {
redir https://plex.greatwhitelab.net
}
https://plex.greatwhitelab.net {
tls MY_EMAIL {
dns cloudfare {env.CLOUDFLARE_API_TOKEN}
}
reverse_proxy 192.168.42.12:32400
encode gzip
}
3. The problem I’m having:
I think even though im building with xcaddy and specifying the cloudfare plugin that its somehow not loading? I have had so many issues at this point, I really want to love caddy but something about my specific situation is making things very difficult.
4. Error messages and/or full log output:
run: adapting config using caddyfile: parsing caddyfile tokens for ‘tls’: /etc/caddy/Caddyfile:17 - Error during parsing: getting DNS provider module named ‘cloudfare’: module not registered: dns.providers.cloudfare
5. What I already tried:
i have already made sure that I am using an API token (not KEY) and that I have Zone.DNS.edit permissions and Zone.Zone.read permissions for the token being used.
i have also verified that all my volumes are correctly being mounted to the docker container by using “docker inspect caddy”
i have no idea what the issue is at this point