CloudFlare Tunnel Help
Hi i want to setup My Nextcloud app for External use outside my home network i have purchased domain name and Used CloudFlare Tunnel but even after that i got 502 Bad gateway error, I have tried multiple time can anyone help me with that
Thanks!
13 Replies
502 means the cloudflared/tunnel connector can't connect to your configured service
If on linux / systemd (like ubuntu, debian), you can check logs via
journalctl -u cloudflared -f --lines=100
, send a request and see the error it's throwingi am on TrueNas Scale
How'd you configure the public hostname, what endpoint, vs how you access it locally w/o tunnels?
i access it via local ip https://192.168.1.6:30027/
and i have configured it via cloudflare's tunnel

does HTTP/HTTPS make a difference

@Chaika
yes, big difference
and do you see any mistake here?
switch to https service type, and then under additional application settings, under tls, turn on no tls verify
(then save and try again)
it kept loading for a while then changed the url to og local address


ah yea nextcloud has its concept of trusted domains
Configure Nextcloud Behind a Cloudflare Tunnel
When you set up a private Nextcloud installation on your home server and want to have it accessible from the outside network you traditionally need to poke a hole in your NAT and set up dynamic DNS to be able to find the correct IP every time. With Cloudflare Tunnel you can connect to your server without ever exposing your IP address to the world.
you get a slightly different error then they do, but I'd add your tunnel hostname to trusted domains eitherway, restart, and see what you get, have to do that regardless