Railway

App · 20 actions

Run your Railway apps from workflows: deploy, redeploy, restart and roll back services, read their logs, change their variables, and create projects and environments.

Actions

ActionWhat it does
Add public web addressGive a service a public web address on up.railway.app, so anyone can open it.
Create environmentCreate an environment, such as staging, empty or as a copy of another one's services and variables.
Create projectCreate an empty project with a production environment.
Create serviceAdd a service to a project from a Docker image or a GitHub repo, and deploy it.
Delete environmentDelete an environment and everything deployed in it.
Delete projectDelete a project with all its services, databases and environments.
Delete serviceDelete a service and its deployments, everywhere or from one environment.
Delete variableRemove one variable from a service.
Deploy serviceDeploy a service now: the latest commit of its GitHub repo (or a chosen one), or its Docker image.
Get deploymentGet a deployment's status, web address and commit, and why it failed if it did.
Get deployment logsGet the last lines a deployment's app or build printed, such as the error that made it fail.
Get projectGet a project with its environments and services, and whether each service is running.
List deploymentsList a service's recent deployments, newest first, optionally only failed or crashed ones.
List projectsList every project in the workspace, newest first.
List variablesList a service's variables.
Redeploy serviceBuild and deploy the same code again, as a new deployment.
Restart serviceRestart a service's running deployment without building it again.
Roll back serviceGo back to an earlier deployment.
Set variablesAdd or change a service's variables and redeploy it so they take effect.
Stop deploymentStop a service's running deployment, or cancel one that is still building or starting.

Add public web address

Give a service a public web address on up.railway.app, so anyone can open it.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Portportnumber
The port the app listens on. Leave blank to let Railway find it.From 1 to 65535.

Outputs

domaintext
The address, such as web-production.up.railway.app
domain_idtext
The address's id in Railway
environment_idtext
The environment
portnumber
The port it sends visitors to
service_idtext
The service
urltext
The address as a link
Example output
{
  "domain": "web-production-4c74b.up.railway.app",
  "domain_id": "0ae6f738-d6e7-429e-b07b-0b4c44620b33",
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "port": 80,
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
  "url": "https://web-production-4c74b.up.railway.app"
}

Create environment

Create an environment, such as staging, empty or as a copy of another one's services and variables.

Inputs

ProjectprojecttextRequired
The Railway project.
NamenametextRequired
The environment's name.
Copy fromcopy_fromtext
Start with this environment's services and variables. Leave blank for an empty environment.

Outputs

copied_fromtext
The environment it copies, if any
created_attext
When it was created
environment_idtext
The new environment
nametext
Its name
project_idtext
Its project
Example output
{
  "copied_from": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "created_at": "2026-10-19T21:31:20.004Z",
  "environment_id": "d84a766e-b025-480b-99a0-ea231055b182",
  "name": "staging",
  "project_id": "3997a405-8630-406a-8c50-5e1af74d0142"
}

Create project

Create an empty project with a production environment.

Inputs

NamenametextRequired
The project's name.
Descriptiondescriptiontext
What the project is for.

Outputs

environment_idtext
Its production environment
environment_nametext
That environment's name
projectobject
The new project
Example output
{
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "environment_name": "production",
  "project": {
    "created_at": "2026-10-19T21:27:01.112Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142",
    "description": null,
    "name": "billing-api",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "updated_at": "2026-10-19T21:27:01.112Z"
  }
}

Create service

Add a service to a project from a Docker image or a GitHub repo, and deploy it.

Inputs

ProjectprojecttextRequired
The Railway project.
Deploy fromsourcetextRequired
Where the service's code comes from.One of: image (Docker image), repo (GitHub repo). Default: image.
Docker imageimagetext
A public image, such as nginx:alpine or ghcr.io/owner/app:latest.Only when Deploy from is Docker image.
GitHub reporepotext
owner/app, or a github.com link. A private repo needs Railway's GitHub app to have access to it.Only when Deploy from is GitHub repo.
Branchbranchtext
Leave blank for the repo's default branch.Only when Deploy from is GitHub repo.
Namenametext
Leave blank to name it after the image or repo.
Environmentenvironmenttext
Leave blank for the project's main environment.
Variablesvariablesobject
Settings the service reads when it runs, such as PORT or API_URL.

