Cloudflare Tunnel is slow while Let's encrypt isn't. Need help on optimisation

I am using Cloudflared Tunnels for my unRAID server dockers. This is everything from Nextcloud to different others. Through the tunnel I only get 3-4 Mbps download and 20-35 Mbps upload. Through direct connection with Let’s Encrypt I get my full 100/100 bandwidth. Can anyone point me to the right direction on how to configure this correctly? Google just points me to a bunch of posts with the same problem and no solutions. Thanks in advance!

Hi there,

I was testing using your own web interface and got 4.3/85.2:

One thing you should remember is that when you measure it from this end of the tunnel, the download you get relates to the upload of your connection and the upload your download. If that makes sense…
So to better put it, if your ISP allows you 500down and 50up for instance, on this side of the tunnel you’d be able to get to a maximum of 50Mbps dl and 500Mbps up.

Another thing you might want to remember is that when using a tunnel, your traffic will always exit your internal network, while if you use an A record for instance pointing at your public IP address, after the DNS resolution, the traffic from your network trying to reach will pretty much just get to the gateway and back to the host. So with this in mind, a better comparison would be to test it from outside your own network.

Finally, the way you have your docker container configured might also make a difference. Check Bridged VS Host VS Custom to see if it makes any difference in your case.

As a final note, I’m noticing that you have all your public hostnames resolving directly to the origin, I’m not sure if this is intended, but if you want to protect these hostnames by placing them behind a Cloudflare authentication page, take a look at Applications. (In ZT dashboard: Access > Applications)

Take care.

My bandwidth is 100/100Mbps. When I use DuckDNS for the same speedtest docker, i get my full transfer speeds. The tests I’ve done is always externally. For some reason the Cloudflared Tunnel is insanely slow no matter what. I find it really strange that this only happens with the tunnels, and I can’t wrap my head around why.

Hi there,

I also use unraid and am able to get much closer to my real speed. It’s not exact of course but close.
For exact speed I use something similar to duckdns but to update a hostname in Cloudflare. Look up oznu/cloudflare-ddns if you’re interested in this duckdns alternative.

But getting back to your issue, I would check the container logs for issues or try another container - since you’re using unraid, you have a few to choose from directly in your apps tab.
There’s a chance it can be something in the cloudflared container itself limiting speed.
Take a look here:


If this is your case, I would advise you maybe to share it in unraid forums to see if someone can help you fix it.

Take care.

Doesn’t seem to be a docker network issue. Tried changing stuff around and there was no difference. I am using a proxynet like in SpaceInvaderOne’s videos. To me this seems like a Tunnel issue, and I can’t figure out why.