1. Caddy version:
v2.6.2
compose:
name: caddy
services:
caddy:
container_name: caddy
environment:
DOMAIN: domain.duckdns.org
DUCKDNS_TOKEN: token
EMAIL: mymail@mail.com
LOG_FILE: /data/access.log
image: caddy
networks:
default: null
ports:
- mode: ingress
target: 80
published: "91480"
protocol: tcp
- mode: ingress
target: 443
published: "99443"
protocol: tcp
restart: always
volumes:
- type: bind
source: /mnt/path/to/caddy/Caddyfile
target: /etc/caddy/Caddyfile
read_only: true
bind:
create_host_path: true
- type: bind
source: /mnt/path/to/caddy/caddy-config
target: /config
bind:
create_host_path: true
- type: bind
source: /mnt/path/to/caddy/caddy-data
target: /data
bind:
create_host_path: true
networks:
default:
name: caddy_default
2. How I installed, and run Caddy:
Docker compose via Portainer
a. System environment:
Portainer running on TrueNAS Scale using the latest docker for Debian.
b. Command:
Compose
d. My complete Caddy config:
{$DOMAIN}:443 {
log {
level INFO
output file {$LOG_FILE} {
roll_size 10MB
roll_keep 10
}
}
# Use the ACME DNS-01 challenge to get a cert for the configured domain.
tls {
dns duckdns {$DUCKDNS_TOKEN}
}
# This setting may have compatibility issues with some browsers
# (e.g., attachment downloading on Firefox). Try disabling this
# if you encounter issues.
encode gzip
# Notifications redirected to the WebSocket server
reverse_proxy /notifications/hub vaultwarden:3012
# Proxy everything else to Rocket
reverse_proxy vaultwarden:80
}
3. The problem I’m having:
Can’t seem to use DuckDNS, and found no guide on how to use DuckDNS with Docker Caddy.
4. Error messages and/or full log output:
INF ts=1674810469.9022279 msg=using provided configuration config_file=/etc/caddy/Caddyfile config_adapter=caddyfile
Error: adapting config using caddyfile: parsing caddyfile tokens for 'tls': /etc/caddy/Caddyfile:12 - Error during parsing: getting module named 'dns.providers.duckdns': module not registered: dns.providers.duckdns
5. What I already tried:
Tried looking on this forum and other sources for a guide on how to do this.