Outputs

dashboard_urltext
The service in the Railway dashboard
deploymentobject
Its first deployment
environment_idtext
The environment it was deployed to
environment_nametext
That environment's name
nametext
Its name
project_idtext
Its project
service_idtext
The new service
Example output
{
  "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "deployment": {
    "branch": null,
    "can_redeploy": true,
    "can_roll_back": true,
    "commit": null,
    "commit_message": null,
    "created_at": "2026-10-19T21:40:50.173Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
    "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
    "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
    "environment_name": "production",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "reason": "deploy",
    "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
    "service_name": "web",
    "source": "traefik/whoami",
    "status": "INITIALIZING",
    "status_label": "Running",
    "updated_at": "2026-10-19T21:40:58.211Z",
    "url": "https://web-production-4c74b.up.railway.app"
  },
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "environment_name": "production",
  "name": "web",
  "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0"
}

Delete environment

Delete an environment and everything deployed in it. This can't be undone.

Inputs

ProjectprojecttextRequired
The Railway project.
EnvironmentenvironmenttextRequired
The environment to delete. The main environment can't be deleted.

Outputs

deletedtrue/false
Whether Railway deleted it
environment_idtext
The deleted environment
Example output
{
  "deleted": true,
  "environment_id": "d84a766e-b025-480b-99a0-ea231055b182"
}

Delete project

Delete a project with all its services, databases and environments. This can't be undone.

Inputs

ProjectprojecttextRequired
The Railway project.

Outputs

deletedtrue/false
Whether Railway deleted it
project_idtext
The deleted project
Example output
{
  "deleted": true,
  "project_id": "3997a405-8630-406a-8c50-5e1af74d0142"
}

Delete service

Delete a service and its deployments, everywhere or from one environment. This can't be undone.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Only in environmentenvironmenttext
Delete the service from this environment only. Leave blank to delete it everywhere.

Outputs

deletedtrue/false
Whether Railway deleted it
environment_idtext
The environment, when only one was chosen
service_idtext
The deleted service
Example output
{
  "deleted": true,
  "environment_id": null,
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0"
}

Delete variable

Remove one variable from a service.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
VariablevariabletextRequired
The name of the variable to remove.

Outputs

deletedtrue/false
Whether Railway removed it
environment_idtext
The environment
nametext
The variable
service_idtext
The service
Example output
{
  "deleted": true,
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "name": "FEATURE_FLAG",
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0"
}

Deploy service

Deploy a service now: the latest commit of its GitHub repo (or a chosen one), or its Docker image.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Commitcommittext
For a GitHub service, the commit to deploy. Leave blank for the latest one.

Outputs

deploymentobject
The new deployment
Example output
{
  "deployment": {
    "branch": null,
    "can_redeploy": true,
    "can_roll_back": true,
    "commit": null,
    "commit_message": null,
    "created_at": "2026-10-19T21:40:50.173Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
    "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
    "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
    "environment_name": "production",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "reason": "deploy",
    "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
    "service_name": "web",
    "source": "traefik/whoami",
    "status": "BUILDING",
    "status_label": "Running",
    "updated_at": "2026-10-19T21:40:58.211Z",
    "url": "https://web-production-4c74b.up.railway.app"
  }
}

Get deployment

Get a deployment's status, web address and commit, and why it failed if it did. Blank means the service's current deployment.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.

Outputs

