Is there a guide for how to setup cloudflare tunnels with railway?
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.
Solution:Jump to solution
basically hard code the port, then specify the port of the next service in the service url
30 Replies
Project ID:
f1e3ebf1-86f3-4db0-9fbe-72558c6f4423
f1e3ebf1-86f3-4db0-9fbe-72558c6f4423
from what I understand, I needed to add a hostname to my cloudflare tunnel and use the internal networking hostname provided in railway?
I've tried both http://webdevcody-com , https://webdevcody-com, and they full hostname
I've verified my app is actually running by creating a public hostname here: https://webdevcodycom-production.up.railway.app/
Create Next App
Generated by create next app
where is this screenshot from?
the cloudflare tunnel view
on zero trust
wow, look at the inconsistencies in the design, on the same page!! through me for a loop
ill pull up my zero trust page and see how i have things setup
screenshot of your tunnels page please? ill probably end up needing more screenshots as we go
sure
i know the second tunnel pertains to the topic of this help thread, but for context, whats the first tunnel for?
another project I was going to set up before I decided not to break it
I'll even delete that project planner tunnel just to make sure I didn't screw anything up
I'm pretty sure I used 2 separate tokens
okay can you send me your deploy logs for next https://bookmarklets.up.railway.app/log-downloader/
nope
ah ok, didn't think so
set a
PORT
service variable to 3000
on the next service, number doesnt matter too much, just need to be a fixed number
so if you like 8080 more, use that insteadsure
and then another screenshot of the deploy logs please
doing 3000, it's rebuilding now, might take a bit
@Brody ^
ah you are a genius
Solution
basically hard code the port, then specify the port of the next service in the service url
it's working now, thank you so much for the help!
yep exactly
happy to help