Caddy is an open-source web server and reverses proxy, written in Go. It is the only webserver to use HTTPS automatically and by default, which means that Caddy obtains and renews TLS certificates for all your sites. The Caddyfile makes it easy to configure manually, while its powerful API makes configuration highly dynamic and programmable.
After your VM is created, you can visit its IP address in your browser, where you will see a welcome page that will guide you to a functional site:
1- Point your domain’s A/AAAA records at your VM’s IP address(es).
2- Upload your site’s files to
3- Edit your Caddyfile at
:80 with your domain name
b- Change the site root to
4- Reload the configuration:
systemctl reload caddy
That’s all there is to it! Caddy does the rest. It will keep your certificates renewed while it serves your sites, and it even redirects HTTP requests to HTTPS.
To make sure it worked, simply visit your site in your browser by using your domain name! Note that it may take up to a minute for Caddy to obtain a TLS certificate. If there were any problems, the welcome page has some suggestions. Usually, errors on the first run are related to improper DNS configuration, slow DNS propagation, or misconfigured ports/firewalls.
You can additionally set up more features in the Caddyfile such as compression, reverse proxying, template evaluation, and much more. It also has an API if you want to programmatically manage its configuration.