deploymentobject
The deployment
errortext
Why it failed, in Railway's words, when it failed
Example output
{
  "deployment": {
    "branch": null,
    "can_redeploy": true,
    "can_roll_back": true,
    "commit": null,
    "commit_message": null,
    "created_at": "2026-10-19T21:40:50.173Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
    "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
    "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
    "environment_name": "production",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "reason": "deploy",
    "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
    "service_name": "web",
    "source": "traefik/whoami",
    "status": "SUCCESS",
    "status_label": "Running",
    "updated_at": "2026-10-19T21:40:58.211Z",
    "url": "https://web-production-4c74b.up.railway.app"
  },
  "error": null
}

Get deployment logs

Get the last lines a deployment's app or build printed, such as the error that made it fail.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.
LogslogstextRequired
What the app printed while running, or what the build printed.One of: app (App logs), build (Build logs). Default: app.
Lineslinesnumber
How many of the most recent lines.From 1 to 1000. Default: 100.
Containingsearchtext
Only lines containing this text, such as error.

Outputs

countnumber
How many lines
deployment_idtext
The deployment
lineslist
The lines
logstext
app or build
statustext
Its status
texttext
The lines as one block of text
Example output
{
  "count": 1,
  "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
  "lines": [
    {
      "message": "Starting Container",
      "severity": "info",
      "timestamp": "2026-10-19T21:40:53.503Z"
    }
  ],
  "logs": "app",
  "status": "SUCCESS",
  "text": "Starting Container"
}

Get project

Get a project with its environments and services, and whether each service is running.

Inputs

ProjectprojecttextRequired
The Railway project.

Outputs

environmentslist
Its environments
projectobject
The project
serviceslist
Its services, as they are in the main environment
Example output
{
  "environments": [
    {
      "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
      "is_main": true,
      "name": "production"
    }
  ],
  "project": {
    "created_at": "2026-10-19T21:27:01.112Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142",
    "description": null,
    "name": "billing-api",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "updated_at": "2026-10-19T21:27:01.112Z"
  },
  "services": [
    {
      "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec",
      "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
      "name": "web",
      "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
      "status": "SUCCESS",
      "status_label": "Running",
      "url": "https://web-production-4c74b.up.railway.app"
    }
  ]
}

List deployments

List a service's recent deployments, newest first, optionally only failed or crashed ones.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Statusstatuslist
Only deployments in these states. Leave blank for all.One or more of: SUCCESS (Running), FAILED, CRASHED, BUILDING, DEPLOYING, INITIALIZING (Starting), QUEUED, WAITING, NEEDS_APPROVAL (Needs approval), SLEEPING, and 3 more.
How manylimitnumber
How many deployments, newest first.From 1 to 100. Default: 20.

Outputs

countnumber
How many deployments
deploymentslist
The deployments
environment_idtext
The environment
service_idtext
The service
Example output
{
  "count": 1,
  "deployments": [
    {
      "branch": null,
      "can_redeploy": true,
      "can_roll_back": true,
      "commit": null,
      "commit_message": null,
      "created_at": "2026-10-19T21:40:50.173Z",
      "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
      "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
      "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
      "environment_name": "production",
      "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
      "reason": "deploy",
      "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
      "service_name": "web",
      "source": "traefik/whoami",
      "status": "SUCCESS",
      "status_label": "Running",
      "updated_at": "2026-10-19T21:40:58.211Z",
      "url": "https://web-production-4c74b.up.railway.app"
    }
  ],
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0"
}

List projects

List every project in the workspace, newest first.

Inputs

None.

Outputs

countnumber
How many projects
projectslist
The projects
Example output
{
  "count": 1,
  "projects": [
    {
      "created_at": "2026-10-19T21:27:01.112Z",
      "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142",
      "description": null,
      "name": "billing-api",
      "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
      "updated_at": "2026-10-19T21:27:01.112Z"
    }
  ]
}

List variables

List a service's variables. The ones Railway adds itself are listed apart.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.

Outputs

countnumber
How many of your variables
environment_idtext
The environment
railway_variablesobject
The variables Railway sets, such as its web address
service_idtext
The service
variablesobject
Your variables
Example output
{
  "count": 1,
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "railway_variables": {
    "RAILWAY_PUBLIC_DOMAIN": "web-production-4c74b.up.railway.app"
  },
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
  "variables": {
    "API_URL": "https://api.example.com"
  }
}

