No response for "curl localhost" with fresh caddy installation

Yep, that’s expected.

Now the error you’re seeing is because Caddy failed to install the root certificate in your system’s trust store. When running with localhost, Caddy will attempt to set up its own certificate authority such that you can test things out locally with HTTPS.

You can see where this went wrong in your logs (which are unfortunately truncated):

I think this is because Caddy is running as the caddy user as per your service file, and that user doesn’t have permission to add something to the trust store. Therefore since the root certificate isn’t trusted, curl gives an error that it “failed to verify the legitimacy of the server”.

I’m not sure of the best way to work around that issue right now - I’ll need to get back to you on that.

Anyways this issue only applies if you’re setting up local HTTPS, and not if you try to run your site with a real domain (strongly recommended) or with HTTP (i.e. only port 80).