Nginx is everywhere. It's the default answer, the thing in every tutorial, the server that powers a huge portion of the web. I used it for years. Then I tried Caddy and I'm not going back.

The config is readable by humans

Here's a full Nginx config to serve a static site with HTTPS, gzip, and sensible headers. It's about 40 lines. Here's the same thing in a Caddyfile:

yourdomain.com {
    root * /var/www/site
    file_server
    encode gzip
}

That's it. Four lines. HTTPS is automatic. The certificate is issued and renewed without you doing anything. Gzip is on. The site is served.

Nginx's config format made sense when it was designed. Today, for most self-hosters, it's accidental complexity — you learn its syntax not because it helps you understand your server, but because there's no way around it. Caddyfile is the opposite: it reads like intent.

Automatic HTTPS is the headline feature

Caddy obtains TLS certificates from Let's Encrypt (or ZeroSSL) automatically, the first time you serve a domain. It renews them automatically, well before they expire. You never run certbot renew. You never wake up to a "certificate expired" alert at 2am.

I know what you're thinking — this isn't magic, Certbot does the same thing. True, but with Certbot you're still configuring two separate systems. With Caddy there's one config file, one process, one thing to reason about.

Reverse proxying is trivial

I run several services behind Caddy — Vaultwarden, n8n, this site. Adding a new one is one line:

service.yourdomain.com {
    reverse_proxy localhost:3000
}

HTTPS handled. Headers set. Done. With Nginx I'd have been copy-pasting a server block, tweaking proxy headers, running certbot, reloading. Twenty minutes of work versus thirty seconds.

When to still use Nginx

High-traffic production systems where you need fine-grained control over worker processes, connection limits, and buffering behaviour. Large teams where everyone already knows Nginx and the cognitive overhead of a new tool isn't worth it. Environments where Nginx modules you depend on don't have Caddy equivalents.

For personal projects, homelab use, or any scenario where you're the only person touching the config? Caddy wins on every dimension that matters.

Try it this weekend

If you've got a VPS and a domain, you can replace your web server with Caddy in an afternoon. The documentation is genuinely good. The community is active. And once you've run it for a few months without thinking about certificates or config reloads, you'll wonder what you were doing with Nginx.

← Back to Writing