Project tokens can be used in environments where you cannot login (e.g. remote servers or CI). You can create project tokens for a specific Railway environment on the project page.

Project tokens allow the CLI to access all the environment variables associated with a specific project and environment. Use the token by setting the RAILWAY_TOKEN environment variable and then running railway run or railway env.

Deploying to a Server

If you have access to the command that starts the server, just prefix the command with railway run.

Deploying to Serverless

We are currently working on adding integrations to several serverless providers so that you can connect your Railway project without needing to worry about environment variables for each plugin.

However, for the time being, if you want to deploy a Railway project to an environment where you do not have access to the start command, we recommend you manually add each plugins environment variables (e.g. the DATABASE_URL for the Postgres plugin).


If you are having issues deploying to a specific platform, please reach out on Discord!