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
Chaika
Chaika2w ago
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 throwing
_flexs_
_flexs_OP2w ago
i am on TrueNas Scale
Chaika
Chaika2w ago
How'd you configure the public hostname, what endpoint, vs how you access it locally w/o tunnels?
_flexs_
_flexs_OP2w ago
i access it via local ip https://192.168.1.6:30027/ and i have configured it via cloudflare's tunnel
No description
_flexs_
_flexs_OP2w ago
does HTTP/HTTPS make a difference
No description
_flexs_
_flexs_OP2w ago
@Chaika
Chaika
Chaika2w ago
yes, big difference
_flexs_
_flexs_OP2w ago
and do you see any mistake here?
Chaika
Chaika2w ago
switch to https service type, and then under additional application settings, under tls, turn on no tls verify (then save and try again)
_flexs_
_flexs_OP2w ago
it kept loading for a while then changed the url to og local address
No description
No description
Chaika
Chaika2w ago
ah yea nextcloud has its concept of trusted domains
Chaika
Chaika2w ago
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.
Chaika
Chaika2w ago
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

Did you find this page helpful?