1. Caddy version (caddy version
): 2.4.6
2. How I run Caddy:
# desired Caddy version
ARG VERSION=2.4.6
###########
# builder #
FROM caddy:${VERSION}-builder-alpine AS builder
ARG VERSION
RUN xcaddy build v${VERSION} \
--with github.com/caddy-dns/cloudflare
#########
# image #
FROM caddy:${VERSION}-alpine
COPY --from=builder /usr/bin/caddy /usr/bin/caddy%
a. System environment:
OS Information linux x86_64 Slackware 14.2 x86_64 (post 14.2 -current)
Kernel Version 5.10.28-Unraid
Total CPU 16
Total memory 16.8 GB
Version 20.10.5 (API: 1.41)
Root directory /var/lib/docker
Storage Driver btrfs
Logging Driver json-file
Volume Plugins local
Network Plugins bridge, host, ipvlan, macvlan, null, overlay
b. Command:
caddy reload --config /etc/caddy/Caddyfile
c. Service/unit/compose file:
version: '3.9'
services:
caddy:
image: erfianugrah/caddy-cfdns:v1.2-2.4.6
hostname: caddy
container_name: caddy
restart: unless-stopped
network_mode: host
privileged: true
volumes:
- /mnt/user/data/caddy/Caddyfile:/etc/caddy/Caddyfile
- /mnt/user/data/caddy/site:/srv
- /mnt/user/data/caddy/data:/data
- /mnt/user/data/caddy/config:/config
environment:
- TZ=Asia/Singapore
- CF_API_TOKEN=${CF_API_TOKEN}
- EMAIL=${EMAIL}
Paste full file contents here.
Make sure backticks stay on their own lines,
and the post looks nice in the preview pane.
d. My complete Caddyfile or JSON config:
{
email {env.EMAIL}
acme_dns cloudflare {env.CF_API_TOKEN}
cert_issuer acme
http_port 80
https_port 443
admin localhost:2019
debug
log {
level debug
output file /var/log/access.log {
roll_size 1gb
roll_keep 5
roll_keep_for 720h
}
}
servers {
protocol {
strict_sni_host
}
}
}
erfianugrah.com {
reverse_proxy 172.18.0.2:2368
}
port.erfianugrah.com {
reverse_proxy 172.17.0.3:9000
}
servarr.erfianugrah.com {
reverse_proxy localhost:88
}
plex.erfianugrah.com {
reverse_proxy 172.19.0.8:32400
}
hydra.erfianugrah.com {
reverse_proxy 172.19.0.7:5076
}
nzb.erfianugrah.com {
reverse_proxy 172.19.0.6:7000
}
sonarr.erfianugrah.com {
reverse_proxy 172.19.0.3:8989
}
radarr.erfianugrah.com {
reverse_proxy 172.19.0.2:7878
}
bazarr.erfianugrah.com {
reverse_proxy 172.19.0.4:6767
}
lidarr.erfianugrah.com {
reverse_proxy 172.19.0.5:8686
}
nextcloud.erfianugrah.com {
reverse_proxy 172.21.0.2:80
}
grafana-unraid.erfianugrah.com {
reverse_proxy 172.17.0.2:3000
}
prom-unraid.erfianugrah.com {
reverse_proxy 172.17.0.4:9090
}
3. The problem I’m having:
The reload hangs
4. Error messages and/or full log output:
Okay I’m a total noob, I don’t know where the debug logs are stored, but access logs yes
5. What I already tried:
So it works sometimes but not every time especially if I build the image with the DNS plugin