Migrate from Railway
This guide walks you through migrating your application from Railway to Zeabur. Railway and Zeabur share a similar Git-based deployment model, so the migration is straightforward.
Before You Begin
- A Zeabur account.
- Your application source code in a Git repository (GitHub).
- Access to your Railway dashboard.
Step 1: Connect Your Git Repository
Since Railway apps are typically connected to a Git repository, you can connect the same repo to Zeabur:
- Log in to the Zeabur dashboard.
- Create a new project and select a dedicated server (or purchase a new one).
- Click Add Service → Git and connect your GitHub account.
- Select the same repository your Railway service uses.
Zeabur auto-detects your project’s language, framework, and build configuration.
Step 2: Transfer Environment Variables
- In your Railway project, click on a service and go to the Variables tab. Click Raw Editor to copy all variables at once.
- In the Zeabur dashboard, click your service and go to the Variables tab.
- Use Bulk Edit to paste all your variables in one step.
Railway uses variable references like ${{Postgres.DATABASE_URL}} to link services. On Zeabur, the equivalent is ${POSTGRES_URI}. Replace Railway-style references with Zeabur’s variable syntax.
Step 3: Migrate Your Database
If you’re using Railway’s database services:
PostgreSQL
-
Export from Railway: open the Railway database service, go to the Data tab, and use the Dump feature. Or use
pg_dumpwith the Railway connection string:pg_dump "your-railway-postgres-url" > backup.sql -
Create on Zeabur: click Add Service → Database → PostgreSQL.
-
Import:
psql "your-zeabur-postgres-connection-string" < backup.sql
MySQL
-
Export from Railway:
mysqldump -h railway-host -u root -p railway_db > backup.sql -
Create on Zeabur: click Add Service → Database → MySQL.
-
Import:
mysql -h zeabur-host -u root -p zeabur_db < backup.sql
Redis
-
Export from Railway:
redis-cli -u "your-railway-redis-url" --rdb dump.rdb -
Create on Zeabur: click Add Service → Database → Redis.
-
For most use cases, Redis is used as a cache and can be started fresh without importing data.
Step 4: Migrate Volumes
If your Railway service uses persistent volumes:
- Download your data from Railway. You can use Railway’s CLI or access the volume through the service’s shell.
- In the Zeabur dashboard, go to your service’s Volumes tab and click Add Volume.
- Specify the mount path (must match what your application expects).
- Upload your data via the service shell or let the application regenerate it.
There is no direct volume-to-volume transfer between Railway and Zeabur. You’ll need to manually export and import the data.
Step 5: Set Up Custom Domains
- In the Zeabur dashboard, click your service and go to the Networking tab.
- Click Generate Domain for a free
.zeabur.appsubdomain, or click Custom Domain to add your own. - Update your DNS records:
- Remove the old Railway CNAME record.
- Add a CNAME record pointing to the Zeabur-provided target.
Step 6: Verify and Go Live
- Push a commit to trigger a deployment, or click Redeploy in the dashboard.
- Check the Logs tab to confirm your app starts correctly.
- Test database connectivity and all key application flows.
- Once verified, switch your production DNS to Zeabur.
Key Differences: Railway vs Zeabur
| Feature | Railway | Zeabur |
|---|---|---|
| Deployment | Git push (auto-deploy) | Git push (auto-deploy) |
| Variable references | ${{Service.VAR}} | ${VAR} |
| Databases | Built-in Postgres, MySQL, Redis, MongoDB | Database services with the same options + more |
| Volumes | Per-service volumes | Per-service volumes |
| Scaling | Manual replica count | Manual resource allocation |
| Dedicated servers | Not available | Available (bare-metal options) |
| Templates | Railway templates | Zeabur Templates |
| AI services | Not available | AI Hub for model inference |
| Pricing | Usage-based + subscription | Usage-based, pay for what you use |
That’s it. Your Railway application is now running on Zeabur. The two platforms have a very similar developer experience, so you should feel right at home. If you run into any issues, reach out on our community forum.