Back to Blog
Guide10 min read2026-07-07

How to Migrate from Railway to PandaStack

Railway's plugins and usage billing are great for prototypes but can get unpredictable at scale. Here's how to move services, databases, and variables to flat-rate, container-based PandaStack.

Ajay Kumar
Ajay Kumar
Founder & DevOps, PandaStack

Why move

Railway nails the early experience: spin up a Postgres plugin, deploy a service, link them, done. The usual reasons teams migrate are billing predictability (Railway is [usage-based](https://railway.com/pricing), which can surprise you), wanting first-class managed databases instead of plugins, or needing platform features like SSO, RBAC, edge functions, and built-in analytics under one roof.

PandaStack is container-first like Railway, so the concepts map cleanly.

Concept mapping

RailwayPandaStack
ServiceContainer app
Postgres/MySQL/Redis pluginManaged database
VariablesEnv vars (auto-wired for attached DBs)
Reference variables (${{Postgres.DATABASE_URL}})Injected DATABASE_URL
Cron serviceCronjob
Railway domainsCustom domains + automatic SSL

Step 1: Export your config and variables

Use the Railway CLI to capture what you have:

railway login
railway variables   # list variables for the linked service

Write down every service, its start command, and which plugins it references. Railway's reference variables (like ${{Postgres.DATABASE_URL}}) become straightforward injected env vars on PandaStack.

Step 2: Confirm your start command and port

Railway autodetects via Nixpacks; PandaStack autodetects framework and build/start (with buildpacks for Node/Python/Go and more, or your own Dockerfile). Make sure your app binds to the injected $PORT:

const port = process.env.PORT || 8080;
app.listen(port, '0.0.0.0');

If you had a custom start command in Railway settings, set the same one in the PandaStack app config. Install command is overridable too (npm/yarn/pnpm/bun).

Step 3: Migrate plugin databases

Railway plugins expose a public connection string. Dump and restore into a PandaStack managed database of the matching engine:

# Postgres example
pg_dump --no-owner --no-acl "$RAILWAY_DATABASE_URL" -Fc -f db.dump
pg_restore --no-owner --no-acl -d "$PANDASTACK_DATABASE_URL" db.dump

For MySQL:

mysqldump --single-transaction --routines "$RAILWAY_DB" > dump.sql
mysql "$PANDASTACK_DB" < dump.sql

PandaStack managed databases (PostgreSQL, MySQL, MongoDB, Redis via KubeBlocks) support scheduled and manual backups, so set a backup policy right after restore.

Step 4: Wire the database automatically

The big DX win: attach the managed database to your app and DATABASE_URL is injected. You can delete the Railway-style reference variable plumbing — there's nothing to template.

Step 5: Connect Git and deploy

Connect your repo in the dashboard. On push, PandaStack builds in an ephemeral K8s Job pod (rootless BuildKit), pushes the image to Google Artifact Registry, and Helm-deploys it with live logs.

git push origin main
# Push code. It runs.

Step 6: Recreate cron and multi-service setups

If you ran scheduled jobs as Railway cron services, recreate them as PandaStack cronjobs with the same schedule. Multi-service projects (API + worker + frontend) map to multiple PandaStack apps in the same org, all able to share managed databases.

Step 7: Variables, domains, cutover

Recreate non-database variables in the dashboard with identical names. Add your custom domain (automatic SSL via Cloudflare DNS + Kong ingress). Validate on the PandaStack URL, lower TTL, then repoint DNS. Keep Railway running until propagation completes.

Honest trade-offs

  • Plugin breadth: Railway's template/plugin marketplace is broad and fast to click together. PandaStack focuses on first-party managed databases and a curated set of integrations; the ecosystem is younger.
  • Cold starts: PandaStack free-tier apps scale to zero on spot nodes — first request after idle is slower. Paid tiers run warm.
  • Free-tier DB size: dev/hobby storage, not production-scale.

What you gain: predictable flat pricing (Free $0, Pro $15/mo, Premium $25/mo, Enterprise custom) instead of metered surprises, server-side metrics + analytics without a client SDK, SSO/RBAC/teams, edge functions on every tier, and rollbacks with deploy history (10 days free, up to 90 on Premium).

References

  • [Railway pricing](https://railway.com/pricing)
  • [Railway CLI documentation](https://docs.railway.com/reference/cli-api)
  • [PostgreSQL pg_dump documentation](https://www.postgresql.org/docs/current/app-pgdump.html)
  • [MySQL mysqldump documentation](https://dev.mysql.com/doc/refman/8.0/en/mysqldump.html)

---

If you like Railway's container model but want flat pricing and first-class managed databases, the move is mostly a dump/restore plus a repo connect. Start on PandaStack's [free tier](https://dashboard.pandastack.io) and run both side by side before cutting over.

Ready to deploy?

Start free on PandaStack.

Start free on PandaStack

More in Guide

Browse all Guide articles →

See also