Issue with cloudflare module and SSL verification

1. The problem I’m having:

I am unable to use cloudflare module DNS to verify SSL certificates
Note: The only way I am able to get ssl dockers working is if I use the directive tls_insecure_skip_verify which is what I am trying to avoid. Which in my case is the subdomains cloud (nextcloud) & sso (authentik)

2. Error messages and/or full log output:

Logs made the post too long so I used pastebin: Caddy Docker Logs

3. Caddy version:

v2.7.2 h1:QqThyoyUFAv1B7A2NMeaWlz7xmgKqU49PXBX08A+6xg=

4. How I installed and ran Caddy:

a. System environment:

Docker

b. Command:

sudo docker run -d --rm -it \
  --name caddy \
  -p 80:80 \
  -p 443:443 \
  -v caddy_data:/data \
  -v caddy_config:/config \
  -v /home/bender/caddy/Caddyfile:/etc/caddy/Caddyfile \
  -e CF_API_TOKEN=REDACTED \
  iarekylew00t/caddy-cloudflare:latest

c. Service/unit/compose file:

d. My complete Caddy config:

{
  debug
  acme_dns cloudflare {env.CF_API_TOKEN}
}

notes.alfredoautomation.com {
	reverse_proxy	10.0.0.96:5230
	redir	/auth	/explore
}

cloud.alfredoautomation.com {
        redir /.well-known/caldav /remote.php/dav 301
        redir /.well-known/carddav /remote.php/dav 301
	reverse_proxy	https://10.0.0.96:444
}

rss.alfredoautomation.com {
	reverse_proxy	10.0.0.96:8085
}

sso.alfredoautomation.com {
	reverse_proxy	https://10.0.0.96:9444 
}

photos.alfredoautomation.com {
	reverse_proxy	http://10.0.0.96:2283
}

food.alfredoautomation.com {
	reverse_proxy	10.0.0.96:4580
}

5. Links to relevant resources:

I think I figured out what I was doing wrong.

I changed nextcloud to run on port 80 instead of 443 and removed the tls skip verify and let caddy just auto https it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.