← All playbooks
Hosting migration

Heroku → Railway

Move a Heroku application to Railway with explicit handling for process types, databases, add-ons, variables, storage, jobs, domains, observability, deployment behavior, and rollback.

Typical timeline10–20 business days35–70 hours active work
Statusneeds review
Source testedHeroku operational model reviewed 2026-07-19
Destination testedRailway Heroku migration guide updated 2026-05-29
Last reviewed2026-07-19
Sources3
Before you migrate

Should you make this move?

Both platforms have a case. Compare what you gain with what you give up before scheduling the cutover.

Current platform

Heroku

Reasons to stay
  • Git-based deploys, buildpacks, and add-ons offer an exceptionally approachable platform
  • Managed deployments reduce infrastructure and release-management work
Reasons to leave
  • Pricing and infrastructure control become limiting as applications grow
  • Runtime assumptions, platform services, and pricing models shape the architecture
New platform

Railway

What gets better
  • Fast service and database provisioning gives developers a low-friction application platform
  • Managed deployments reduce infrastructure and release-management work
What gets worse
  • Usage pricing and infrastructure abstraction can become limiting at scale
  • Runtime assumptions, platform services, and pricing models shape the architecture
Best of the move

Railway: Fast service and database provisioning gives developers a low-friction application platform. This removes a major source-side concern: Pricing and infrastructure control become limiting as applications grow.

Worst of the move

What you lose: Git-based deploys, buildpacks, and add-ons offer an exceptionally approachable platform. What you inherit: Usage pricing and infrastructure abstraction can become limiting at scale.

01At a glance

Know the shape of the move.

Transfer outcome10 features audited
Transfer outcome distributionClean transfer: 1, Partial transfer: 3, Manual rebuild: 3, Not transferred: 3.
Clean1
Partial3
Manual3
Lost3
Mapping route8 of 8 fields have a destination path

This timeline assumes

  • One app with web, worker, scheduled jobs, Postgres, and common add-ons.
  • The simple Railway guide supports one Procfile process; multi-process apps are modeled as services.
  • Ephemeral filesystem assumptions are removed.
  • Production data receives a tested backup and restore.
  • Heroku stays intact through a stable rollback window.
02Loss matrix

What survives the move.

“Partial” and “manual” are not footnotes. They are work that must be scheduled and verified.

ItemOutcomeImpactWhat happensMitigation
Application sourcecleancriticalRailway deploys the same repository or local source.Build the exact production commit.
Procfile web processpartialhighRailway supports Procfiles, but its simple guide notes one process.Create separate services for web, worker, and other processes.
Config varspartialcriticalRailway can import Heroku variables, but scope and generated values require review.Classify, rotate secrets, and validate service references.
Heroku PostgresmanualcriticalDatabase migration is separate from the simple app guide.Dump/restore or replicate with measured write freeze and reconciliation.
Add-onslostcriticalMarketplace resources and credentials do not transfer automatically.Choose and test one replacement per add-on.
Scheduled jobsmanualhighHeroku Scheduler configuration is not application source.Recreate timing, timezone, concurrency, and alerts.
Domains and TLSmanualcriticalCustom domains and certificates require destination setup and DNS cutover.Pre-provision hostname, TLS, and rollback records.
Buildpacks and stack behaviorpartialcriticalDetection, OS packages, release commands, and runtime versions can differ.Pin runtime and dependencies and test release phase behavior.
Logs, metrics, and alertslosthighHistorical operational data remains in Heroku/add-ons.Export required evidence and rebuild monitors.
Filesystem datalostcriticalRuntime local files are not a portable durable store.Move required files to object storage and verify references.
03Field and feature mapping

Where each thing goes.

SourceDestinationMethodNotes
Heroku appRailway projectmanualGroup related services.
web dynoWeb servicetransformSet start command and health check.
worker dynoWorker servicemanualSeparate from web.
Config varService/project variabletransformReview scope and rotate.
Heroku PostgresRailway Postgres or external databasemanualUse dump/restore or replication.
Add-onRailway service or external providermanualNo universal mapping.
Scheduler jobCron jobmanualPreserve timezone and concurrency.
Custom domainRailway domainmanualSwitch DNS after TLS passes.
04Before you begin

Make the move recoverable.

Backup procedure

Create the source-of-truth backup

Preserve code, data, configuration, add-on state, and recovery evidence.

  1. Inventory dynos, processes, releases, buildpacks, vars, databases, add-ons, domains, drains, jobs, storage, and integrations.
  2. Tag the production commit and export configuration names.
  3. Create and restore-test database and file backups.
  4. Export required logs, metrics, and add-on data.
  5. Record DNS and rollback values.

Proof to capture: A manifest covers every process, secret consumer, data store, job, domain, and integration with restore evidence.

Transformation · Railway project canvas

Service topology

Split Heroku process types into explicit Railway services.

  1. Map web, worker, release, and cron behavior.
  2. Set dependencies and health checks.
  3. Test scaling and restart.

Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.

Transformation · Provider-native export/import tools

Data and add-on replacement

Move durable state without hidden dependencies.

  1. Choose replacements.
  2. Rehearse data copy.
  3. Reconcile counts and application scenarios.

Proof to capture: Save the input, output, command or tool settings, warnings, and final item counts.

05Handle with care

The things most likely to hurt.

These are operating limits. Treat every “Stop if” condition as a blocked migration, not a suggestion.

Design

Only the web process moves

criticalpossible likelihood

Workers or release tasks are absent.

Consequence
Queues stop and deploys leave schema inconsistent.
Mitigation
Model every process explicitly.

Stop if: Any production process has no destination.

