I am unable to set up tunnels for accessing my localhost from the internet

I have already set up my website on a Raspberry Pi, and it works well on my local host. I can access the website using the LAN IP ( However, after pointing the domain to Cloudflare DNS and setting up tunnels, it consistently displays a host error.

What is the wrong here, pls help me

You should check the logs of the cloudflared tunnel, as it will tell you why there was a bad gateway error. Docs: Tunnel logs · Cloudflare Zero Trust docs

Off the screenshot, my guess is that it because you are using http://localhost:443. This means that cloudflared is going to want a certificate to match localhost which would have to be self-signed. You can try disabling the TLS verification or switching to http://localhost instead.

Hi there,

This can happen when the service you point the tunnel at is using a self-signed cert, but the “No TLS Verify” option isn’t checked under “Advanced application settings > TLS”.

This is an example of one of my endpoints that uses a self-signed cert, if I have “No TLS Verify” unchecked it gives me the same bad gateway error, once checking it the site loads as expected.

1 Like

Thanks so much, this resolved my isssue.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.