create-environment
Generate a new Railway environment for the linked project, with options to duplicate an existing environment and configure service variables for streamlined setup.
Instructions
Create a new Railway environment for the currently linked project. Optionally duplicate an existing environment and set service variables.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
duplicateEnvironment | No | The name of an existing environment to duplicate | |
environmentName | Yes | The name for the new environment | |
serviceVariables | No | Service variables to assign in the new environment (only works when duplicating) | |
workspacePath | Yes | The path to the workspace where the environment should be created |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"duplicateEnvironment": {
"description": "The name of an existing environment to duplicate",
"type": "string"
},
"environmentName": {
"description": "The name for the new environment",
"type": "string"
},
"serviceVariables": {
"description": "Service variables to assign in the new environment (only works when duplicating)",
"items": {
"additionalProperties": false,
"properties": {
"service": {
"description": "The service name or UUID",
"type": "string"
},
"variable": {
"description": "The variable assignment (e.g., 'BACKEND_PORT=3000')",
"type": "string"
}
},
"required": [
"service",
"variable"
],
"type": "object"
},
"type": "array"
},
"workspacePath": {
"description": "The path to the workspace where the environment should be created",
"type": "string"
}
},
"required": [
"workspacePath",
"environmentName"
],
"type": "object"
}