Issue with Cloudflared Tunnels and Go
webdevcody
PROOP

2 years ago

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?

21 Replies

2 years ago

Are you using docker?


2 years ago

n/a


2 years ago

N/A


2 years ago

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.


webdevcody
PROOP

2 years ago

1267599189681111000


webdevcody
PROOP

2 years ago

so I'm using this


webdevcody
PROOP

2 years ago

I've tried a lot of this @Brody


webdevcody
PROOP

2 years ago

1267599281708077300


webdevcody
PROOP

2 years ago

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?


webdevcody
PROOP

2 years ago

the app works fine directly, the issue is with the cloudflared tunnel


2 years ago

is this what you're trying to host?

1267599725671223300


webdevcody
PROOP

2 years ago

1267599803462844400


webdevcody
PROOP

2 years ago

oh shit it just worked


2 years ago

it was probably a cache issue


webdevcody
PROOP

2 years ago

ehh idk, the moment I switched to this it seemed to work

1267600002339963000


webdevcody
PROOP

2 years ago

I was also trying to resolve hostnames inside the container and it seems like ipv4 wasn't supported?


webdevcody
PROOP

2 years ago

like the internal hostname railway provides is ipv6 only


webdevcody
PROOP

2 years ago

1267600199069602000


webdevcody
PROOP

2 years ago

oh I also added this


webdevcody
PROOP

2 years ago

I'll keep playing around, but I think it's good now


2 years ago

Correct, it is IPv6 only


Loading...