Closed Nojwe closed 9 months ago
I'm not familiar with many caddy features/directives. Can you please share what the Caddyfile should look like for DNS configs?
DuckDNS is just used for a DNS challenge to get a valid cert. I’m not exposing any services. This is how I had the Caddyfile set up before:
{
acme_dns duckdns 123456789
}
@radarr host
handle @radarr {
reverse_proxy 192.168.12.110:7878
}
Your labels for global settings looks good:
caddy.acme_dns: duckdns 123456789
will generate:
{
acme_dns duckdns 123456789
}
But then the dns directive you added to your website is not supported, that's what the error message is about.
home.domain.duckdns.org {
dns {
ca https://acme-staging-v02.api.letsencrypt.org/directory
}
reverse_proxy 172.12.12.5:3000
}
Are you sure a dns directive should be allowed inside a website?
Found this: https://caddyserver.com/docs/caddyfile/directives/tls It is possible to configure a CA inside a TLS directive. Like:
home.domain.duckdns.org {
tls {
ca https://acme-staging-v02.api.letsencrypt.org/directory
}
reverse_proxy 172.12.12.5:3000
}
So, your label should be:
caddy.tls.ca: https://acme-staging-v02.api.letsencrypt.org/directory
Instead of:
caddy.dns.ca: https://acme-staging-v02.api.letsencrypt.org/directory
Thanks, that sorted it.
Caddy image has been build with Docker Proxy and DuckDNS module. Docker compose:
Docker compose for service I’m trying to proxy:
Every time I start up Caddy and Homepage, I get the following message repeated until I stop Caddy:
level":"info","ts":1703621001.5702834,"logger":"docker-proxy","msg":"Process Caddyfile","logs":"[ERROR] Removing invalid block: Caddyfile:2: unrecognized directive: dns\nhome.domain.duckdns.org {\n\tdns {\n\t\tca https://acme-staging-v02.api.letsencrypt.org/directory\n\t}\n\treverse_proxy 172.12.12.5:3000\n}\n\n"}
That seems to point to something being incorrect in the labels I’m using, but I can’t find it. I do not have any additional configs in my Caddyfile at this time.