Cloudflare Tunnel vs Nginx Proxy Manager vs Traefik: Reverse Proxies Compared

This Cloudflare Tunnel vs Nginx Proxy Manager vs Traefik comparison covers what each tool does, where it breaks down, and which one fits a VPS or home server running Docker apps. All three can put your containers behind HTTPS subdomains like app.yourdomain.com. The difference is in how traffic reaches your box, how certificates get issued, and how much clicking versus coding you will do.

The quick verdict

  • Pick Cloudflare Tunnel if you cannot open ports: a home server behind ISP NAT or CGNAT, or a VPS where you want zero inbound ports exposed.
  • Pick Nginx Proxy Manager if you have a VPS with a public IP and want a web GUI that handles proxy hosts and Let’s Encrypt certificates with almost no config files.
  • Pick Traefik if you run everything in Docker and want routes to appear automatically from container labels, with configuration stored in files you can version-control.

What each tool actually does

Cloudflare Tunnel

Cloudflare Tunnel (formerly Argo Tunnel) flips the usual direction of traffic. Instead of visitors connecting inbound to your server, the cloudflared daemon on your machine opens an outbound-only encrypted connection to Cloudflare’s edge network. Requests for your hostname travel down that connection to reach your service.

The practical payoff is big: no port forwarding on your router, no public IP required, and it works behind CGNAT where port forwarding is impossible. Your server’s IP never appears in DNS. TLS is issued and terminated at Cloudflare’s edge, and you get Cloudflare’s DDoS protection in front of everything. The tunnel is free on every Cloudflare plan with unlimited bandwidth, and it no longer asks for a payment method. What it does require: a domain whose DNS is managed by Cloudflare, and acceptance that Cloudflare sees your traffic at the edge.

Setup happens in the Zero Trust dashboard: create a tunnel, copy the token, run the connector (a binary or a Docker container), and add ingress rules mapping hostnames to local ports. Current guides recommend remotely-managed tunnels, so ingress config lives in the dashboard and you can edit routes without restarting anything.

Nginx Proxy Manager

Nginx Proxy Manager wraps the proven Nginx web server in a web interface. You log into a GUI, fill in a form for each proxy host (domain name, container address and port), and it generates the Nginx config for you. Let’s Encrypt certificates are built in: request one per host from the same form and renewals happen automatically.

It also handles access lists (HTTP basic auth per host), custom Nginx snippets per proxy host, and redirect hosts. What you give up: configuration lives in NPM’s database, not in text files, so version-controlling your setup is awkward. And because visitors connect to your server directly, ports 80 and 443 must be reachable from the internet. Wildcard certificates need a DNS challenge, which NPM supports when your DNS provider is on its list.

Traefik

Traefik is an edge router built for containers. You run it once, point it at the Docker socket, and from then on you rarely touch the proxy config: adding a few labels to a container’s docker-compose.yml makes Traefik discover it and create the route, including the Let’s Encrypt certificate.

There is a web dashboard, but it is read-only. All real configuration lives in YAML files and labels, which suits infrastructure-as-code workflows. Traefik shines in Docker-heavy setups, Docker Swarm, and Kubernetes. The tradeoff is the learning curve. Concepts like entrypoints, routers, services, middlewares, and certificate resolvers take an afternoon to internalize, and debugging a route that silently fails usually means reading Traefik’s logs, not clicking a form.

Head-to-head: the differences that matter

How traffic reaches you. Cloudflare Tunnel needs zero inbound ports, which makes it the only option of the three behind CGNAT. NPM and Traefik both need ports 80 and 443 open and reachable, since visitors connect to your server directly.

How certificates work. With Tunnel, Cloudflare issues and holds the certificate at its edge; the hop between Cloudflare and your origin can be encrypted with an origin certificate, but TLS is fundamentally terminated at the edge. NPM and Traefik terminate TLS on your own box using Let’s Encrypt, giving you full control of the private keys. NPM does it through a GUI form; Traefik does it through ACME resolvers you define once in config.

