Maybe this’ll help a bit.
Caddy can help with this, but you have to configure your network correctly first. Are you running this at home or on a publicly-facing server?
You can continue to use that if you want, but you have to keep it renewed (and reload Caddy each time you renew it) and set up HTTP->HTTPS redirects by yourself, etc. If you let Caddy manage it for you, then it’s all automatic.
You’ll need to make a file called
Caddyfile and then put your sites in it, as shown by others above.
If you use your own certificate, you’ll use the
tls directive in the Caddyfile (as shown you) to tell Caddy where to load it from. If you want Caddy to manage free wildcard certificates for you, you will have to use the
tls directive a little differently to enable the DNS challenge. It’s easy though:
replacing “providername” with your DNS provider name from the second column of this table. Then just set the necessary environment variables with your credentials and you’re good to go!