Caddy 2 in VM. Cloudflare SSL handshake error 525

1. Caddy version (caddy version): 2.4.3

2. How I run Caddy:

a. System environment:

Ubuntu-20.04.2 Server. Running as a VM on Proxmox VE. Proxmox installed on Intel NUC

b. Command:

systemctl start caddy

c. Service/unit/compose file:

N/A

d. My complete Caddyfile or JSON config:

# The Caddyfile is an easy way to configure your Caddy web server.
#
# Unless the file starts with a global options block, the first
# uncommented line is always the address of your site.
#
# To use your own domain name (with automatic HTTPS), first make
# sure your domain's A/AAAA DNS records are properly pointed to
# this machine's public IP, then replace ":80" below with your
# domain name.

#:80 {
	# Set this path to your site's directory.
#	root * /usr/share/caddy

	# Enable the static file server.
#	file_server

	# Another common task is to set up a reverse proxy:
	# reverse_proxy localhost:8080

	# Or serve a PHP site through php-fpm:
	# php_fastcgi localhost:9000
#}

# Refer to the Caddy docs for more information:
# https://caddyserver.com/docs/caddyfile

portainer.mydomain.com.au {
	reverse_proxy 192.168.1.156:9000
}

hass.mydomain.com.au {
	reverse_proxy 192.168.1.156:8123
}

3. The problem I’m having:

I have been building a homelab with the intention of running home assistant behind a reverse proxy.
I had Caddy 2 installed and working with the above caddyfile when I had Linux Mint installed on the bare metal.

I have since decided that I want to use home assistant OS instead of the docker container. For ease of versioning I decided to go with a proxmox VM.

I currently have 2 VMs. A Home assistant OS instance that is set up and working correctly, and a second Ubuntu server VM.

I set up caddy 2 on the ubuntu VM in the exact same manner as I did originally with the linux mint install. With the same caddy file. However, when I access hass.mydomain.com.au or portainer.mydomain.com.au I am getting a cloudflare SSL handshake failed 525 error.

4. Error messages and/or full log output:

5. What I already tried:

It is perplexing as when I swap out the SSD in the NUC back to the one that has the linux mint install, everything works perfectly.

I am at a loss as to what to do next to get caddy working in the VM.

6. Links to relevant resources:

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