What is Cloudflare Tunnel and when should I use it instead of opening ports on my VPS?

How Cloudflare Tunnel works, when it beats opening ports, and how to set it up on a Dongee Cloud server.

Cloudflare Tunnel connects your server to Cloudflare through an outbound connection, so you publish an app without opening inbound ports in the firewall. It's a good fit for dashboards, n8n or internal tools; for a regular website, opening ports 80 and 443 behind Cloudflare is still the simplest option. On Dongee Cloud you get root access and Docker to install cloudflared in minutes.

Updated November 27, 2026 · Dongee Team

How does it work?

You install the cloudflared program on your server. It opens an encrypted connection to Cloudflare, and Cloudflare sends your domain's traffic through it. Nobody can reach the server's IP directly for that service.

Tunnel or open ports

CriterionCloudflare TunnelOpen ports (80/443)
IP exposureHidden, no inbound portsVisible if you don't use a proxy
SetupInstall cloudflared and create the tunnelFirewall and web server with SSL
Best forn8n, dashboards, internal apps, servers behind NATHigh-traffic public websites and APIs
DependencyAll traffic goes through CloudflareYou can switch CDNs or use none
Access controlIntegrates with Cloudflare AccessYou set it up yourself

Steps on a Dongee Cloud server

  1. Have your domain's DNS on Cloudflare.
  2. Connect to your server over SSH.
  3. In the Cloudflare dashboard, go to Zero Trust › Networks › Tunnels and create a tunnel; copy the token.
  4. Run it with Docker: docker run -d --restart unless-stopped cloudflare/cloudflared:latest tunnel run --token YOUR_TOKEN.
  5. Add a "public hostname", for example n8n.yourdomain.com, pointing to http://localhost:5678.
  6. Close the firewall ports you no longer need (keep SSH restricted).
  7. Optional: protect access with Cloudflare Access.

If you don't have n8n yet, follow how to install n8n with Docker Compose.

Frequently asked questions

Is Cloudflare Tunnel free?

Cloudflare offers Tunnel on its free plan; check the current limits on its website.

Do I need a public IP to use Cloudflare Tunnel?

No. The server opens an outbound connection to Cloudflare, so you don't need to open inbound ports.

Can I use Cloudflare Tunnel on Dongee Cloud?

Yes. Dongee Cloud gives you root SSH access and unrestricted Docker, so you can install cloudflared as a service or a container.

Comenta lo que quieras

Unete a la charla
Solo ingresa tu email