The short answer
They solve different problems. Cloudflare Tunnel makes a web service reachable by anyone at a public address, through Cloudflare, without opening a port on your server. WireGuard makes a service reachable by your own devices only, over a private tunnel, with one UDP port open on your server.
Pick Cloudflare Tunnel when the service is a website or web app that other people must reach from a browser and you do not want to open ports or point DNS at your server. Pick WireGuard when it is for you and your team: admin panels, databases, SSH, anything that is not a web page, or anything you do not want a third party to see in plain text. For an admin panel that only your team uses, WireGuard is the safer default, and it was also about 5 times faster for a big download and had about 35 times lower latency for a small page in our test.
One limit on what we can tell you: we have no Cloudflare account, so we only tested quick tunnels, the account-less kind. A named tunnel on your own domain, with Cloudflare's access rules, was not tested; what we say about it comes from Cloudflare's documentation, read on 27 November 2026, and is marked as such.
What we tested
One Melonslab VC-P Alloy (2 vCPU, 8 GB) with a fresh Debian 13. No Podman or Caddy was needed. A small web server (BusyBox httpd) served a one-line page and a 100 MB file.
- WireGuard: we followed our WireGuard guide. The server was
10.8.0.1; the "phone" was a client in a Linux network namespace on the same server, connected over a virtual cable that stands in for the internet. A second namespace with a second key played another device. - Cloudflare Tunnel:
cloudflared tunnel --url http://127.0.0.1:8080, which creates a quick tunnel ontrycloudflare.comwith no account. We fetched the page from the server itself, so the traffic left for Cloudflare and came back, and from a laptop at another network. - Not tested: a named tunnel, a Cloudflare account, your own domain, Cloudflare Access policies and the WARP client, which are the parts you would use in production. Everything below about them is from Cloudflare's documentation.
Because the WireGuard client and server share the same two cores, its speeds compare WireGuard with plain networking on equal terms, but between real machines your internet connection will usually be the limit. The tunnel numbers do include the real internet, to Cloudflare and back.
The numbers
| No tunnel (same server) | WireGuard | Cloudflare quick tunnel | |
|---|---|---|---|
| Ping | 0.09 ms | 0.42 ms | not possible: it carries web requests only |
| Small page, average of 50 requests | 1.3 ms | 2.5 ms | 93 ms (median 91, range 57 to 175) |
| 100 MB download | 9.6 to 12.9 Gbit/s | 1.4 to 2.1 Gbit/s | 362 to 385 Mbit/s in 5 of 6 runs, 200 Mbit/s in one |
| iperf3, 10 seconds | 23.5 Gbit/s | 2.08 Gbit/s | not possible: web requests only |
| Open ports on the server | none | UDP 51820 | none |
| Memory | none to speak of: it is part of the Linux kernel | 45 to 55 MB | |
| Disk | 0.3 MB of packages | 39 MB installed | |
| Time to get going | about 20 seconds from our guide | about 5 seconds to connect, then up to 7 more for the new name to resolve |
Note on the tunnel column: from a laptop on another network, the same file came in at 91 Mbit/s three times in a row, and a small page took a median of about 82 ms. That laptop is 2.0 ms from the server by ping, so the roughly 80 to 90 ms in both cases is the detour through Cloudflare: our requests were served from Cloudflare's Copenhagen site and the tunnel itself was connected to Berlin, according to cf-ray and the cloudflared log.
In one early run, three downloads of the 100 MB file through the tunnel came back as 200 with no data. Later runs of the same test all worked, and we did not find out why. Keep that in mind if you plan to move large files through a free quick tunnel.
Setup
WireGuard: our guide: install two packages, make a key pair per device, write one configuration file on the server and one per device, start wg-quick@wg0. About 20 seconds of commands, plus the time to copy a configuration to each device. One UDP port, 51820, must be reachable from the internet.
Cloudflare quick tunnel:
curl -sSL -o /tmp/cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb
dpkg -i /tmp/cloudflared.deb
cloudflared tunnel --url http://127.0.0.1:8080
It prints an address like https://something-random-words.trycloudflare.com. It connected after about 5 seconds, and in our runs the new name took up to 7 more seconds before it resolved. Nothing opens on your server: with the tunnel running, ss -tulnp showed only SSH, plus WireGuard's UDP port from the other half of the test, and one outgoing UDP socket for cloudflared. If your server cannot make outgoing connections to Cloudflare, it does not work at all.
A named tunnel needs a Cloudflare account and a domain whose DNS Cloudflare serves, according to Cloudflare's documentation. We did not test it. It gives you a stable name on your domain, which a quick tunnel does not: the address changed every time we restarted, and the old address answered with error 530 as soon as we stopped.
Adding devices and users
WireGuard: a new device is a key pair, a [Peer] block on the server and a file or QR code for the device, as in the guide. Users need the WireGuard app.
Cloudflare Tunnel: there are no devices to add. Anyone with a browser and the address reaches the service. Who gets in is decided by access rules, below. Users need nothing installed.
Access rules
This is where the two differ most.
Quick tunnel, no restrictions: anyone with the address gets in. From a laptop with no login at all, a request returned the page and the 100 MB file. The address is random, but it is not secret once it is in a browser history, a chat message or a log.
Quick tunnel with --allowed-mail: Cloudflare's quick-tunnel documentation describes a flag for email one-time PINs. We started a tunnel with --allowed-mail nobody@example.com. Every request, for the page, the 100 MB file and one with a made-up cookie, got 302 to login.trycloudflare.com and no data. We did not complete the login, since we had no inbox to receive a PIN, so we cannot say that the PIN flow lets the right person through. The documentation says it needs an interactive browser, so scripts and apps cannot use it, and that to change the list you stop the tunnel and start a new one with a new address.
Named tunnel with Cloudflare Access: Cloudflare documents access policies by identity, group or device, in front of a named tunnel. We did not test them.
WireGuard: a device without a key got nothing. From a namespace without a key, ports 8080 and 8081 on the server were refused, and the service listening on the tunnel address 10.8.0.1 could not be reached at all. A device with a key gets the whole tunnel network: with no firewall rules, both our peers reached every port on the server. We then added a firewall rule by tunnel address:
nft -f - <<'EOF'
table inet wgfw {
chain input {
type filter hook input priority 0; policy accept;
iifname "wg0" ip saddr 10.8.0.2 tcp dport 8081 accept
iifname "wg0" ct state established,related accept
iifname "wg0" drop
}
}
EOF
After that the "phone" reached port 8081 and no other port, and the second device reached nothing. The rule follows an address, not a person; our WireGuard guide uses ufw for the same job.
What the server sees
Through WireGuard, the service saw the device's tunnel address, 10.8.0.2.
Through the quick tunnel, every connection came from 127.0.0.1, which is cloudflared. The visitor's real address arrived in the headers CF-Connecting-IP and X-Forwarded-For, with CF-IPCountry. A service that logs connections by address will log 127.0.0.1 for everyone unless it reads those headers.
Privacy
WireGuard is encrypted from the device to your server, and nobody in between can read it. Your server learns each device's public key and where it connected from. Nothing else is involved.
Cloudflare Tunnel is encrypted from the visitor to Cloudflare and from cloudflared to Cloudflare, but Cloudflare serves the web page to the visitor, so it handles the traffic in plain text on its own servers. The replies we got carried server: cloudflare and a cf-ray identifier, which shows that every request passed through Cloudflare's edge. That is the price of the setup: Cloudflare can see, log and filter everything you publish this way, and its documentation describes this as how features like caching and the firewall work. If the service carries passwords, personal data or anything your own customers trust you with, think about that before you choose it.
Other protocols
A quick tunnel is for HTTP. We started one against ssh://127.0.0.1:22: it connected, a web request to its address returned an empty 200, and an ordinary ssh client was closed on connect. We did not get SSH working through it. Cloudflare's documentation says named tunnels support TCP, SSH, RDP and more, normally with cloudflared or the WARP client on the other end; we did not test that. WireGuard carries any IP traffic: SSH, databases, remote desktop, ping.
Limits of a quick tunnel
Cloudflare's own documentation for quick tunnels says they are for testing and development, and lists: no uptime guarantee, at most 200 requests in flight at once (extra requests get 429), no Server-Sent Events, email login only in an interactive browser, and a new hostname every time. We saw the last one for ourselves; the others we did not try to hit. Treat a quick tunnel as a way to show someone something this afternoon.
When something goes wrong
WireGuard depends on your server being up and UDP 51820 being allowed to reach it. Some hotel and office networks block UDP, and then WireGuard does not connect. Cloudflare Tunnel depends on Cloudflare being up and on your server making outgoing connections; if Cloudflare has an outage, so does your service. We did not test either outage.
Cost
WireGuard is free software and costs nothing to run beyond the server. For Cloudflare, we could not read a current price list: the pricing page did not load as text, so we give no figures here. Check Cloudflare's plans page before you rely on a named tunnel or access rules for a team.
Which one to pick
- A website or web app for the public, and you do not want to open ports? Cloudflare Tunnel, in its named form on your own domain. Weaknesses: Cloudflare sees everything, you depend on Cloudflare, each request takes about 90 ms longer in our test, and we could not test a named tunnel.
- Admin panels, databases, SSH, or anything for you and your team only? WireGuard. It is faster, supports any protocol, nothing between you and the server can read it, and an unknown device gets nothing. Weaknesses: one UDP port stays open, a device must be set up and needs an app, and a device with a key reaches every port unless you add firewall rules.
- Showing a demo to a customer for an afternoon? A quick tunnel, with
--allowed-mailif the demo should not be open to everyone with the link. Do not leave it running. - Both? That is common: WireGuard for administration and a tunnel for the public site. If you want devices that find each other and have names and rules, see WireGuard, Headscale or Tailscale.
Cleanup
To stop the quick tunnel, stop the process (pkill -x cloudflared); the address stops working at once. To remove cloudflared, apt purge cloudflared. To remove WireGuard, systemctl disable --now wg-quick@wg0, apt purge wireguard wireguard-tools and delete /etc/wireguard, which holds your keys.