R
Railway2y ago
Issam

How to change the port of my app?

I have a Laravel application on Railway. I have set up my Start Command to php artisan serve so the app would start serving when it finishes deployment. But it appears to be serving on 127.0.0.1:8000, which doesn't seem to work. How can I fix this?
8 Replies
nebula
nebula2y ago
you shouldnt need a custom start command, we detect that
Issam
Issam2y ago
I attempted another deployment without the custom start command, and now I'm getting HTTP ERROR 500. any idea on what's causing it?
jr
jr2y ago
You can set a custom port by changing the PORT environment variable
Issam
Issam2y ago
I'm currently getting an ERROR 500, There's no logs to debug or anything, can you suggest something to try out?
jr
jr2y ago
Hmm unfortunately I am not that familiar with PHP or Laravel :/ You could try switching to either the heroku or paketo builders. Do you have a sample app that we can use to try and debug it if it is a nixpacks issue
Issam
Issam2y ago
Oh this is so interesting! I just tried using Heroku Buildpacks and it worked! so this seems issue seems to affect Laravel projects and Nixpacks
jr
jr2y ago
Hmm okay. Thanks for the bug report! We will fix it next week when the team is back online
Issam
Issam2y ago
Sure no problem! Thanks for the great service, excited to try it out!