Skip to content

Comparison

Caddy vs Nginx: which reverse proxy for ten apps?

Caddy puts ten apps behind HTTPS in about 30 lines of config; Nginx takes about 200 plus certbot, and Traefik suits Docker labels. Configs, speed and HTTP/3.

Nick Potts, who builds Ployz. Published , facts checked ·Sources

The short answer

Which should you pick: Caddy, Nginx or Traefik?

Caddy, for ten side projects on one or two servers. Putting ten apps behind HTTPS on one server takes about 30 lines of config in Caddy, about 44 in Traefik (a 24-line static file plus two Docker labels per app) and about 200 in Nginx, plus certbot to get the certificates. All three handle far more traffic than ten small apps will send them, so nginx vs caddy isn't about speed: it's about how much config you write and keep up to date.

Choose Caddy if

What I'd use for ten side projects
  • Your apps run as processes or containers on one or two servers.
  • You want HTTPS to stop being a task.
  • You want ten apps in 30 lines, certificates included, in a file you can read in ten seconds.

Choose Nginx if

For very high request rates
  • You already know it.
  • You need its module ecosystem.
  • You tune for very high request rates, where it's the fastest of the three in every published test I found.
  • You're fine writing more config and running certbot next to it.

Choose Traefik if

For Docker containers
  • Everything you run is a Docker container and you want routes to follow the containers.
  • You want labels next to each service in your Compose files.
  • You want wildcard certificates: its DNS providers make them easier than in Caddy.
  • You'll lock down the Docker socket and set exposedByDefault to false.

Pick Ployz if your coding agent runs your servers and neither of you wants to write proxy config. Every Ployz server serves https with Caddy, and deleting a domain waits for you.

All three side by side

Caddy, Nginx, Traefik compared, as checked on 1 October 2026
TopicCaddyNginxTraefik
Config for ten appsAbout 30 lines: 3 per app and nothing else.About 170 to 204 lines, plus a certbot run per domain.About 44 lines: 24 written once, plus 2 Docker labels per app.
Automatic HTTPSBuilt in, on by default.No. certbot, or the separate nginx-acme module.Built in, after one resolver block.
Default certificate authorityLet's Encrypt, with ZeroSSL as a fallback if the first CA fails.Whatever certbot uses, Let's Encrypt by default.Let's Encrypt (configurable).
HTTP to HTTPS redirectAutomatic: HTTP on port 80 is redirected to HTTPS.A server block per site.One entrypoint setting.
Certificates for unknown domainsYes, at the first request, with on-demand TLS.No.No.
Wildcard certificatesDNS-01, with a custom build.DNS-01, through a certbot plugin.DNS-01, with the standard binary.
Docker discoveryThrough a third-party plugin.None built in.Built in.
Reload without downtimeYes. If the new config fails to load, the old one stays.Yes. Old workers keep serving existing clients and exit when done.Yes for routes. The static file (entrypoints, resolvers) needs a restart.
HTTP/3On by default.Since 1.25.0, with listen 443 quic and an Alt-Svc header in each server block.One line: http3 on the HTTPS entrypoint.
Speed in published testsMiddle or last.Fastest.Middle.
Memory in published testsTens of MB.Lowest.Highest in user reports.
License and languageApache-2.0, written in Go. No paid version needed.BSD 2-clause, written in C. NGINX Plus from F5 is the paid version.MIT, written in Go. No paid version needed.

All three are free and open source, and all three use Let's Encrypt and renew on their own once set up. What separates them is the work to get there: nothing in Caddy, one resolver block in Traefik, certbot and certificate paths in Nginx.

Which one gets HTTPS working with the least effort?

CaddyBetter

HTTPS is on by default for any site with a domain name, with no extra lines and no second program. Caddy renews the certificates itself. In its own words it was "the first web server to use HTTPS automatically and by default".

Nginx

Nginx needs certbot, or the newer ACME module, plus certificate paths in every server block. The certbot docs say its Nginx plugin "automates obtaining and installing a certificate with Nginx", and renewal runs from a systemd timer or cron job that most installs set up for you. It works well, but it's one more program, with its own state on disk, and it edits your config files.

Traefik

Traefik is close behind: one resolver block, then every router on the HTTPS entrypoint gets a certificate. It gets certificates itself, from Let's Encrypt unless you configure another CA. The HTTP to HTTPS redirect is one entrypoint setting.

Which one works best with Docker?

Caddy

Caddy has an official Docker image you mount a Caddyfile into. Label-based routing comes from caddy-docker-proxy, a third-party plugin maintained by Lucas Lorentz, not the Caddy team. It's MIT licensed and widely used, but a community project.

Nginx

Nginx has no built-in Docker discovery. It reads files: you edit them and reload. Label-driven setups exist, but they're separate projects with their own containers.

