Migration Guides
Guide

Migrating from Railway

Move your Railway projects to Grid. Same Docker workflow, your own infrastructure, 80%+ cost reduction.

Before you start: Ensure Grid is installed and running. See the Installation Guide if you haven't set it up yet.

Key Differences

CapabilityRailwayGrid
Pricing ModelUsage-based (RAM/CPU minutes)Flat rate (you pay your VPS provider)
Storage CostVolumes in beta, expensive at scaleIncluded, any size
Database HASingle instance (no HA)Patroni HA with automatic failover
Multi-CloudGCP-lockedAny provider (AWS, GCP, Azure, bare metal)
AI DiagnosticsNoneBuilt-in (Z-Score + LLM)

Migration Steps

1. Export your Railway data

  • Export Railway Postgres databases via pg_dump
  • Download Railway volume snapshots
  • Export Redis data from Railway Redis plugin
  • Copy environment variables from Railway dashboard

2. Keep your Dockerfile — no changes needed

Railway and Grid both use standard Docker containers. Your existing Dockerfile and railway.json will work on Grid with minimal changes. The Nixpacks builder also auto-detects your language.

3. Deploy to Grid

  1. Connect your GitHub repository to Grid
  2. Create a new service — your repo will be auto-detected
  3. Set environment variables (copy from Railway)
  4. Click Deploy

4. Migrate your database

# Export from Railway
pg_dump --no-owner postgresql://railway:...@... > backup.sql

# Import to Grid's managed Postgres
psql postgresql://grid:...@... < backup.sql

5. Configure addons

Grid includes managed addons that replace Railway plugins:

  • PostgreSQL — included, with Patroni HA replication
  • Redis — included, for caching and pub/sub
  • Persistent Volumes — included, any size
  • Custom Domains — included, with auto-SSL

6. Point your domain

Update your DNS A record to point to your Grid server IP. Caddy automatically provisions Let's Encrypt SSL certificates — no manual cert management.

What changes in your workflow

  • railway upgit push or Grid CLI
  • railway run → Grid's web dashboard or API
  • RAILWAY_* env vars → no longer needed (Grid provides GRID_* equivalents)
  • Same Docker workflow — your existing containers run unmodified

What you gain

  • 80%+ cost reduction at scale — Railway's usage markup adds up fast
  • Predictable pricing — flat server cost, not per-minute billing
  • Multi-cloud flexibility — deploy across providers or migrate freely
  • Database HA — automatic failover, not a single point of failure
  • Built-in AI diagnostics — automatic root cause analysis for failures