Can’t obtain lets encrypt certs with duckdns using docker compose caddy (unexpected response code 'SERVFAIL') #5007
-
I am trying to follow this guide and this guide in order to have a private vaultwarden instance that is only accessible from within my internal LAN, but I want to utilise HTTPS from lets encrypt. I chose these guides as apparently it's better to use a DNS challenge for this setup. I am running the following on a raspberry pi 4 on the latest kernel version. My router is a pfsense box that uses encrypted TLS quad9 as the DNS resolver. It also uses pfblocker but nothing comes up in the pfblocker logs when I try to obtain certs from lets encrypt using caddy. As far as I’m aware no outbound traffic is being blocked in pfsense. Here is my directory and the necessary files: The caddy binary was obtained from this link where I selected Linux arm64 and chose the duckdns download. I then renamed it to caddy. I also ran the file command on the caddy binary and it gives the following output:
The Caddyfile contains the following:
The docker compose file contains the following:
I pulled the docker images and ran the containers. I then looked at the caddy docker logs:
There are a few errors. I have tried the following: Ensuring the raspberry pi firewall is allowing the required ports:
Ensuring the Caddyfile and caddy binary exist within the caddy container:
Ensuring the caddy container environment variables are set:
Pinged acme-v02.api.letsencrypt.org within the caddy container and raspberry pi host:
Checked the duckdns api is working from the raspberry pi host:
Other than that I have no idea why I’m getting the errors in the caddy docker log files. I also can’t access my vault warden instance with test111.duckdns.org. If I un-comment the port setting for vaultwarden in the compose file I can access http unencrypted vaultwarden with the private IP address followed by the port. I did read some similar questions where the solution was to change the DNS resolver but I really want to avoid that as I wish to stick with quad9. EDIT: To add I also tried running the Linux arm7 32 bit custom caddy binary and got the following errors:
EDIT 2: After leaving it for over a month I'm now getting no errors, but I still cannot access vaultwarden from my duck dns domain:
Also if I use nslookup to resolve my duck dns domain I get the following back:
Any help is appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
It turns out you have to add a host override to Pfsenses DNS resolver settings so it can map your subdomain to a private IP on your LAN. With this I'm able to resolve my subdomain and also being able to load the vault warden webpage with the duckdns subdomain over SSL. |
Beta Was this translation helpful? Give feedback.
It turns out you have to add a host override to Pfsenses DNS resolver settings so it can map your subdomain to a private IP on your LAN. With this I'm able to resolve my subdomain and also being able to load the vault warden webpage with the duckdns subdomain over SSL.