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

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.

36 Replies

webdevcody
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

1220828436076036400
1220828436453392400


webdevcody
PROOP

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
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

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


2 years ago

where is this screenshot from?

1220829098973200400


webdevcody
PROOP

2 years ago

the cloudflare tunnel view


webdevcody
PROOP

2 years ago

1220829684967800800


webdevcody
PROOP

2 years ago

on zero trust


webdevcody
PROOP

2 years ago

1220829897115701500


2 years ago

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


2 years ago

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


2 years ago

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


webdevcody
PROOP

2 years ago

sure


webdevcody
PROOP

2 years ago

1220831665170022400


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
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

I'm pretty sure I used 2 separate tokens


2 years ago

okay can you send me your deploy logs for next


webdevcody
PROOP

2 years ago

1220833853271179300


webdevcody
PROOP

2 years ago

that's all there is


webdevcody
PROOP

2 years ago

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


2 years ago

nope


webdevcody
PROOP

2 years ago

ah ok, didn't think so


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


2 years ago

so if you like 8080 more, use that instead


webdevcody
PROOP

2 years ago

sure


2 years ago

and then another screenshot of the deploy logs please


webdevcody
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

@Brody ^

1220835918802583600


webdevcody
PROOP

2 years ago

1220836055083778000


webdevcody
PROOP

2 years ago

ah you are a genius


webdevcody
PROOP

2 years ago

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


webdevcody
PROOP

2 years ago

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


2 years ago

yep exactly


Loading...