Railway Up

Screenshot of Railway Up

Use the Railway CLI to kickoff a deploy within a service in a project from the command line. In a linked project run:

The linked project directory will be deployed to the currently selected Railway project and environment (if running from a subdirectory, the project root is still deployed). If there is only one service in the project, up will deploy to that target. Run railway status or run up with -v or --verbose to see which project and environment will be used.

If there is more than one service within a project, the CLI will prompt you which service to deploy to.

All deployments will appear within the service on your project canvas. Clicking on the build will bring up the build and deploy logs. Each deploy gets a unique URL and is considered immutable.

Up Behavior

If pointed to a GitHub service, the up deploy build will replace the active deploy with the up service. When an empty service is selected within the deployment prompt, the empty service will become a CLI service.

Keep in mind, Railway takes a snapshot of your code payload from your machine. This command may fail for large repos that are larger than 50mb.

Port Variable

If you are starting a server, you need to use the PORT environment variable. This is how Railway can expose your deployment. If you see a "Bad Gateway" error, you most likely are not listening on PORT.


Edit this file on GitHub