Can’t access Docker container via Cloudflare Tunnel - 502 error

I will preface this by saying I’m very new and don’t know a lot of things yet and I’m learning. So please forgive me if I don’t word things correctly.

I’m running Proxmox, with a Debian based instance of Portainer. In Portainer I have a virtual network that I’ve created that’s being used by several containers I’ve deployed - radarr, sonarr, jackett, overseerr etc. I am trying to use Cloudflare Tunnel to access the web gui of overseerr. I get as far as cloudflare telling me that the connection is healthy in the tunnel configuration, but when I attempt to connect with my sub.domain, it gives me a 502 error.

In my cloudflared instance on portainer, the log keeps throwing me this error:

error=“Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: read tcp>xx.x.x.xx:5055: read: connection reset by peer” connIndex=1 event=1 ingressRule=0 originService=https://xx.x.x.xx:5055

Cloudflared is on the same network as container

I’ve redacted the container IP address.

How can I go about connecting via Cloudflare tunnel?

Hi there,

Are you sure your address is accessible internally via HTTPS?
The address you place in the service type/URL should be an address cloudflared can access locally. Are you perhaps using http:// instead of https://?

Take care.