railway-deploy
БесплатноБез исполняемых скриптовНе проверенDeploys and manages apps on Railway with the Railway CLI: project setup, deploys, services, databases, environment variables, logs and scaling. Use when a…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Railway Deploy
Overview
Deploy, manage, and monitor applications on Railway from the terminal. This skill covers the CLI lifecycle: project setup, service configuration, environment variables, deployments, scaling, logs and debugging. It was checked against Railway CLI 5.63.1 and docs.railway.com (October 2026).
The CLI has no rollback command. Rolling back means redeploying an earlier deployment from the dashboard, or redeploying a known-good commit (see Task H).
Instructions
Task A: Project Setup & Linking
Install the CLI with a package manager if railway is missing:
npm i -g @railway/cli # or: brew install railway / scoop install railway
Check whether the directory is already linked:
railway status
Otherwise create or link a project:
railway init --name orders-api # create a project and link this directory
railway link # or link an existing project
railway login --browserless # device-code sign-in on SSH or headless machines
Confirm project, service and environment with railway status. For CI, skip login and export a token (create it in the dashboard, store it as a CI secret):
RAILWAY_TOKEN="$RAILWAY_TOKEN" railway up --ci --service orders-api # project token: deploys
RAILWAY_API_TOKEN="$RAILWAY_API_TOKEN" railway whoami # account token: account-level actions
Task B: Deploy
railway up # upload the directory and stream logs
railway up --detach # start the deploy and return immediately
railway up --ci # stream build logs only, then exit
railway up -s orders-api -e staging
railway redeploy # redeploy the latest deployment (same build inputs)
railway redeploy --from-source # pull the newest commit or image from the configured source
railway restart # restart without rebuilding
railway down # remove the most recent deployment (asks to confirm; -y skips)
railway deployment list --limit 5 # IDs and statuses of recent deployments
railway deploy is not the code-deploy command: it provisions a template (railway deploy --template postgres).
Task C: Services & Resources
railway add --database postgres # also: mysql, redis, mongo
railway add --service worker --repo orders-team/orders-worker
railway add --service cache --image redis:7
railway service list # services in this environment
railway service status # deployment status per service
railway scale eu-west=2 us-east=1 # replicas per region (max 50 total)
railway domain # generate a *.up.railway.app domain
railway domain shop.northwind-orders.com # custom domain; prints the DNS records to add
railway volume add --service orders-api --mount-path /data
railway volume list
railway delete removes a whole project, so never run it without the user's explicit confirmation.
Task D: Environment Variables
railway variable list --service orders-api
railway variable set LOG_LEVEL=info PORT=8080
echo "$STRIPE_SECRET" | railway variable set STRIPE_SECRET_KEY --stdin # keeps the value out of shell history
railway variable set FEATURE_FLAGS=beta --skip-deploys # change without triggering a deploy
railway variable delete OLD_API_KEY
By default setting a variable triggers a new deploy. variable list --json and --kv print raw secret values, so do not paste their output into chats or tickets. Services in the same project can reference each other's values with ${{Postgres.DATABASE_URL}} syntax in the dashboard instead of copying them.
Task E: Environments
railway environment list
railway environment new staging
railway environment create staging --duplicate production # copy production's config
railway environment staging # switch the linked environment
railway environment delete staging --yes
Task F: Logs & Debugging
railway logs # stream the latest deployment's logs
railway logs --build # build logs
railway logs -n 100 # last 100 lines (disables streaming)
railway logs --http # HTTP request logs; also --network and --dns
railway logs -s orders-api -e production --json
railway ssh # shell in the running container
railway connect postgres # database shell (needs psql, mongosh, etc. installed locally)
railway connect postgres --tunnel-only # tunnel for TablePlus, DBeaver, pgAdmin
Task G: Local Development
railway run --service orders-api -- npm run migrate # Railway flags go before the command
railway shell # subshell with Railway variables
railway run injects variables from the linked environment. Run against production only when the use
Установить railway-deploy в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл railway-deploy?
Deploys and manages apps on Railway with the Railway CLI: project setup, deploys, services, databases, environment variables, logs and scaling. Use when a user asks to deploy to Railway, check deployment status, set environment variables on Railway, view Railway logs, link a Railway project, add a database on Railway, scale a Railway service, manage Railway environments, redeploy, or run commands with Railway env vars.
Как установить скилл railway-deploy?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл railway-deploy запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub