cloudflare tunnel

hello, long story short im trying to put my small node js app online with cloudflare tunnel, tunnel seems to be working and my app is also working, listening on port 8080, tunnel is in docker container and my app is not, can this be problem? does my app heve to be in same container as my tunnel? error from docker container(tunnel):
2025-02-19T20:43:58Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" connIndex=0 dest=http://skylands.uk/ event=0 ip=198.41.192.27 type=http
2025-02-19T20:43:58Z ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" connIndex=0 dest=http://skylands.uk/ event=0 ip=198.41.192.27 type=http
thanks for any help/ideas, i love cloudflare my domain (from cloudflare:) skylands.uk error 502 (bad gateway)
No description
No description
1 Reply
It's Always DNS
Yes, if your app is not being ran via Docker, then the best way to fix this would be to run Cloudflared on the machine itself, OR just run the Cloudflared docker container in host mode so it uses the same networking space as the host. If you're using Docker Compose, just add: network_mode: host

Did you find this page helpful?