service
railwayapp/railway-skills
Manage service status, properties, and create services from Docker images.
What is service?
This skill handles service management tasks like checking deployment status, renaming services, changing icons, linking services, and creating services from Docker images. Use it when users ask about service health, want to modify service properties, or deploy Docker images; for local code projects, prefer the `new` skill instead.
- Check service status and deployment history with detailed status indicators
- Create new services via GraphQL API with Docker images or empty configurations
- Rename services and update service icons (images, GIFs, or Devicons)
- Link or switch between services in the current directory
- View deployment statuses (SUCCESS, FAILED, DEPLOYING, CRASHED, etc.)
How to install service
npx skills add https://github.com/railwayapp/railway-skills --skill service- Railway CLI installed and authenticated
- Project linked via `railway link` or `railway status` showing active project
- For GraphQL mutations: access to `scripts/railway-api.sh` helper
How to use service
- 1.Run `railway status --json` to get project and service context
- 2.For status checks: use `railway service status --json` to see current deployment state
- 3.For creating services: use GraphQL mutation with project ID and Docker image URL
- 4.For renaming: call serviceUpdate mutation with new name
- 5.For icons: use serviceUpdate with image URL or Devicons (e.g., `https://devicons.railway.app/github`)
- 6.For linking: run `railway service link` or `railway service link <service-name>`
Use cases
- Check if a service is deployed and view its current status
- Create a new service from a public Docker image like nginx or postgres
- Rename a service or update its icon for better organization
- Switch the linked service when working with multiple services in a project
- View recent deployment history and identify failed deployments
- Developers managing Railway services and deployments
- DevOps engineers deploying Docker images to Railway
- Teams needing to check service health and deployment status
service FAQ
Use this skill for checking status, renaming, changing icons, linking services, and deploying Docker images. Use the `new` skill for creating services with local code (the common case). For GitHub repos, use `new` to create an empty service, then `environment` skill to configure the source.
Extract your project ID with `railway status --json`, then call the serviceCreate GraphQL mutation with `projectId` and `source.image` (e.g., `nginx:latest`). Include `isCreated: true` when configuring the instance via the `environment` skill.
SUCCESS means deployed and running, FAILED means build or deploy failed, DEPLOYING is in progress, BUILDING is the build phase, CRASHED indicates a runtime error, and REMOVED means the deployment was deleted.
Yes, service icons accept image URLs including animated GIFs. You can also use Railway Devicons by querying `https://devicons.railway.app/{query}` (e.g., `github`, `postgres`, `nodejs`).
Run `railway service link` to select and link a service, or `railway service link <service-name>` to link a specific service by name.
Full instructions (SKILL.md)
Source of truth, from railwayapp/railway-skills.
name: service
description: This skill should be used when the user asks about service status, wants to rename a service, change service icons, link services, or create services with Docker images. For creating services with local code, prefer the new skill. For GitHub repo sources, use new skill to create empty service then environment skill to configure source.
allowed-tools: Bash(railway:*)
Service Management
Check status, update properties, and advanced service creation.
When to Use
- User asks about service status, health, or deployments
- User asks "is my service deployed?"
- User wants to rename a service or change service icon
- User wants to link a different service
- User wants to deploy a Docker image as a new service (advanced)
Note: For creating services with local code (the common case), prefer the new skill which handles project setup, scaffolding, and service creation together.
For GitHub repo sources: Use new skill to create empty service, then environment skill to configure source.repo via staged changes API.
Create Service
Create a new service via GraphQL API. There is no CLI command for this.
Get Context
railway status --json
Extract:
project.id- for creating the serviceenvironment.id- for staging the instance config
Create Service Mutation
mutation serviceCreate($input: ServiceCreateInput!) {
serviceCreate(input: $input) {
id
name
}
}
ServiceCreateInput Fields
| Field | Type | Description |
|---|---|---|
projectId | String! | Project ID (required) |
name | String | Service name (auto-generated if omitted) |
source.image | String | Docker image (e.g., nginx:latest) |
source.repo | String | GitHub repo (e.g., user/repo) |
branch | String | Git branch for repo source |
environmentId | String | If set and is a fork, only creates in that env |
Example: Create empty service
bash <<'SCRIPT'
scripts/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID"}}'
SCRIPT
Example: Create service with image
bash <<'SCRIPT'
scripts/railway-api.sh \
'mutation createService($input: ServiceCreateInput!) {
serviceCreate(input: $input) { id name }
}' \
'{"input": {"projectId": "PROJECT_ID", "name": "my-service", "source": {"image": "nginx:latest"}}}'
SCRIPT
Connecting a GitHub Repo
Do NOT use serviceCreate with source.repo - use staged changes API instead.
Flow:
- Create empty service:
serviceCreate(input: {projectId: "...", name: "my-service"}) - Use
environmentskill to configure source via staged changes API - Apply to trigger deployment
After Creating: Configure Instance
Use environment skill to configure the service instance:
{
"services": {
"<serviceId>": {
"isCreated": true,
"source": { "image": "nginx:latest" },
"variables": {
"PORT": { "value": "8080" }
}
}
}
}
Critical: Always include isCreated: true for new service instances.
Then use environment skill to apply and deploy.
For variable references, see reference/variables.md.
Check Service Status
railway service status --json
Returns current deployment status for the linked service.
Deployment History
railway deployment list --json --limit 5
Present Status
Show:
- Service: name and current status
- Latest Deployment: status (SUCCESS, FAILED, DEPLOYING, CRASHED, etc.)
- Deployed At: when the current deployment went live
- Recent Deployments: last 3-5 with status and timestamps
Deployment Statuses
| Status | Meaning |
|---|---|
| SUCCESS | Deployed and running |
| FAILED | Build or deploy failed |
| DEPLOYING | Currently deploying |
| BUILDING | Build in progress |
| CRASHED | Runtime crash |
| REMOVED | Deployment removed |
Update Service
Update service name or icon via GraphQL API.
Get Service ID
railway status --json
Extract service.id from the response.
Update Name
bash <<'SCRIPT'
scripts/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id name }
}' \
'{"id": "SERVICE_ID", "input": {"name": "new-name"}}'
SCRIPT
Update Icon
Icons can be image URLs or animated GIFs.
| Type | Example |
|---|---|
| Image URL | "icon": "https://example.com/logo.png" |
| Animated GIF | "icon": "https://example.com/animated.gif" |
| Devicons | "icon": "https://devicons.railway.app/github" |
Railway Devicons: Query https://devicons.railway.app/{query} for common developer icons (e.g., github, postgres, redis, nodejs). Browse all at https://devicons.railway.app
bash <<'SCRIPT'
scripts/railway-api.sh \
'mutation updateService($id: String!, $input: ServiceUpdateInput!) {
serviceUpdate(id: $id, input: $input) { id icon }
}' \
'{"id": "SERVICE_ID", "input": {"icon": "https://devicons.railway.app/github"}}'
SCRIPT
ServiceUpdateInput Fields
| Field | Type | Description |
|---|---|---|
name | String | Service name |
icon | String | Emoji or image URL (including animated GIFs) |
Link Service
Switch the linked service for the current directory:
railway service link
Or specify directly:
railway service link <service-name>
Composability
- Create service with local code: Use
newskill (handles scaffolding + creation) - Configure service: Use
environmentskill (variables, commands, image, etc.) - Delete service: Use
environmentskill withisDeleted: true - Apply changes: Use
environmentskill - View logs: Use
deploymentskill - Deploy local code: Use
deployskill
Error Handling
No Service Linked
No service linked. Run `railway service link` to link a service.
No Deployments
Service exists but has no deployments yet. Deploy with `railway up`.
Service Not Found
Service "foo" not found. Check available services with `railway status`.
Project Not Found
User may not be in a linked project. Check railway status.
Permission Denied
User needs at least DEVELOPER role to create services.
Invalid Image
Docker image must be accessible (public or with registry credentials).
Related skills
More from railwayapp/railway-skills and the wider catalog.
use-railway
Deploy and manage infrastructure on Railway: sign up, create projects, provision services, manage environments, and troubleshoot deployments.
central-station
Search Railway's Central Station community threads, discussions, and support knowledge base.
status
Check Railway project status, deployments, and services in your directory.
railway-docs
This skill should be used when the user asks about Railway features, how Railway works, or shares a docs.railway.com URL. Fetches up-to-date Railway docs to answer accurately.
deployment
This skill should be used when the user wants to manage Railway deployments, view logs, or debug issues. Covers deployment lifecycle (remove, stop, redeploy, restart), deployment visibility (list, status, history), and troubleshooting (logs, errors, failures, crashes, why deploy failed). NOT for deleting services - use environment skill with isDeleted for that.
deploy
This skill should be used when the user wants to push code to Railway, says "railway up", "deploy", "deploy to railway", "ship", or "push". For initial setup or creating services, use new skill. For Docker images, use environment skill.