|Docs

railway service

Link a service to the current project and manage service operations.

Usage

Subcommands

SubcommandAliasesDescription
listlsList services in the current environment
linkLink a service to the current project
deleteremove, rmDelete a service from an environment
statusShow deployment status for services
logsView logs from a service
redeployRedeploy the latest deployment
restartRestart the latest deployment
scaleScale a service across regions
filesfileManage files in a service filesystem

Examples

Prompts you to select a service to link.

Show service status

Show all services status

View service logs

Redeploy service

Restart service

Scale service

Browse service files

Opens an interactive TUI for browsing, downloading, uploading, editing, renaming, and deleting files in the service filesystem.

List service files

Download a file from a service

Upload a file to a service

Rename a file in a service

Delete a file from a service

Options for

FlagDescription
-a, --allShow status for all services in the environment
--jsonOutput in JSON format

Options for

FlagDescription
-d, --deploymentShow deployment logs
-b, --buildShow build logs
-n, --lines <N>Number of log lines to fetch (disables streaming)
-f, --filter <QUERY>Filter logs using Railway's query syntax
--latestShow logs from latest deployment (even if failed/building)
-S, --since <TIME>Show logs since a specific time
-U, --until <TIME>Show logs until a specific time
--jsonOutput logs in JSON format

See railway logs for detailed usage and examples.

Options for

FlagDescription
-y, --yesSkip confirmation dialog
--jsonOutput in JSON format

Options for

FlagDescription
-y, --yesSkip confirmation dialog
--jsonOutput in JSON format

Options for

ArgumentDescription
REGION=REPLICASOne or more replica assignments by region.
FlagDescription
--jsonOutput in JSON format

See railway scale for available regions and detailed usage.

Manage files

Use railway service files to manage files in a running service filesystem. The command uses the linked service by default. Pass --service, --environment, or --project to select a different target.

SubcommandAliasesDescription
listlsList files in a directory
browsebrowserBrowse files interactively
downloadDownload a file or directory
uploadUpload a file or directory
deleterm, removeDelete a file
renamemvRename a file

Options for

FlagDescription
-s, --service <SERVICE>Service name or ID
-e, --environment <ENVIRONMENT>Environment to use
-p, --project <PROJECT_ID>Project ID to use

Options for

Argument or flagDescription
[REMOTE_PATH]Directory path to list. Defaults to /
--jsonOutput in JSON format

Options for

Argument or flagDescription
<REMOTE_PATH>Remote file or directory to download
[LOCAL_PATH]Local destination. Defaults to the current directory
--overwrite, --overrideReplace the local path if it already exists
--concurrency <N>Concurrent file downloads when downloading a directory. Defaults to 32
--jsonOutput in JSON format

Options for

Argument or flagDescription
<LOCAL_PATH>Local file or directory to upload
<REMOTE_PATH>Remote destination path
--overwriteReplace the remote path if it already exists
--concurrency <N>Concurrent file uploads when uploading a directory. Defaults to 32
--jsonOutput in JSON format

Options for

Argument or flagDescription
<REMOTE_PATH>Remote file to delete
-y, --yesSkip confirmation
--jsonOutput in JSON format

railway service files delete refuses to run when invoked by an AI agent and must be run by a human.

Options for

Argument or flagDescription
<OLD_REMOTE_PATH>Existing remote path
<NEW_REMOTE_PATH>New remote path
--jsonOutput in JSON format

Options for

Argument or flagDescription
[REMOTE_PATH]Directory path to open. Defaults to /
--editor <COMMAND>Editor command to use when editing files
--concurrency <N>Concurrent file downloads. Defaults to 32