
Service
Manage Railway services—check deploy health, rename or icon services, link instances, or create Docker-backed services when the CLI has no create command.
Overview
service is an agent skill most often used in Operate (also Build integrations, Ship launch) that checks Railway service status and mutates or creates services via GraphQL when CLI coverage is insufficient.
Install
npx skills add https://github.com/railwayapp/railway-skills --skill serviceWhat is this skill?
- GraphQL serviceCreate when no CLI create exists—project.id and environment.id from railway status --json
- Status and health checks for “is my service deployed?”
- Rename services, change icons, and link alternate services
- Docker image as new service (advanced); local code creation defers to the new skill
- GitHub repo flow: new skill for empty service, then environment skill for source.repo via staged changes API
- serviceCreate GraphQL mutation documented with no CLI equivalent for create
Adoption & trust: 1.6k installs on skills.sh; 274 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You need to know if a Railway service is healthy or change its name, icon, or source wiring, but create-service and some updates are not exposed as simple CLI commands.
Who is it for?
Solo builders shipping on Railway who use agents to run railway status, rename services, or stand up Docker services after the project exists.
Skip if: Greenfield local scaffolding or first-time project setup—use the new skill instead; skip when you only need env vars without touching service records.
When should I use this skill?
User asks about service status, health, or deployments; wants rename, icon, or link changes; or needs Docker image service creation (not local code or raw GitHub repo setup).
What do I get? / Deliverables
You get JSON-backed project and environment context, actionable status answers, and either updated service metadata or a created service ready for environment skill configuration for GitHub repos.
- Service status and deployment health summary
- Updated service metadata or newly created service id/name
- Documented handoff to environment skill for GitHub source.repo
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Service lifecycle and health checks are canonical on Operate/infra because they answer “is it running in production?” after you have a Railway project. Infra is where you inspect deployments, mutate service metadata, and wire empty services before environment source configuration.
Where it fits
Ask whether the API service finished deploying before you flip DNS or announce a release.
Add a sidecar or worker from a published Docker image while the main app was created with the new skill.
Rename services and icons to match staging versus production naming right before go-live.
How it compares
Complements the new and environment Railway skills rather than replacing one-shot railway up from generic DevOps cheatsheets.
Common Questions / FAQ
Who is service for?
Indie builders and small teams on Railway who want an agent to answer deployment questions and perform service-level GraphQL operations safely with railway:* Bash.
When should I use service?
In Operate when checking health or renaming services; in Build when adding a Docker image service; after Ship when validating deploy state; use new + environment for GitHub source instead of this skill alone.
Is service safe to install?
It grants Railway CLI Bash access—review the Security Audits panel on this page and restrict agent permissions in CI before running mutations against production projects.
Workflow Chain
Then invoke: environment
SKILL.md
READMESKILL.md - Service
# 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 ```bash railway status --json ``` Extract: - `project.id` - for creating the service - `environment.id` - for staging the instance config ### Create Service Mutation ```graphql 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 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 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: 1. Create empty service: `serviceCreate(input: {projectId: "...", name: "my-service"})` 2. Use `environment` skill to configure source via staged changes API 3. Apply to trigger deployment ### After Creating: Configure Instance Use `environment` skill to configure the service instance: ```json { "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](references/variables.md). ## Check Service Status ```bash railway service status --json ``` Returns current deployment status for the linked service. ### Deployment History ```bash 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 | | CRAS