This link will probably be helpful in explaining how the automatic certificate provisioning works:
@Nixtren’s link will be useful if you’d like to modify the behaviour at all from defaults - tls directives are optional and Automatic HTTPS will work without them.
Great thanks for the support
One more thing please, regarding multi domains
I need to distinguish subscribed email address for LE certifications as admin@domainX.com and admin@domainY.com for relevant subdomains.
tls email
What’s the best approach to achieve that, should i proceed with running multi instances for Caddy i.e. multi CaddyFile?
Please advice.
You’ve got a bit of flexibility in your approach here. You can:
Have multiple instances of Caddy, each with its own Caddyfile
Have one instance of Caddy with multiple vhosts in a single Caddyfile
Have one instance of Caddy with an import statement in the Caddyfile and write vhost etc for each site
I use option 3. To Caddy itself, it works exactly like option 2 does, it just cats all the imported etc into one big Caddyfile. My main Caddyfile has import /path/to/vhosts/*.caddy and I name my vhost etc in the form of my.domain.com.caddy.