railway
Deploy and manage apps on Railway platform
TLDR
SYNOPSIS
railway command [options]
DESCRIPTION
railway is the command-line interface for Railway, a cloud platform for deploying and hosting applications. It enables developers to deploy code, manage environment variables, and interact with Railway projects directly from the terminal.The CLI supports zero-configuration deployments by automatically detecting project types and configuring build settings. It integrates with git workflows and can deploy from local directories or connected repositories.A key feature is the ability to run local development with production environment variables using railway run, ensuring consistency between development and deployed environments.
PARAMETERS
login
Authenticate with Railwaylogout
Log out of Railwayinit
Create a new Railway projectlink
Link current directory to an existing Railway projectup
Deploy the current directory to Railwayrun command
Run a local command with Railway environment variables injectedshell
Open a new shell with Railway environment variableslogs
View deployment logsopen
Open the project in the Railway web dashboardstatus
Show the status of the linked projectvariables
Manage environment variablesservice
Manage services within a projectvolume
Manage persistent volumesdomain
Manage custom domainsssh
Open an SSH session to a deployed service--help, -h
Display help information--version, -v
Display version number
CONFIGURATION
~/.railway/config.json
Local authentication and project linking configuration storing API tokens and project references.RAILWAY_TOKEN
Environment variable for API authentication, used in CI/CD pipelines where interactive login is unavailable.
CAVEATS
Requires a Railway account and authentication via railway login before most commands work.Projects must be linked with railway link or initialized with railway init before deployment commands can be used in a directory.Free tier has resource limitations. Check Railway's pricing documentation for deployment limits and usage quotas.
HISTORY
Railway was founded in 2020 as a modern alternative to traditional Platform-as-a-Service providers. The CLI was developed alongside the platform to provide a developer-friendly deployment experience with minimal configuration. The tool is open source and actively maintained on GitHub.
