Railway authentication and token management. Use when logging into Railway, creating API tokens, setting up CI/CD authentication, or verifying Railway credentials.
68
83%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
The canonical home for this skill is railway-auth in fernandezbaptiste/Skrillz
Manage Railway authentication for CLI, API, and CI/CD workflows.
Railway supports multiple authentication methods for different use cases:
Standard browser-based authentication for local development.
Command:
railway loginProcess:
~/.railway/config.jsonVerification:
railway whoami
# Output: Logged in as: your-email@example.comUse When: Local development, first-time setup
Device code authentication for headless environments.
Command:
railway login --browserlessProcess:
Example Output:
To authenticate, visit: https://railway.app/cli-auth
Enter code: ABCD-1234
Waiting for authentication...Use When:
Use API tokens for programmatic access and CI/CD.
Token Types:
| Type | Scope | Header | Use Case |
|---|---|---|---|
| Account Token | All personal + team resources | Authorization: Bearer <TOKEN> | Full API access |
| Team Token | Team resources only | Team-Access-Token: <TOKEN> | Team automation |
| Project Token | Single environment | Project-Access-Token: <TOKEN> | Scoped deployments |
Creating Tokens:
CLI Authentication with Token:
# For Project Tokens
export RAILWAY_TOKEN=<your-project-token>
# For Account/Team Tokens
export RAILWAY_API_TOKEN=<your-account-or-team-token>
# Verify
railway whoamiAPI Authentication:
# Account Token
curl -H "Authorization: Bearer $RAILWAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { me { name email } }"}' \
https://backboard.railway.com/graphql/v2
# Project Token
curl -H "Project-Access-Token: $RAILWAY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { projectToken { projectId } }"}' \
https://backboard.railway.com/graphql/v2Use When: CI/CD pipelines, automation scripts, API integrations
Check current authentication status.
Commands:
# Check who you're logged in as
railway whoami
# Check current project context
railway status
# Verify token via API
curl -s -H "Authorization: Bearer $RAILWAY_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"query":"query { me { name } }"}' \
https://backboard.railway.com/graphql/v2Troubleshooting Auth Issues:
| Issue | Solution |
|---|---|
| "Not logged in" | Run railway login |
| "Not Authorized" (API) | Check token type matches header |
| Token expired | Create new token at railway.com/account/tokens |
| Wrong project context | Run railway link to re-link project |
name: Deploy to Railway
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Railway CLI
run: npm install -g @railway/cli
- name: Deploy
env:
RAILWAY_TOKEN: ${{ secrets.RAILWAY_TOKEN }}
run: railway up --ciSetup:
RAILWAY_TOKEN secret in GitHub repo settings--ci flag for non-interactive deploymentdeploy:
stage: deploy
image: node:20
script:
- npm install -g @railway/cli
- railway up --ci
variables:
RAILWAY_TOKEN: $RAILWAY_PROJECT_TOKEN
only:
- main| Task | Command |
|---|---|
| Login (browser) | railway login |
| Login (headless) | railway login --browserless |
| Check auth | railway whoami |
| Logout | railway logout |
| Set token (CLI) | export RAILWAY_TOKEN=xxx |
| API auth header | Authorization: Bearer <token> |
93ed392
Canonical home
since Sep 12, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.