Trying to deploy to Railway - what am I missing?

default discord avatar
.mike10018 months ago

Just gives me "Application failed to respond" with a 503 in the console. If anyone can point me towards a deploy guide for Railway that would be amazing


Mongo set and working

Node_env set to prod

Payload_config path set

Payload_secret set

Have tried with docker and nixpacks. Have run build command before push

Gives me this after build

yarn run v1.22.19

$ yarn build && yarn serve

$ yarn copyfiles && yarn build:payload && yarn build:server

$ copyfiles -u 1 "src/*


.{html,css,scss,ttf,woff,woff2,eot,svg,jpg,png}" dist/

$ cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts payload build

$ tsc

$ cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js NODE_ENV=production node dist/server.js

[19:45:51] INFO (payload): Connected to MongoDB server successfully!

[19:45:51] INFO (payload): Starting Payload...

[19:45:52] INFO (payload): Payload Admin URL: Correct URL/admin

  • discord user avatar
    8 months ago

    Railway also requires a


    environment variable to be set. This is specific to Railway.

    I've also recorded a railway deployment tutorial a while back here:


  • default discord avatar
    .mike10018 months ago

    Amazing - thanks for the help.

Star on GitHub


Chat on Discord



Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.