How you add a service. NPM: open the GUI, add a proxy host, done. Traefik: add labels to the container, redeploy, done. Tunnel: add an ingress rule in the Zero Trust dashboard, pointing the hostname at a local port. Traefik wins on pure automation if you already live in Docker; NPM wins if you prefer clicking.

Security posture. Tunnel exposes nothing inbound, which shrinks your attack surface to the cloudflared process itself. With NPM or Traefik, ports 80 and 443 are open to the internet, so hardening the host matters: set up UFW on Ubuntu with only the needed ports open, use SSH keys, and run fail2ban as the baseline.

Vendor dependence. NPM and Traefik are fully self-hosted and open source; your setup keeps working even if a third party changes its pricing. Tunnel routes all your traffic through Cloudflare and requires your DNS there, which is a real dependency to weigh. For a homelab the free tier is generous, but it is still someone else’s network in the middle.

Resource use. On a small VPS this barely matters. Community comparisons put NPM around 50 MB idle and Traefik around 80 MB, while cloudflared is a tiny single binary. None of these will trouble a 1-2 GB VPS.

Choose by your network situation

Forget feature lists for a moment. Your network decides most of this:

  • Home server, no port forwarding (CGNAT, dorm network, strict ISP): Cloudflare Tunnel. The other two cannot reach you.
  • VPS with a public IP, a handful of apps, you like GUIs: Nginx Proxy Manager. You will be live in under an hour.
  • VPS with a public IP, dozens of containers, everything in Docker Compose: Traefik. Labels beat forms at that scale, and your proxy config lives in git next to your apps.
  • VPS with a public IP but you hate open ports: Cloudflare Tunnel on the VPS too. Plenty of people run it exactly this way.

You can run them together

These tools are not mutually exclusive. A common and solid pattern is Cloudflare Tunnel as the public front door with NPM or Traefik behind it: the tunnel exposes nothing inbound, and inside your private network NPM or Traefik routes to containers. You get Tunnel’s zero-open-ports property plus NPM’s GUI or Traefik’s label discovery for the internal routing. If you manage containers through a web UI already, our comparison of Docker management UIs pairs well with this setup.

How TLS termination differs

With Cloudflare Tunnel, encryption between the visitor and Cloudflare is handled for you, but the leg from Cloudflare to your origin is your responsibility. In the dashboard, set the SSL mode to Full (strict) and install a Cloudflare origin certificate on your origin so the whole path stays encrypted. With NPM and Traefik this does not come up: Let’s Encrypt certificates terminate on your server, end to end under your control. If keeping private keys on your own hardware matters to you, that alone decides the comparison. It is also the setup most people land on before exposing apps like a self-hosted Vaultwarden vault or their own Nextcloud file sync to the internet.

Final pick

For most self-hosters on a VPS: start with Nginx Proxy Manager. It gets HTTPS subdomains working fast with the least learning. If your containers multiply and you find yourself wishing proxy hosts would configure themselves, move to Traefik. And whenever the network fights you, whether that is CGNAT at home or a strict firewall on a cheap VPS, Cloudflare Tunnel removes the fight entirely. There is no shame in running Tunnel in front of either of the other two.

FAQ

Is Cloudflare Tunnel really free?

Yes. It is free on every Cloudflare plan with unlimited bandwidth, and no payment method is required. The paid parts are advanced Zero Trust features; the tunnel itself and basic Access policies (free for around 50 users) cost nothing.

Do I need my domain on Cloudflare to use Tunnel?

Yes. Cloudflare must be your authoritative DNS provider for the tunnel to route hostnames to your services.

Which is easiest for a beginner?

Nginx Proxy Manager. The GUI walks you through proxy hosts and certificates with no config files. Traefik’s label system is powerful but assumes you are comfortable with Docker Compose and YAML.

Can I use Nginx Proxy Manager behind Cloudflare Tunnel?

Yes. Point the tunnel’s ingress at NPM’s port, and NPM keeps doing the internal routing while the tunnel handles public access with no open ports.

Do NPM and Traefik need port 80 open?

For the default Let’s Encrypt HTTP/TLS challenge, yes. If port 80 is blocked you can use the DNS challenge instead, which requires API access to your DNS provider.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.