Nginx Port 8080

cerefrePRO

8 months ago

Do I need to explicitly set PORT 8080 as an environment variable if that's what I'm listening on in my nginx config or is that what Railway always uses?

Solved

7 Replies

8 months ago

Hello!

It is what Railway always uses when on the V2 runtime, just make sure you have your domain pointing to that port and you will be good!


Status changed to Awaiting User Response railway[bot] 8 months ago


cerefrePRO

8 months ago

What do you mean exactly by point domain to port?


Status changed to Awaiting Railway Response railway[bot] 8 months ago


8 months ago

Railway has (not so) recently introduced target ports, a feature that allows you to choose the port your app runs on when adding a domain to your service.

Though if you already have a domain then you would need to remove and re-add the domain to have the target ports option.


Status changed to Awaiting User Response railway[bot] 8 months ago


cerefrePRO

8 months ago

Okay but if it's on 8080 now and V2 now, I can feel pretty confident it's going to stay there? (and can leave 8080 as the port to listen on for nginx)


Status changed to Awaiting Railway Response railway[bot] 8 months ago


8 months ago

Yep, I can't see we changing that anytime soon, but can't hurt to set a PORT variable anyway!


Status changed to Awaiting User Response railway[bot] 8 months ago


cerefrePRO

8 months ago

Cool, thank you!!


Status changed to Awaiting Railway Response railway[bot] 8 months ago


8 months ago

No problem!


Status changed to Awaiting User Response railway[bot] 8 months ago


Status changed to Solved brody 8 months ago


Nginx Port 8080 - Railway Help Station