Is there a guide for how to setup cloudflare tunnels with railway?

webdevcodyHOBBY

a year ago

I'm trying to follow what is listed out here, but I'm failing to understand this guide.

I've deployed a next.js project on a railway project, and I've also deployed the cloudflared template, setup the token in the cloudflared image, but I'm lost trying to point cloudflare to access my running next app.

0 Replies

webdevcodyHOBBY

a year ago

f1e3ebf1-86f3-4db0-9fbe-72558c6f4423


webdevcodyHOBBY

a year ago

1220828436076036400
1220828436453392400


webdevcodyHOBBY

a year ago

from what I understand, I needed to add a hostname to my cloudflare tunnel and use the internal networking hostname provided in railway?


webdevcodyHOBBY

a year ago

I've tried both http://webdevcody-com , https://webdevcody-com, and they full hostname


webdevcodyHOBBY

a year ago

I've verified my app is actually running by creating a public hostname here: https://webdevcodycom-production.up.railway.app/


a year ago

where is this screenshot from?

1220829098973200400


webdevcodyHOBBY

a year ago

the cloudflare tunnel view


webdevcodyHOBBY

a year ago

1220829684967800800


webdevcodyHOBBY

a year ago

on zero trust


webdevcodyHOBBY

a year ago

1220829897115701500


a year ago

wow, look at the inconsistencies in the design, on the same page!! through me for a loop


a year ago

ill pull up my zero trust page and see how i have things setup


a year ago

screenshot of your tunnels page please? ill probably end up needing more screenshots as we go


webdevcodyHOBBY

a year ago

sure


webdevcodyHOBBY

a year ago

1220831665170022400


a year ago

i know the second tunnel pertains to the topic of this help thread, but for context, whats the first tunnel for?


webdevcodyHOBBY

a year ago

another project I was going to set up before I decided not to break it


webdevcodyHOBBY

a year ago

I'll even delete that project planner tunnel just to make sure I didn't screw anything up


webdevcodyHOBBY

a year ago

I'm pretty sure I used 2 separate tokens


a year ago

okay can you send me your deploy logs for next


webdevcodyHOBBY

a year ago

1220833853271179300


webdevcodyHOBBY

a year ago

that's all there is


webdevcodyHOBBY

a year ago

am I supposed to use http://localhost:5735 ?


a year ago

nope


webdevcodyHOBBY

a year ago

ah ok, didn't think so


a year ago

set a PORT service variable to 3000 on the next service, number doesnt matter too much, just need to be a fixed number


a year ago

so if you like 8080 more, use that instead


webdevcodyHOBBY

a year ago

sure


a year ago

and then another screenshot of the deploy logs please


webdevcodyHOBBY

a year ago

doing 3000, it's rebuilding now, might take a bit


webdevcodyHOBBY

a year ago

@Brody ^

1220835918802583600


webdevcodyHOBBY

a year ago

1220836055083778000


webdevcodyHOBBY

a year ago

ah you are a genius


webdevcodyHOBBY

a year ago

basically hard code the port, then specify the port of the next service in the service url


webdevcodyHOBBY

a year ago

it's working now, thank you so much for the help!


a year ago

yep exactly