Issue with Cloudflared Tunnels and Go
I currently have a lot of next.js applications already deployed to railway that use cloudflare tunnels and the internal hostname of the railway container.
I'm having an issue when trying to deploy a container with Go. I've tried setting the hostname to the internal container, but my site is not reachable. I'm wondering if anyone else has successfully deployed a go application to railway with cloudflare tunnels. I think it may be related to my scratch container in that maybe scratch can't resolve the DNS hostname due to missing binaries on the machine?
I'm having an issue when trying to deploy a container with Go. I've tried setting the hostname to the internal container, but my site is not reachable. I'm wondering if anyone else has successfully deployed a go application to railway with cloudflare tunnels. I think it may be related to my scratch container in that maybe scratch can't resolve the DNS hostname due to missing binaries on the machine?
15 Replies
Are you using docker?
For Go apps you would want to listen to a blank hostname, aka
:$PORT
As that will listen on IPv6 and IPv4, IPv6 is needed because the private network is IPv6 only.so I'm using this
I've tried a lot of this @Brody
I'm trying to configure my fiber server to use tcp6 when deployed to railway since it seems like the hostname doesn't resolve unless it's ip6?
the app works fine directly, the issue is with the cloudflared tunnel
is this what you're trying to host?
oh shit it just worked
it was probably a cache issue
ehh idk, the moment I switched to this it seemed to work
I was also trying to resolve hostnames inside the container and it seems like ipv4 wasn't supported?
like the internal hostname railway provides is ipv6 only
oh I also added this
I'll keep playing around, but I think it's good now
Correct, it is IPv6 only