RailwayDocs

railway environment

Create, delete, edit, or link an environment.

Usage

Aliases

  • railway env

Subcommands

SubcommandDescription
linkLink an environment to the current project
newCreate a new environment
deleteDelete an environment
editEdit an environment's configuration
configShow environment configuration

Examples

Create a new environment

Duplicate an environment

Or using the alias:

Delete an environment

Edit environment configuration

Show environment configuration

Options for

FlagDescription
-d, --duplicate <ENV>Environment to duplicate (alias: --copy)
--jsonOutput in JSON format

Options for

FlagDescription
-y, --yesSkip confirmation dialog
--2fa-code <CODE>2FA code for verification
--jsonOutput in JSON format

Options for

FlagDescription
-e, --environment <ENV>Environment to edit
-s, --service-config <SERVICE> <PATH> <VALUE>Configure a service using dot-path notation
-m, --message <MSG>Commit message for the changes
--stageStage changes without committing
--jsonOutput in JSON format

Dot-path notation for

The --service-config flag uses dot-path notation to specify nested configuration values:

The format is: --service-config <SERVICE_NAME> <DOT.PATH.TO.PROPERTY> <VALUE>

Options for

FlagDescription
-e, --environment <ENV>Environment to show configuration for (defaults to linked environment)
--jsonOutput in JSON format

Config examples

Show configuration for the current environment:

Show configuration for a specific environment:

Output as JSON: