railway(1)
Railway is a command-line tool for deploying and managing applications on the Railway platform.
Synopsis
railway [COMMAND] [OPTIONS] [ARGUMENTS]Description
Railway is a modern deployment platform that simplifies shipping applications to production. The railway CLI tool allows developers to authenticate, deploy projects, manage environment variables, view logs, and control services directly from the terminal.
It supports multiple programming languages and frameworks, automatically detecting your project type and configuring deployments accordingly. Railway handles infrastructure management, scaling, and database provisioning without requiring manual server configuration.
Common options
| Flag | What it does |
|---|---|
--help, -h | Show help information for a command or the CLI |
--version | Display the current version of the Railway CLI |
--project | Specify a project ID to use for the command |
--environment | Target a specific environment (e.g., staging, production) |
--json | Output results in JSON format for scripting |
--verbose | Enable verbose logging output for debugging |
Examples
Authenticate with Railway using browser-based login to obtain an API token
railway loginInitialize a new Railway project in the current directory with interactive setup
railway initDeploy the current project to Railway
railway upStream live logs from your deployed application (follow mode)
railway logs -fSet an environment variable in the current service
railway variables set DATABASE_URL postgres://...Display the current deployment status and service information
railway statusOpen your Railway project dashboard in the default web browser
railway openEstablish an SSH connection to your running service for debugging
railway service connect