The documentation has a common pattern example for wildcard setup which should be spot on for your case: https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates
Also, a public facing web server is almost always a bad idea since although your reverse proxy might be secure, you must also harden any upstream application you expose through it.
I would prefer to setup a VPN to access my websites remotely.
The documentation has a common pattern example for wildcard setup which should be spot on for your case: https://caddyserver.com/docs/caddyfile/patterns#wildcard-certificates
Also, a public facing web server is almost always a bad idea since although your reverse proxy might be secure, you must also harden any upstream application you expose through it.
I would prefer to setup a VPN to access my websites remotely.