TraefikBetter

Labels on each container are Traefik's native config, and it updates routes as containers start and stop. It watches Docker events by default and needs no restart for new containers. Its README lists continuous config updates with no restarts as a core feature.

How do they handle wildcard certificates?

Caddy

Like the other two, Caddy can get a wildcard certificate like *.example.com and needs the DNS-01 challenge to do it, because Let's Encrypt only issues wildcards over DNS. The docs say you need "a Caddy build containing a DNS provider module": you build it with xcaddy or download a build with the plugin.

Nginx

Nginx gets wildcards from certbot with a DNS plugin. The certbot docs call DNS validation "the only way to obtain wildcard certificates from Let's Encrypt". The nginx-acme module only does http-01 and tls-alpn-01, so it can't.

Traefik

Traefik's ACME docs say "wildcard certificates can only be generated through a DNS-01 challenge". You set a dnsChallenge provider on the resolver from Lego's provider list. DNS providers are in the standard binary, so there's no custom build.

How many lines of config do ten apps take?

Caddy needs 3 lines per app and nothing else, about 30 lines for ten apps. Traefik needs a static config of about 24 lines once, then 2 Docker labels per app. Nginx needs a redirect block and an HTTPS server block per app, about 20 lines each, plus a certbot run per domain. A shared include file brings Nginx down to about 170.

ProxyWritten oncePer appTen appsCertificates
Caddy0 lines (3 if you add an email)3 lines30 to 33Automatic, built in
Traefik (Docker labels)24 lines of YAML, plus the Traefik container2 labelsabout 44Automatic, built in (ACME resolver)
Nginx, everything spelled out4-line map block for WebSockets20 linesabout 204certbot, one run per domain
Nginx with a shared proxy include4-line map plus a 5-line include file16 linesabout 170certbot, one run per domain
Nginx + HTTP/3add quic_* settings once+2 linesadd about 20same

You can shave Nginx further with templates or Ansible, but then you're maintaining the template instead.

What does the Caddy config look like for ten apps?

A Caddyfile for ten apps is ten blocks of three lines. Each block names the domain and the port the app listens on. Adding app eleven means adding three more lines and running caddy reload.

app1.example.com {
	reverse_proxy localhost:3001
}

app2.example.com {
	reverse_proxy localhost:3002
}

# ...eight more blocks like these

That's the whole file. The reverse proxy quick start shows the same shape: a domain, then reverse_proxy with a port, and Caddy "automatically provisions a trusted certificate".

The reverse_proxy docs list what Caddy does on its own:

  • It sets X-Forwarded-For, X-Forwarded-Proto and X-Forwarded-Host.
  • It passes the Host header through.
  • It ignores spoofed forwarding headers from clients.
  • It handles WebSocket upgrades.

It serves HTTP/1.1, HTTP/2 and HTTP/3 too: the global options docs list the default protocols as h1 h2 h3.

What does the Nginx config look like for ten apps?

Nginx needs two server blocks per app: one on port 80 that redirects to HTTPS, and one on port 443 with the certificate paths and the proxy headers. It doesn't get certificates on its own, so you run certbot once per domain, and certbot's timer renews them.

Written out for one app, with WebSocket support:

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 80;
    server_name app1.example.com;
    return 301 https://$host$request_uri;
}

server {
    listen 443 ssl;
    http2 on;
    server_name app1.example.com;
    ssl_certificate     /etc/letsencrypt/live/app1.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app1.example.com/privkey.pem;
    location / {
        proxy_pass http://127.0.0.1:3001;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade;
    }
}

The map block goes in once. The two server blocks repeat ten times with a new name and port. Most of those lines exist because Nginx's defaults are built for a different job.

LineWhy Nginx needs it
proxy_set_header Host $hostThe proxy module docs list the default Host as $proxy_host, the upstream's address rather than the domain the visitor asked for
Upgrade, Connection and the mapThe WebSocket docs say Upgrade is a hop-by-hop header and "is not passed from a client to proxied server"
proxy_http_version 1.1;Only on Nginx older than 1.29.7, where the default was 1.0

Nginx is getting its own way to fetch certificates. The official ngx_http_acme_module handles ACME certificates inside Nginx.

ACME module caveatDetail
Not in the default buildShips separately as nginx-acme, packaged as nginx-module-acme
No wildcardsSupports only the http-01 and tls-alpn-01 challenges
Still needs configAn acme_issuer block, a shared zone and three lines per server

So it shrinks the certbot step, not the config.

What does the Traefik config look like for ten apps?

Traefik splits config in two. A static file sets up the ports, the HTTPS redirect, the Let's Encrypt resolver and the Docker provider. Then each app's container gets labels saying which domain routes to it.

The static file, traefik.yml:

