$linuxjunkies
>

railway(1)

Railway is a command-line tool for deploying and managing applications on the Railway platform.

UbuntuDebianFedoraArch

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

FlagWhat it does
--help, -hShow help information for a command or the CLI
--versionDisplay the current version of the Railway CLI
--projectSpecify a project ID to use for the command
--environmentTarget a specific environment (e.g., staging, production)
--jsonOutput results in JSON format for scripting
--verboseEnable verbose logging output for debugging

Examples

Authenticate with Railway using browser-based login to obtain an API token

railway login

Initialize a new Railway project in the current directory with interactive setup

railway init

Deploy the current project to Railway

railway up

Stream live logs from your deployed application (follow mode)

railway logs -f

Set an environment variable in the current service

railway variables set DATABASE_URL postgres://...

Display the current deployment status and service information

railway status

Open your Railway project dashboard in the default web browser

railway open

Establish an SSH connection to your running service for debugging

railway service connect

Related commands