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
| Criterion | Cloudflare Tunnel | Open ports (80/443) |
|---|---|---|
| IP exposure | Hidden, no inbound ports | Visible if you don't use a proxy |
| Setup | Install cloudflared and create the tunnel | Firewall and web server with SSL |
| Best for | n8n, dashboards, internal apps, servers behind NAT | High-traffic public websites and APIs |
| Dependency | All traffic goes through Cloudflare | You can switch CDNs or use none |
| Access control | Integrates with Cloudflare Access | You set it up yourself |
Steps on a Dongee Cloud server
- Have your domain's DNS on Cloudflare.
- Connect to your server over SSH.
- In the Cloudflare dashboard, go to Zero Trust › Networks › Tunnels and create a tunnel; copy the token.
- Run it with Docker:
docker run -d --restart unless-stopped cloudflare/cloudflared:latest tunnel run --token YOUR_TOKEN. - Add a "public hostname", for example n8n.yourdomain.com, pointing to
http://localhost:5678. - Close the firewall ports you no longer need (keep SSH restricted).
- 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