TIL: Caddy

TIL: Caddy

I used to use Nginx to proxy requests and set up SSL. It's not super hard, but the config is a screenfull.

Enter Caddy. Install it. Put the following in /etc/caddy/Caddyfile:

DOMAIN.NAME {
        reverse_proxy localhost:8000
}

Restart the systemd service. And voila, you have an HTTP proxy for your API, with an HTTPS certificate obtained automatically from Let's Encrypt.

Some things do get easier in computing.... My only complaint would be that the docs were a bit confusing for me with regards to systemd vs direct running of Caddy, hence this post.