Comparisons 14 min read

Traefik, Nginx Proxy Manager, Caddy or Nginx in 2026: Which Reverse Proxy for Your Containers?

Traefik, Nginx Proxy Manager, Caddy or plain Nginx in 2026: Docker discovery, automatic HTTPS, version-controlled configuration, Docker socket access, resources and migration, to pick the right reverse proxy for your homelab.

S By Selfhostr · no sponsored content
Traefik, Nginx Proxy Manager, Caddy or Nginx in 2026: Which Reverse Proxy for Your Containers?
This article may contain affiliate links (no extra cost to you, it funds the site). As an Amazon Associate, Selfhostr earns from qualifying purchases. See the disclosure.

👍 What we like

  • Traefik discovers Docker containers through their labels, ideal for a stack that keeps changing
  • Nginx Proxy Manager provides a beginner-friendly web interface
  • Caddy obtains and renews HTTPS certificates by default, with a very short configuration
  • Traefik, Caddy and Nginx Proxy Manager can obtain wildcard certificates through a DNS-01 challenge

👎 What to watch

  • Traefik requires understanding routers, services, middlewares and entrypoints
  • Nginx Proxy Manager does not discover containers: every service is added by hand
  • Caddy has no web management interface
  • Traefik is overkill for a few services that never change
📑 Contents ▾

To expose a few services over HTTPS without spending your evenings on it, Caddy is the simplest: you write the domain name and a reverse_proxy directive, and it obtains and renews the certificate on its own. If you would rather fill in a form than a file, Nginx Proxy Manager (NPM) does the same job from a web interface. Traefik takes the lead when containers come and go: it reads Docker labels and creates routes with no manual step. Plain Nginx, with no interface, remains a good choice outside Docker or for very fine-grained tuning, at the cost of certbot and a more demanding syntax.

You will find no throughput or memory figures here: they depend too much on hardware and configuration to carry over from one setup to another. What follows relies on the four projects’ documentation and on the experience their users report.

What a reverse proxy does, and what sets these tools apart

As soon as you self-host more than one application, you need to expose nextcloud.mondomaine.fr, vaultwarden.mondomaine.fr and jellyfin.mondomaine.fr on the same machine, over HTTPS, without opening one port per service. The reverse proxy receives every request on ports 80 and 443, reads the requested domain name and forwards each request to the right container. It also terminates TLS and can add security headers or authentication in front of your applications.

All four tools can do this job. What differs, and what should drive your choice:

  • How you declare a route: a web form (NPM), a text file (Caddyfile, nginx.conf) or labels placed on each container (Traefik).
  • Container discovery: Traefik watches Docker and reconfigures itself; the others wait for you to add the route.
  • Certificates: built into Traefik, Caddy and NPM; handled by an ACME client such as certbot with plain Nginx.
  • Reproducibility: a file or labels can be versioned in Git; NPM stores its configuration in a database.
  • Docker socket access: essential to Traefik’s automatic discovery, and a security point covered further down.
  • Middlewares: authentication delegated to an SSO, rate limiting, headers, IP lists.

The comparison in one table

CriterionTraefikNginx Proxy ManagerCaddyPlain Nginx
LanguageGoNode.js + NginxGoC
ConfigurationDocker labels, YAML/TOML filesWeb interfaceCaddyfilenginx.conf
Docker discoveryNative (labels)NoVia caddy-docker-proxyNo
Automatic HTTPSYes, ACME resolver to declareYes, one toggle per hostYes, by defaultNo: certbot or acme.sh
Web interfaceRead-only dashboardFull managementNoNo
Wildcard (DNS-01)Yes, many providersYes, providers listed in the interfaceYes, via DNS modulesThrough the ACME client
Docker socket accessRequired for discoveryNoNo (except caddy-docker-proxy)No
Version-controlled configYesNo (database)YesYes
Memory footprintLowHighest of the fourVery lowLowest
Middlewares / authRich and composableBasic auth, access listsDirectives and modulesDirectives and modules
Learning curveSteepVery lowLowSteep
LicenseMITMITApache 2.0—
Best forA Docker stack that keeps changingBeginners, visual managementA few services, readable configOutside Docker, fine-grained tuning

Caddy: HTTPS without thinking about it

Caddy, created by Matthew Holt and written in Go, made automatic HTTPS its default behavior. As soon as a domain name appears in the Caddyfile, Caddy obtains the certificate (from Let’s Encrypt by default), installs it, redirects HTTP to HTTPS and renews the certificate well before it expires, with no manual reload. It validates the domain through an HTTP-01 or DNS-01 challenge and serves HTTP/2 and HTTP/3 without any special setting.

