← marketplace
devopsplatformsha:74dc70bb8c03fcb5manual

railway

Use when deploying and operating apps on Railway: linking projects, pushing code with the CLI, managing services, variables, and environments.

Install confidence
curl --create-dirs -fsSL https://skillmake.xyz/i/railway -o ~/.claude/skills/railway/SKILL.md
Pinned content
sha:74dc70bb8c03fcb5
Generated with
manual
Source
docs.railway.com

The file served at /api/marketplace/railway-74dc70bb/raw matches this hash. Inspect before install, then copy the command.

2,892 chars · ~723 tokens
---
name: railway
description: "Use when deploying and operating apps on Railway: linking projects, pushing code with the CLI, managing services, variables, and environments."
source: https://docs.railway.com
generated: 2026-07-02T18:43:11.269Z
category: platform
audience: devops
---

## When to use

- Deploying an app or service to Railway from the command line
- Linking a local repo to a Railway project and environment
- Managing environment variables and secrets across environments
- Inspecting logs and running commands against a deployed service

## Key concepts

### Project / Service / Environment

A project groups services (a deployable app, db, etc.); each project has environments like production and staging that hold separate variables and deployments.

### railway link

Associates the current directory with a specific project, environment, and service so subsequent CLI commands target the right resources.

### railway up

Uploads the current directory and triggers a build+deploy, using Nixpacks or a Dockerfile if present.

### Variables

Per-environment env vars injected at runtime; reference other services' values with shared/reference variables instead of hardcoding.

### Nixpacks

Railway's default builder that auto-detects the language and builds an image without a Dockerfile.

### railway run

Runs a local command with the linked environment's variables injected, useful for migrations and one-off scripts.

## API reference

```
railway login
```

Authenticate the CLI against your Railway account via browser.

```
railway login
```

```
railway link
```

Link the current directory to a project, environment, and service interactively.

```
railway link
```

```
railway up [--detach]
```

Build and deploy the current directory to the linked service.

```
railway up --detach
```

```
railway variables --set KEY=value
```

Set environment variables on the linked service/environment.

```
railway variables --set "NODE_ENV=production"
railway run npm run migrate
railway logs
```

## Gotchas

- You must `railway link` before `railway up`, `run`, or `variables`, or commands fail with no linked project.
- `railway up` deploys the current directory contents, not your latest git commit, so uncommitted local changes get shipped.
- Variables are scoped per environment; setting them in staging does not affect production.
- Without a Dockerfile, Nixpacks guesses the build; an unexpected runtime or start command usually means you need a railway.json or explicit start command.
- `railway run` injects remote variables locally, so be careful running destructive commands against production data.
- The legacy `railway` (Node) CLI and the newer Rust CLI differ in some flags; match commands to your installed version.

---
Generated by SkillMake from https://docs.railway.com on 2026-07-02T18:43:11.269Z.
Verify against source before relying on details.

File: ~/.claude/skills/railway/SKILL.md