Keenrig

Caddy vs Traefik vs Nginx for self-hosting

Caddy, Traefik or Nginx in front of your self-hosted apps? How each one handles HTTPS, configuration and Docker, where each wins, and what Keenrig uses.

Every self-hosted app that speaks HTTP ends up behind a reverse proxy: the one process that owns ports 80 and 443, holds the certificates and decides which container a request belongs to. Three names come up in almost every guide — Caddy, Traefik and Nginx. All three are mature, free and open source, and any of them will carry a small team’s traffic without breaking a sweat. Where they really differ is in how you tell them what to do, and how much of the HTTPS work they take off your hands.

The short version

  • Caddy: automatic HTTPS out of the box, a very short config file, and a JSON admin API you can change while it runs. Pick it when you want certificates to stop being your problem.
  • Traefik: built to watch Docker and Kubernetes and to build routes from container labels. Pick it when containers come and go and you want routing to follow them without editing a central file.
  • Nginx: the most widely deployed of the three, documented to death, with a big module ecosystem that includes ModSecurity for a web application firewall. Pick it when you want precise control and do not mind writing config.

Caddy: HTTPS you do not think about

Caddy’s defining feature is that any site with a public hostname gets a certificate with no extra configuration. Give it a name and it requests a certificate over ACME, renews it ahead of expiry and redirects plain HTTP to HTTPS. A reverse proxy for one app is three lines:

n8n.example.com {
	reverse_proxy 127.0.0.1:5678
}

The less obvious strength is the admin API. Caddy’s running configuration is a JSON document that can be read and changed piece by piece over a local HTTP endpoint, without restarting the process. That makes Caddy easy for another program to drive, which is exactly what a self-hosting platform needs: install an app, add one route, leave every other site untouched.

Where Caddy is weaker: its module ecosystem is smaller than nginx’s, and adding a module — a WAF such as Coraza, or a DNS provider for wildcard certificates — means running a custom build of the binary rather than installing a package.

Traefik: routes that follow your containers

Traefik reads its routing from “providers”. With the Docker provider it watches the Docker API and turns labels on each container into routes, so starting a container with the right labels is all it takes to publish it:

labels:
  - "traefik.enable=true"
  - "traefik.http.routers.n8n.rule=Host(`n8n.example.com`)"
  - "traefik.http.routers.n8n.tls.certresolver=le"

That model is why deployment platforms such as Coolify and Dokploy put Traefik in front of the apps they deploy. It also has built-in ACME, a dashboard, and middlewares for basic auth, rate limits, redirects and header rewrites.

The cost is twofold. To watch Docker, Traefik needs the Docker socket, and anything that can talk to that socket can effectively control the host — many setups put a read-only socket proxy in between. And labels spread your routing across many compose files: convenient when you add an app, harder when you want to audit everything that is exposed.

Nginx: the workhorse

Nginx has served a large share of the web for two decades. Its config language is explicit: every server block, header, buffer size and timeout is yours to set. That precision is what you want for awkward cases — very large uploads, WebSockets with long idle times, response caching, rate limits per path.

For most of its history nginx did not obtain certificates itself; you paired it with certbot or another ACME client and a renewal timer. In August 2025 the nginx project released a native ACME module, ngx_http_acme, as a preview. As of 10 November 2026, check the nginx documentation for its current status before relying on it — most existing setups and tutorials still use an external client.

Nginx’s other card is ModSecurity with the OWASP Core Rule Set, a long-established web application firewall that filters common attack patterns such as SQL injection and cross-site scripting before they reach the app. Expect to tune it: a WAF also blocks some legitimate requests.

How to choose

  • One server, a handful of apps, you want HTTPS to just work: Caddy.
  • Apps deployed from git or compose files that change often, and you like keeping routing next to each container: Traefik.
  • You need a WAF, unusual tuning, or your team already knows nginx inside out: Nginx.
  • Still unsure: for a small team the proxy is almost never the bottleneck. Choose by how you want to manage configuration, not by benchmarks.

What Keenrig uses

Keenrig runs Caddy as its gateway and writes the routes for you, so there is no proxy config to maintain per app. When you install an app with a domain, Keenrig adds a route for that name through Caddy’s admin API; Caddy then obtains and renews the certificate itself. The admin panel works straight away on the server’s IP address, and the installer checks from outside that ports 80 and 443 actually answer.

curl -fsSL https://get.keenrig.com | sudo sh

App containers are not published on host ports. Caddy reaches each container over Docker’s internal network, so the only things facing the internet are ports 80 and 443 on the gateway.

Honest limits

  • Caddy is the only gateway that works on Keenrig today. Support for nginx is being built but cannot route traffic yet, so there is no nginx option and no ModSecurity WAF to turn on.
  • Keenrig does not use Traefik and does not read Docker labels; routes come from the apps you install through the admin panel.
  • Certificates are issued one hostname at a time. Keenrig does not issue wildcard certificates, which would need DNS-01 and DNS provider credentials.
  • If your server cannot be reached on ports 80 and 443 — behind CGNAT, for example — certificates cannot be issued on the server; see our guide on self-hosting without a public IP.