Its configuration is the shortest of the four. Here is the same service exposed with plain Nginx, then with Caddy:

server {
    listen 443 ssl;
    http2 on;
    server_name app.example.com;

    ssl_certificate /etc/letsencrypt/live/app.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.example.com/privkey.pem;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
    }
}
app.example.com {
    reverse_proxy localhost:3000
}

And the Nginx version still assumes a certificate already obtained with certbot, plus a second block on port 80 for the redirect. Security headers, on the other hand, are added by default by neither of them: with Caddy, HSTS, X-Frame-Options or Content-Security-Policy are declared with the header directive. In its standard build, Caddy reads a file and does without the Docker socket (see the Security section).

Its limits show up with a fast-moving Docker stack. Caddy does not discover containers: you add each site to the Caddyfile and reload, which is quick and happens without downtime. The community module caddy-docker-proxy brings Traefik-style label logic, but it requires its dedicated image and, unlike standard Caddy, needs the Docker socket. Extra modules, such as DNS providers for wildcards, require a custom image that includes those modules. Caddy has no web interface, and its community is smaller than NPM’s or Traefik’s, although its official documentation is very thorough. For a step-by-step guide, see our Caddy and Docker automatic HTTPS tutorial.

Nginx Proxy Manager: a form instead of files

NPM is a Node.js application that generates Nginx configuration files from what you enter in its web interface. You create a “Proxy Host” by entering the domain name, the service address and port, then enable the Let’s Encrypt certificate in a few clicks: it is the fastest way for a beginner to expose a service over HTTPS without a command line. The interface shows certificate status and handles renewal, and offers access lists (IP filtering, HTTP authentication), redirects and “Streams” to relay TCP or UDP. It also obtains wildcard certificates through a DNS-01 challenge if your DNS provider is in its list. Since most homelab tutorials use it, help is easy to find.

The limits come with advanced needs:

  • No Docker discovery: each service is added by hand, which gets repetitive on a stack that keeps changing.
  • Fine-tuning leaves the interface: custom headers, header-based routing or delegated authentication are entered as Nginx directives in the host’s “Advanced” tab. Everyday use requires no Nginx knowledge; these settings do.
  • The configuration is not code: it lives in a database (SQLite by default, MySQL/MariaDB possible). You can back it up and restore it, but you cannot version it in Git like a Caddyfile.
  • The interface is a web application to protect: whoever takes it over can rewrite all your routes. Do not expose it to the Internet.
  • It is the heaviest of the four: Nginx itself stays light; it is the Node.js application behind the interface and its database that add weight.

Traefik: routes declared in your containers

Traefik was designed for containers. It connects to the Docker socket, watches containers start and stop, and reconfigures its routing in real time based on the labels placed on each service. You add a few lines to your compose.yml, and Traefik creates the route, requests the certificate and exposes the service:

services:
  nextcloud:
    image: nextcloud
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.nextcloud.rule=Host(`nextcloud.mondomaine.fr`)"
      - "traefik.http.routers.nextcloud.entrypoints=websecure"
      - "traefik.http.routers.nextcloud.tls.certresolver=letsencrypt"
      - "traefik.http.services.nextcloud.loadbalancer.server.port=80"

The names websecure and letsencrypt refer to an entrypoint and a certificate resolver that you define once in Traefik’s static configuration. When the container stops, its route disappears: no central file drifts out of sync with what is actually running.

Its second strength is middlewares: basic or delegated authentication (forward-auth) to Authelia or Authentik, rate limiting, header manipulation, redirects, IP lists, all composable and reusable from one service to the next. Our Authentik behind Traefik tutorial walks through this setup. Traefik also exposes a read-only dashboard and Prometheus metrics, and it is the ingress controller k3s installs by default if your homelab moves to Kubernetes.

The downside is a steep learning curve. You need to tell routers, services, middlewares and entrypoints apart, and understand how static and dynamic configuration coexist. Debugging is less direct than with Nginx: the configuration is spread across container labels, the static file and sometimes dynamic YAML files, and finding out why a router does not match means walking back up that chain. With around twenty services, labels also bloat your Compose files: keep the proxy definition in a separate file from the services. For three services exposed once and for all, Traefik is overkill.

What about plain Nginx, with no interface?

Nginx, the engine NPM drives, is a web server and reverse proxy written in C, born to absorb the load of the Rambler site. Its master-worker architecture, where each worker handles thousands of connections without blocking, makes it a reference for throughput and frugality, including on a Raspberry Pi or an old NAS.

