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

2 years 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

webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

1220828436076036400
1220828436453392400


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

where is this screenshot from?

1220829098973200400


webdevcody
HOBBYOP

2 years ago

the cloudflare tunnel view


webdevcody
HOBBYOP

2 years ago

1220829684967800800


webdevcody
HOBBYOP

2 years ago

on zero trust


webdevcody
HOBBYOP

2 years ago

1220829897115701500


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

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


webdevcody
HOBBYOP

2 years ago

sure


webdevcody
HOBBYOP

2 years ago

1220831665170022400


brody
EMPLOYEE

2 years ago

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


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

I'm pretty sure I used 2 separate tokens


brody
EMPLOYEE

2 years ago

okay can you send me your deploy logs for next


webdevcody
HOBBYOP

2 years ago

1220833853271179300


webdevcody
HOBBYOP

2 years ago

that's all there is


webdevcody
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

nope


webdevcody
HOBBYOP

2 years ago

ah ok, didn't think so


brody
EMPLOYEE

2 years ago

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


brody
EMPLOYEE

2 years ago

so if you like 8080 more, use that instead


webdevcody
HOBBYOP

2 years ago

sure


brody
EMPLOYEE

2 years ago

and then another screenshot of the deploy logs please


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

@Brody ^

1220835918802583600


webdevcody
HOBBYOP

2 years ago

1220836055083778000


webdevcody
HOBBYOP

2 years ago

ah you are a genius


webdevcody
HOBBYOP

2 years ago

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


webdevcody
HOBBYOP

2 years ago

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


brody
EMPLOYEE

2 years ago

yep exactly


Loading...