Skip to content
Home / Migrations / HerokuRailway

Heroku Railway

easy

Railway is the closest Heroku experience. Procfile compatible, auto-detect buildpacks, built-in Postgres.

Estimated: 1-3h · 5 steps
Progress0%
Step 1: Create Railway project

Sign up at railway.app, create new project from GitHub repo.

railway login && railway init
Step 2: Add database

Click 'New' → PostgreSQL in Railway dashboard. Connection string auto-injected as DATABASE_URL.

Step 3: Set environment variables

Copy env vars from Heroku. Railway: Settings → Variables.

heroku config -s | railway variables set
Step 4: Migrate database

pg_dump from Heroku, pg_restore to Railway.

heroku pg:backups:download && pg_restore -d $RAILWAY_DATABASE_URL latest.dump
Step 5: Update DNS

Add custom domain in Railway settings. Update DNS CNAME.

Site loads on custom domain
Get started with Railway