entryPoints:
  web:
    address: :80
    http:
      redirections:
        entryPoint:
          to: websecure
          scheme: https
  websecure:
    address: :443
    http3: {}
    http:
      tls:
        certResolver: le
certificatesResolvers:
  le:
    acme:
      email: you@example.com
      storage: /letsencrypt/acme.json
      httpChallenge:
        entryPoint: web
providers:
  docker:
    exposedByDefault: false

Then, per app, in its Compose file:

services:
  app1:
    image: ghcr.io/you/app1
    labels:
      - traefik.enable=true
      - traefik.http.routers.app1.rule=Host(`app1.example.com`)
PieceWhere it's documented
The redirect, http3 and http.tls.certResolverEntrypoints page. The resolver applies "on every router attached to the entryPoint", which keeps the per-app labels to two.
The resolver blockACME page
The label namesDocker routing reference

A container with more than one port needs a third label:

- traefik.http.services.app1.loadbalancer.server.port=3000

Two things to know. First, Traefik's Docker provider defaults to exposedByDefault: true (Docker provider docs). Every container gets a route unless you turn that off, as above. Second, Traefik needs access to the Docker socket to watch containers. That's a lot of trust to hand a process that faces the internet.

If your apps don't run in Docker, Traefik's file provider works, but then you write YAML routes by hand and most of its advantage is gone.

How do you run Caddy in Docker Compose in front of multiple apps?

Put Caddy and your apps in one Compose file, publish ports only on Caddy, and point the Caddyfile at the apps by service name. Compose puts every service on a shared default network. So Caddy reaches app1:3000, while nothing outside the server can.

services:
  caddy:
    image: caddy:2
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
      - "443:443/udp"
    volumes:
      - ./conf:/etc/caddy
      - caddy_data:/data
      - caddy_config:/config
  app1:
    image: ghcr.io/you/app1
    restart: unless-stopped
  app2:
    image: ghcr.io/you/app2
    restart: unless-stopped

volumes:
  caddy_data:
  caddy_config:
app1.example.com {
	reverse_proxy app1:3000
}

app2.example.com {
	reverse_proxy app2:3000
}

The ports, volumes and reload command follow the official Caddy image docs. 443/udp is for HTTP/3. The caddy_data volume is the one not to lose. The docs say it "must not be treated as a cache", because it holds your certificates and private keys. After editing the Caddyfile, run docker compose exec -w /etc/caddy caddy caddy reload.

The apps have no ports: on purpose. Docker's docs warn that published ports skip ufw: traffic "gets diverted before it goes through the ufw firewall settings" (Docker and ufw). If Caddy is the only service with ports, it's the only way in.

For label-based routing instead, the labels of caddy-docker-proxy are short, and it reloads Caddy gracefully when containers change:

caddy: app1.example.com
caddy.reverse_proxy: "{{upstreams 3000}}"

If you run Docker on a plain server, my Docker hosting piece covers what that costs.

Caddy as a load balancer for two servers

Give reverse_proxy two upstreams, a policy and a health check:

app.example.com {
	reverse_proxy 10.0.0.2:3000 10.0.0.3:3000 {
		lb_policy least_conn
		health_uri /health
		lb_try_duration 5s
	}
}

lb_try_duration tells Caddy how long to keep trying other upstreams when the one it picked is down, so a request waits briefly instead of failing. The two addresses can be containers on one server or apps on two servers over a private network. Run a Caddy like this on each server and you don't need to rent a load balancer for a small cluster.

Is Nginx faster than Caddy and Traefik?

Yes, in published benchmarks Nginx usually comes out ahead on requests per second and latency. Caddy and Traefik trade second place depending on the test. But the gaps show up at tens of thousands of requests per second on a 4-core machine. Ten side projects on one server are nowhere near that, so speed shouldn't decide this for you.

Benchmark setups differ a lot, so compare within a row, not across rows.

TestSetupNginxCaddyTraefik
Tyler Langlois, 2022AWS c5.xlarge (4 cores), reverse proxy, 500 clients, 30 s, k6~537K requests, 24.7 ms median (tuned config)~351K requests, 39.6 ms mediannot tested
Same testSame setup, 10,000 clientsDefault config refused 99%+ of connectionsZero errors, 1,228 ms median latencynot tested
Traefik forum, Nov 20254 vCPU AMD, user-run test26,380 req/s, 3.84 ms avg15,052 req/s, 6.84 ms avg20,795 req/s, 4.86 ms avg (v3 with FastProxy)
ComputingForGeeks, Mar 20264 vCPU, 4 GB VM, 100 connections, static HTTPS53,162 req/s47,437 req/snot tested

The Langlois test is the one I'd read in full. Tuned Nginx pushed more requests, while Caddy at its defaults degraded slowly instead of refusing connections. The forum numbers come from a Traefik community member. They put Traefik between the two once its FastProxy option is on.