Redeploy service

Build and deploy the same code again, as a new deployment. Use it to pick up changed variables or retry a failed build.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.

Outputs

deploymentobject
The new deployment
redeployed_fromtext
The deployment it copied
Example output
{
  "deployment": {
    "branch": null,
    "can_redeploy": true,
    "can_roll_back": true,
    "commit": null,
    "commit_message": null,
    "created_at": "2026-10-19T21:40:50.173Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
    "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
    "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
    "environment_name": "production",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "reason": "deploy",
    "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
    "service_name": "web",
    "source": "traefik/whoami",
    "status": "INITIALIZING",
    "status_label": "Running",
    "updated_at": "2026-10-19T21:40:58.211Z",
    "url": "https://web-production-4c74b.up.railway.app"
  },
  "redeployed_from": "47407a53-1ba0-4e15-a105-d552c32cbad7"
}

Restart service

Restart a service's running deployment without building it again. Use it when the app is stuck.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.

Outputs

deployment_idtext
The restarted deployment
restartedtrue/false
Whether Railway accepted it
Example output
{
  "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
  "restarted": true
}

Roll back service

Go back to an earlier deployment. Leave Deployment blank to go back to the last one that worked before the current one.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.

Outputs

rolled_backtrue/false
Whether Railway accepted it
rolled_back_toobject
The deployment now being restored
Example output
{
  "rolled_back": true,
  "rolled_back_to": {
    "branch": null,
    "can_redeploy": true,
    "can_roll_back": true,
    "commit": null,
    "commit_message": null,
    "created_at": "2026-10-19T21:40:50.173Z",
    "dashboard_url": "https://railway.com/project/3997a405-8630-406a-8c50-5e1af74d0142/service/8b68fa86-5c75-44da-8768-abfeed29d4b0?environmentId=b2e76bd7-9145-47c1-b444-b73c01b589ec&id=58a5ecaa-d003-4852-927b-a3e547ef5088",
    "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
    "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
    "environment_name": "production",
    "project_id": "3997a405-8630-406a-8c50-5e1af74d0142",
    "reason": "deploy",
    "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0",
    "service_name": "web",
    "source": "traefik/whoami",
    "status": "REMOVED",
    "status_label": "Running",
    "updated_at": "2026-10-19T21:40:58.211Z",
    "url": "https://web-production-4c74b.up.railway.app"
  }
}

Set variables

Add or change a service's variables and redeploy it so they take effect. Other variables are left as they are.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
VariablesvariablesobjectRequired
Variables to add or change. Others are left as they are.
Redeploy nowredeploy_nowtrue/false
Redeploy the service so the change takes effect.Default: true.

Outputs

environment_idtext
The environment
nameslist
The variables set
redeployingtrue/false
Whether the service is redeploying
savedtrue/false
Whether Railway saved them
service_idtext
The service
Example output
{
  "environment_id": "b2e76bd7-9145-47c1-b444-b73c01b589ec",
  "names": [
    "API_URL"
  ],
  "redeploying": true,
  "saved": true,
  "service_id": "8b68fa86-5c75-44da-8768-abfeed29d4b0"
}

Stop deployment

Stop a service's running deployment, or cancel one that is still building or starting.

Inputs

ProjectprojecttextRequired
The Railway project.
ServiceservicetextRequired
The service in that project.
Environmentenvironmenttext
Leave blank for the project's main environment.
Deploymentdeploymenttext
Leave blank for the service's current deployment.

Outputs

actiontext
cancelled or stopped
deployment_idtext
The deployment
donetrue/false
Whether Railway accepted it
Example output
{
  "action": "stopped",
  "deployment_id": "58a5ecaa-d003-4852-927b-a3e547ef5088",
  "done": true
}

On this page