railway

Railway commands applicable and useful for this project

⭐2stars🔀0forks📁View on GitHub🕐Updated Jan 7, 2026

When & Why to Use This Skill

This Claude skill provides a comprehensive interface for managing applications on the Railway platform. It streamlines DevOps workflows by enabling direct execution of deployment commands, real-time log monitoring with advanced filtering, and precise environment variable management. By integrating Railway CLI capabilities, it helps developers maintain high availability and observability for their cloud-hosted services.

Use Cases

  • Streamlining application deployment to specific Railway services using the 'railway up' command to ensure rapid delivery.
  • Debugging production issues by streaming real-time logs and using grep to filter for specific error patterns or service events.
  • Managing sensitive environment variables and AWS credentials to ensure secure and consistent service configuration across environments.
  • Optimizing infrastructure maintenance by distinguishing between process restarts and full container redeploys to protect non-persistent data.
namerailway
descriptionRailway commands applicable and useful for this project

Railway commands for deploying and managing the personalist application.

Commonly Used Commands

Deploy

railway up --service personalist

Deploy the current codebase to Railway's personalist service.

View Logs

railway logs --service personalist

Stream logs from the personalist service. Use with grep/tail to filter:

railway logs --service personalist 2>&1 | grep "S3" | tail -20
railway logs --service personalist 2>&1 | tail -50

Manage Environment Variables

railway variables --service personalist

View or manage environment variables for the personalist service.

Service Management

railway service

Link to or select a service. Use when Railway commands show "No service could be found."

Important Notes

  • Always use --service personalist flag for service-specific commands
  • The railway status command does NOT support --service flag
  • Logs are streamed in real-time and can be piped to other commands
  • When grepping logs, use 2>&1 to include stderr: railway logs --service personalist 2>&1 | grep "pattern"

Restart vs Redeploy

Important distinction:

  • Restart: Restarts the process in the same container. Container filesystem is preserved (including non-volume paths).
  • Redeploy: Creates a new container from the image. Only mounted volumes persist; everything else is reset.

Implication: Any data stored outside the volume mount path (/app/data) will be lost on redeploy but retained on restart.

Current Service Configuration

  • Service Name: personalist
  • Region: AWS eu-north-1 (Europe Stockholm)
  • Port: 8080
  • Host: 0.0.0.0
  • Volume: /data (persistent storage for XTDB log)

Environment Variables (Production)

Application Variables

  • ADMIN_PASSWORD: Required for production mode
  • HOST: 0.0.0.0
  • PORT: 8080

AWS S3 Variables

  • AWS_ACCESS_KEY_ID: AWS credentials for S3 access
  • AWS_SECRET_ACCESS_KEY: AWS credentials for S3 access
  • AWS_REGION: eu-north-1
  • S3_BUCKET: personalist
  • S3_PREFIX: personalist/

Railway-Provided Variables

Railway automatically sets these variables:

  • RAILWAY_ENVIRONMENT: Current environment (e.g., "production")
  • RAILWAY_SERVICE_NAME: Service name (e.g., "personalist")
  • RAILWAY_PROJECT_NAME: Project name
  • RAILWAY_VOLUME_MOUNT_PATH: Volume mount path (e.g., "/app/data")
  • RAILWAY_PUBLIC_DOMAIN: Public domain for the service

Use RAILWAY_ENVIRONMENT to detect if running on Railway (similar to FLY_APP_NAME for Fly.io).