How much memory do Caddy, Nginx and Traefik use?

Nginx uses the least, Caddy a bit more, and Traefik the most in user reports, but all three sit in the tens of megabytes. None of the three projects publishes an official memory figure, so these come from tests.

SourceNginxCaddyTraefik
ComputingForGeeks, static HTTPS, 100 connections50.5 MB63.6 MBnot tested
Private DevOps, 10,000 connections, 4-core VMabout 32 MBabout 58 MBnot tested
Traefik forum thread, one user's test––more than 2x Nginx and Caddy

Private DevOps warns that proxy benchmarks are "enormously sensitive" to setup.

On a 4 GB server running ten apps, the proxy is a rounding error next to the apps. A Netcup VPS 500 has 4 GB of RAM for €8.26 a month incl. VAT on a 12-month term, and Netcup also sells it from its Manassas datacenter in the US. Hetzner's CX23 has 4 GB for $6.49 plus $0.60 for an IPv4 address, in Germany and Finland only (Hetzner pricing). Even a proxy that used a few hundred MB would leave most of either server for your apps.

What if you'd rather not keep proxy config at all?

Then pick none of them by hand. Self-hosted platforms like Coolify and Dokploy put a proxy in front of your apps for you. PaaS pricing shows what you pay a platform to do the same.

I build Ployz so nobody has to write proxy config. Every Ployz server serves https itself with Caddy. Your coding agent runs it. Paste one line into Claude Code, Codex or Cursor and it deploys your repo.

ployz up --server root@your-server

Point your own domain at a service and it gets https. Several servers share one private network, and each one serves https. A small cluster needs no load balancer to rent. Deleting a domain waits for you. Ployz is free on any number of servers.

Let your coding agent put your apps behind HTTPS on your own servers with Ployz.

Questions

What is a reverse proxy?

A reverse proxy is the program that receives every web request to your server and passes it to the right app. It holds the HTTPS certificates, so your apps don't have to. On a server running ten apps, it's what sends app1.example.com to port 3001 and app2.example.com to port 3002.

Can Caddy be a load balancer?

Yes, give reverse_proxy more than one upstream and it load balances. It uses the random policy unless you pick another, such as round_robin, least_conn, ip_hash or cookie for sticky sessions. Health checks are built in: health_uri turns on active checks, and fail_duration turns on passive ones that mark an upstream down after failed requests. Nginx's open-source upstream block balances too, but active health checks are part of F5's commercial subscription.

Can Caddy get a certificate for a domain it wasn't told about?

Yes, with on-demand TLS. It gets a certificate during the first TLS handshake for a domain you didn't list in advance, which matters if your users bring their own domains. Neither Nginx nor Traefik does that out of the box.

How do you get a wildcard certificate in Caddy?

Use a *.example.com block with tls { dns <provider> }, on a Caddy build that contains a DNS provider module. Since Caddy 2.10 it uses a matching wildcard instead of requesting a certificate per subdomain. For ten apps on ten subdomains you don't need a wildcard certificate: one certificate per subdomain is fine, and it's what all three proxies do by default.

Can they reload config without dropping connections?

Yes, all three reload without dropping connections, and none needs a restart to add an app. caddy reload has "the same effect as POSTing a document to the /load endpoint", and Caddy's API docs say config changes "incur zero downtime". Nginx's master process checks the new config and, if anything fails, "it rolls back changes and continues to work with old configuration". Traefik's routing config from providers changes live, but its static file needs a restart.

Do Caddy, Nginx and Traefik support HTTP/3?

Yes, all three support HTTP/3. Caddy turns it on by default, and Traefik needs http3 set on the HTTPS entrypoint: its docs say HTTP/3 "requires a TCP entryPoint" and listens on UDP on the same port. Nginx has supported QUIC and HTTP/3 since 1.25.0: the module needs --with-http_v3_module when building from source, and nginx.org's Linux binary packages include it. Distro packages vary, so check nginx -V first. Whichever you use, open UDP 443 in your firewall, or browsers will quietly stay on HTTP/2.

What licenses do Caddy, Nginx and Traefik use?

All three use free, permissive open-source licenses: Caddy is Apache-2.0, Traefik is MIT and Nginx is BSD 2-clause. You can run any of them in front of commercial apps without paying. The paid option in this group is NGINX Plus from F5, which adds commercial features and support; F5 doesn't publish its price, so you contact its sales team. Caddy's README says being written in Go gives it "higher memory safety guarantees" and that it runs "with no external dependencies (not even libc)", which counts for a process that parses untrusted traffic all day.

Sources

Every statement about Caddy, Nginx and Traefik comes from the pages below, checked on 1 October 2026. They can change after that date.

Run your apps and databases on your own servers with Ployz.

Deploy your app