I've been using caddy as a web server and reverse proxy for a few years and am generally happy with it, though the process of installing it is never simple. As I write this, I am moving my web server/rprox to a new box, so I'm going to document it for the next time I do it. I'll probably be using caddy2 at that point, and none of this will be relevant.
I keep a ~/caddyMess directory with:
This is enough to get started. I don't move certs or logs.
sudo cp caddy /usr/local/bin/caddy
sudo setcap 'cap_net_bind_service=+ep' /usr/local/bin/caddy
sudo groupadd -g 33 www-data sudo useradd \ -g www-data --no-user-group \ --home-dir /var/www --no-create-home \ --shell /usr/sbin/nologin \ --system --uid 33 www-data sudo mkdir /etc/caddy sudo chown -R root:root /etc/caddy sudo mkdir /etc/ssl/caddy sudo chown -R root:www-data /etc/ssl/caddy sudo chmod 0770 /etc/ssl/caddy
sudo cp caddy.service /etc/systemd/system/ sudo chown root:root /etc/systemd/system/caddy.service sudo chmod 644 /etc/systemd/system/caddy.service sudo systemctl daemon-reload
sudo cp Caddyfile /etc/caddy/Caddyfile
sudo systemctl --now enable caddy ; sudo systemctl status caddy