Its weak point is configuration. Every directive is written by hand, security headers included, and the certificate is the job of an external ACME client: install certbot or acme.sh, set up renewal, then reload Nginx (nginx -s reload). Its HTTP/3 support exists, but it is trickier to configure than Caddy’s.

Plain Nginx makes sense if:

  • you work outside Docker, on a machine where the package manager installs and updates Nginx;
  • you already know it well and want full control over every directive (caching, rewrites, buffering);
  • you host older applications whose documentation only provides an Nginx configuration.

On its own, Nginx does not filter application-layer attacks such as SQL injection or XSS: you need a WAF module such as ModSecurity or filtering upstream. A hybrid architecture is common: Caddy or Traefik in front for TLS and routing, Nginx behind for services that need fine-grained configuration. For monitoring, Nginx exposes stub_status, which nginx-prometheus-exporter can use.

Security: Docker socket, admin interfaces and common rules

The reverse proxy is your public entry point: it receives all traffic coming from the Internet. The most underestimated risk is Docker socket access (/var/run/docker.sock). Traefik needs it to discover containers, and so does caddy-docker-proxy. Yet this socket gives control of the host: a compromised proxy with access to it can start or modify containers. Mounting it read-only (:ro) does not restrict calls to the Docker API. The fix is to put a Docker socket proxy in between, allowing only the calls that are needed, and not to run Traefik as root. Caddy in its standard build, NPM and Nginx do not need this socket.

The other rules apply to all of them:

  • Force HTTPS and the redirect from HTTP, then enable HSTS: in NPM’s SSL options, with a headers middleware in Traefik, the header directive in Caddy and the add_header directive in Nginx.
  • Keep admin interfaces private: the Traefik dashboard and the NPM interface behind authentication, or reachable only over a VPN, for example with Tailscale.
  • Put an SSO in front of sensitive services: Authelia or Authentik protect your applications even if one of them has a vulnerability; Traefik’s forward-auth makes this setup simple.
  • Open only ports 80 and 443 on the firewall: the reverse proxy works at the application layer and does not replace a network firewall. Our guide to installing and securing an Ubuntu VPS covers this foundation.
  • Block repeated attempts with Fail2Ban, or hide your public IP behind a Cloudflare Tunnel.
  • Keep the proxy up to date: an exposed, unpatched proxy becomes the entry point for a compromise.

Certificates: HTTP-01, DNS-01 and wildcards

Traefik, Caddy and NPM obtain free Let’s Encrypt certificates and renew them before they expire. The difference lies in the validation method. The HTTP-01 challenge, the simplest, requires port 80 to be reachable from the Internet. The DNS-01 challenge works without exposing port 80, which suits a homelab with no reachable public IP, and lets you obtain a wildcard certificate (*.mondomaine.fr); in return, it needs an API key from a supported DNS provider.

Traefik (through the lego library) and Caddy (through its DNS modules) cover a wide range of providers; NPM offers a good number of them in its interface. Check that your registrar is on the list before aiming for a wildcard. Caddy pushes automation furthest, with nothing to configure for a simple certificate; Traefik requires declaring a certResolver, NPM a toggle per host, and plain Nginx goes through certbot or acme.sh.

Resources and performance

For a homelab or a small production service, all four are more than fast enough: your application or your bandwidth will saturate long before the proxy. Throughput gaps only appear under very heavy load, and depend on hardware, TLS and protocol (HTTP/2 or HTTP/3).

Memory matters more on a small machine. Based on their architecture and on user feedback, plain Nginx and Caddy are the most frugal, Traefik follows closely (it also listens to Docker events and keeps its routes in memory), and NPM is the heaviest, since it adds a Node.js application and a database on top of Nginx. On a 1 GB RAM micro-VPS shared with other services, that gap counts; on a mini PC with 16 GB, it becomes negligible.

On a Raspberry Pi or another ARM machine, Nginx and Caddy, shipped as an ARM64 binary, are the most at ease; Traefik runs adequately there, but may show signs of strain on very old hardware. Do not choose on raw performance: choose on how you want to configure it.