Cutover

Database writes diverge

criticalpossible likelihood

Both databases accept writes.

Consequence
Orders or records split.
Mitigation
Use one write authority and reconcile final delta.

Stop if: A write lands outside the declared primary.

Configuration

Imported variables expose or mis-scope secrets

criticalpossible likelihood

A service can read unrelated secrets.

Consequence
Credential exposure.
Mitigation
Rotate and scope variables per service.

Stop if: Any untrusted service reads production secrets.

06Precise timeline

Do the work in this order.

Estimate forOne multi-process app with Postgres and common add-ons
Total elapsed10–20 business days
Active work35–70 hours
BufferAdd time for large databases, private networking, or complex add-ons.
01
Days 1–3Inventory3 days
02
Days 4–5Backup and restore2 days
03
Days 6–10Build destination5 days
04
Days 11–14Cutover rehearsal4 days
05
Days 15–20Freeze and observe3–6 days
  1. Days 1–3 · inventory

    Inventory

    10–16 hours active3 days elapsedOwner review waiting
    • Inventory topology and state.
    • Choose replacements and rollback.

    Depends on: Heroku and Railway admins

    Stop / go checkpoint

    Build?

    Go when: Every process and store is mapped.

    Stop when: Critical state or add-on is unknown.

  2. Days 4–5 · backup

    Backup and restore

    6–10 hours active2 days elapsedBackup transfer waiting
    • Create backups.
    • Run restore drill.

    Depends on: Inventory

    Stop / go checkpoint

    Pilot?

    Go when: Data restores and manifests reconcile.

    Stop when: Recovery fails.

  3. Days 6–10 · pilot

    Build destination

    12–22 hours active5 days elapsedBuilds and DNS waiting
    • Deploy services and variables.
    • Restore data and add-ons.
    • Test jobs and health.

    Depends on: Backup

    Stop / go checkpoint

    Rehearse?

    Go when: All scenarios and monitors pass.

    Stop when: Any process or state is wrong.

  4. Days 11–14 · rehearse

    Cutover rehearsal

    4–9 hours active4 days elapsedData copy timing waiting
    • Measure final data copy.
    • Practice DNS and rollback.
    • Load-test critical paths.

    Depends on: Pilot

    Stop / go checkpoint

    Cut over?

    Go when: Window and rollback meet target.

    Stop when: Data loss or downtime exceeds approval.

  5. Days 15–20 · cutover

    Freeze and observe

    3–13 hours active3–6 days elapsedDNS and production signals waiting
    • Freeze writes.
    • Copy final data.
    • Switch DNS and jobs.
    • Observe.

    Depends on: Rehearsal

    Stop / go checkpoint

    Close rollback?

    Go when: Data, traffic, jobs, and alerts pass.

    Stop when: Critical errors or divergence appears.

07The point of change

Cut over with a way back.

Go live

Cutover

Move production traffic and writes to Railway with one authoritative datastore.

Recommended window: A low-traffic morning with database and application owners staffed.

  1. Freeze deploys and writes.
  2. Create final backups and copy data.
  3. Deploy the approved commit.
  4. Switch domains, jobs, workers, and integrations.
  5. Run smoke and reconciliation checks.
  6. Keep Heroku scaled and recoverable.

Proof to capture: Railway serves production, data reconciles, workers/jobs run once, and monitors pass.

Return to safety

Rollback

Return traffic and writes to Heroku.

Deadline: Before the rollback data window closes, normally within hours.

  1. Stop Railway writes and jobs.
  2. Capture destination deltas.
  3. Restore or apply approved data to Heroku.
  4. Restore DNS, workers, scheduler, and integrations.
  5. Run smoke checks.

Proof to capture: Heroku again owns traffic and data with current approved records.

Rollback immediately when
  • Data mismatch
  • Critical process absent
  • Error or latency threshold exceeded
  • Job duplication
  • Secret/access failure
08Verification report

Prove the migration worked.

Every blocking check must pass. Capture the evidence before cleanup begins.

0%
Interactive report preview0 / 8 checks passed
PassIDCheckMethodExpected resultEvidence
V-01BlockingProduction commitCompare release SHA and dependencies.Exact approved source.Release record.
V-02BlockingWeb, worker, release, cronExercise each process.One healthy instance path.Process log.
V-03BlockingDatabase reconciliationCompare counts, checksums, and scenarios.No unexplained variance.Data report.
V-04BlockingReplacement behaviorTrigger each dependency.Approved result.Dependency log.
V-05BlockingVariables and secretsAudit scope and runtime access.Least privilege and correct values.Config audit.
V-06BlockingDNS and TLSResolve and inspect certificates.Correct target and valid TLS.DNS/TLS output.
V-07BlockingLogs and alertsGenerate known events.Logs arrive and alerts fire once.Alert log.
V-08BlockingRollbackRun rehearsal or isolated restore.Recovery meets target.Recovery report.
09Post-migration cleanup

Remove the scaffolding safely.

Safe after: Seven stable days and one successful deploy plus scheduled-job cycle.

  1. Archive backups and evidence.
  2. Revoke Heroku tokens and drains.
  3. Remove obsolete add-ons only after retention review.
  4. Keep Heroku intact through rollback window.
  5. Update operations documentation.
  6. Schedule restore and secret reviews.
Sources and maintenance

Built to be reviewed.

Tested 2026-07-19. Next scheduled review: 2026-10-19.

  1. Railway: migrate from HerokuAccessed 2026-07-19
  2. Heroku: export Postgres dataAccessed 2026-07-19
  3. Railway: databasesAccessed 2026-07-19