Which tool for your situation

  • You are a beginner and want to expose Pi-hole, Nextcloud and a blog without touching the terminal: Nginx Proxy Manager. Install the container, create a host, enter the service address, enable SSL, and you are done.
  • A stable family homelab (Home Assistant, Jellyfin, Nextcloud, set up once and for all): Caddy. Short configuration, automatic HTTPS, little memory used.
  • A Docker stack that keeps changing (tests, a development environment, services added every week): Traefik. Whoever adds a service adds its labels, and the proxy follows.
  • Configuration versioned in Git (Ansible, Terraform, GitOps): Traefik, whose rules live in each service’s Compose file, or Caddy, whose Caddyfile is easy to version and review. Not NPM.
  • Advanced authentication and composable middlewares: Traefik, thanks to forward-auth to Authelia or Authentik.
  • A server without Docker, or a need for very precise Nginx settings: plain Nginx, possibly behind Caddy or Traefik.

Switching reverse proxies

From NPM to Caddy or Traefik. There is no reliable automatic migration tool. The Nginx configuration files NPM generates serve as a reference to rewrite each host by hand as a Caddyfile or Traefik labels. The new tool will issue its own certificates: plan the switch during a maintenance window.

From Nginx to Caddy. Write and check the Caddyfile before switching, stop Nginx, then start Caddy: the downtime lasts as long as the switch and certificate issuance.

Two proxies on the same machine. Ports 80 and 443 can only be held by one process. To try a second proxy, use other ports or an isolated machine. In production, keep a single entry point, chaining an internal proxy behind it on other ports if needed, and terminate TLS in one place to avoid redirect loops.

Frequently asked questions

Can you use Traefik without exposing the Docker socket?

Yes, with the “file” provider: Traefik then reads its routes from dynamic configuration files, but it loses automatic container discovery, its main benefit. To keep discovery while limiting permissions, the socket proxy described in the Security section is the way to go. For a static stack, Caddy or NPM are simpler.

Is Caddy more secure than Nginx, including against DDoS?

More secure by default: it enables HTTPS and the HTTP-to-HTTPS redirect without any action on your part, whereas an Nginx setup can stay misconfigured if the administrator skips a step. Security headers still have to be added in both cases, and a well-configured Nginx is as secure as Caddy. Against an HTTP flood, configuration (rate limiting, Fail2Ban, Cloudflare Tunnel) matters more than the engine.

How do you route a subdomain with each tool?

With NPM, create a “Proxy Host” and enter the subdomain under “Domain Names”. With Traefik, add the label traefik.http.routers.myapp.rule=Host(`sub.mondomaine.fr`). With Caddy, add a sub.mondomaine.fr block containing reverse_proxy service:port, following the Caddyfile example above (opening brace at the end of the line, closing brace alone on its own line). Caddy is the most readable, Traefik the most flexible for complex rules, NPM the simplest visually.

Where to run your reverse proxy

The reverse proxy runs on the machine that already hosts your containers and uses few resources. At home, a low-power mini PC running 24/7 is enough in most cases, for example the Beelink Mini S12 Pro (Intel N100, 16 GB) or the Beelink EQ14 (Intel N150, dual 2.5 GbE ports); to compare models, see our guide to the best mini PCs for a homelab.

If you would rather not manage hardware, a VPS does the job: PlanetHoster offers managed VPS plans, ready in minutes. See PlanetHoster plans

Key facts

Traefik (Caddy via caddy-docker-proxy)
Native Docker discovery
Nginx Proxy Manager
Web management interface
Traefik, Caddy, Nginx Proxy Manager
Built-in Let's Encrypt certificates
MIT (Traefik, NPM), Apache 2.0 (Caddy)
Licenses
Tags: TraefikNginx Proxy ManagerCaddyNginxreverse proxyDockerhomelabself-hosting

Related

Comparisons

Raspberry Pi 5 or N100/N150 Mini-PC: Which to Choose for a Homelab or Personal Server in 2026?

Raspberry Pi 5 or Intel N100/N150 mini-PC for a homelab or personal server in 2026: ARM vs x86, performance from the spec sheets, storage, Docker, Proxmox, transcoding and total cost, plus the Pi 4 and more powerful mini-PCs.

Read
Comparisons

Best VPS for Self-Hosting in 2026: Hetzner, OVHcloud, Hostinger, Scaleway and the Rest

Which VPS to self-host Docker, Nextcloud or a bot in 2026: Hetzner, OVHcloud, Hostinger, Scaleway, Infomaniak, IONOS, Contabo. How much RAM you need, cheap VPS without overselling, French hosting and GDPR, Hostinger and IONOS reviews.

Read
Comparisons

16A Zigbee Outlets 2026: buying guide for power-hungry devices

16A Zigbee plugs in 2026: how to read the continuous rather than peak current rating, require a European plug, check metering and Zigbee2MQTT support, and know when a panel-mounted module is the better choice.

Read