Migrate from Railway to Render – Render Docs

Welcome! Let's move your Railway apps and datastores over to Render. You'll learn:

If you hit any bumps, don't hesitate to contact our support team at support@render.com.

Why migrate?

Developers who switch from Railway to Render consistently find benefits in the following areas:

Concept mapping

Railway and Render share many of the same concepts (projects, services, custom domains, cron jobs), so much of the platform will feel familiar. Here are the key differences to keep in mind:

For a full feature-by-feature comparison, expand the mapping below:

Compute
Railway Render
Service Service
Usage-based compute (vCPU/RAM per plan) Compute plan ( free, 1c-2g, etc.)
Service with public domain Web service
Service without public domain Private service or background worker
Cron job (scheduled service) Cron job
Service variables Environment variables
Shared variables Environment groups
Deployment
Railway Render
Railpack auto-build / custom build command Build command
Custom start command / Procfile web process Start command
Pre-deploy command Pre-deploy command
Healthcheck endpoint Health check path
Zero-downtime deploys (deployment overlap) Zero-downtime deploys
This is the default behavior for Render services.
GitHub auto-deploy on push Auto-deploy on push
Environments (production, staging, PR) Preview environments
Storage
Railway Render
Volumes (persistent storage mounted to a service) Disks (persistent storage mounted to a service)
Networking
Railway Render
Private networking (*.railway.internal) Private network
Railway-provided domain (*.railway.app) Render subdomain (*.onrender.com)
Custom domains Custom domains
Observability
Railway Render
Log Explorer / deployment logs Log streams
Webhooks (Discord, Slack) Notifications
Datastores
Railway Render
Railway PostgreSQL (template) Render Postgres (fully managed)
Railway Redis (template) Render Key Value (fully managed, Redis®-compatible)
Infrastructure as Code
Railway Render
railway.json / railway.toml render.yaml (Blueprint)

1. Prepare to migrate

Now, let's make sure you have all the accounts and app details you need to migrate successfully.

Create your Render account

Signing up is fast and free:

Sign up for Render

Catalog your Railway resources

Open your Railway project and note the following for each service:

2. Recreate your app on Render

Next, let's spin up Render resources that correspond to your Railway services and datastores.

Create datastores

We recommend creating any necessary Render Postgres and Key Value instances before you deploy the apps that use them. This way, your apps can connect to those datastores on their very first deploy.

We won't move your existing data from Railway to Render yet.

We'll do this as part of the final migration process.

Follow these steps for each Railway PostgreSQL and Redis database service you want to move:

  1. In the Render Dashboard, click New > Postgres or New > Key Value:

  2. Specify the following:

    • Your datastore's name
    • The region where you want to host the datastore
    • Which compute plan to run on
  1. Click the Create button.

Render provisions your new datastore, and it becomes available within a minute or two.

  1. After your datastore becomes available, open its Info page in the Render Dashboard and click the Connect dropdown in the top right:

  2. Copy your datastore's internal URL. Your Render services will use this URL to connect to the datastore over a private network.

    • External clients (like your local development environment) can instead connect to the datastore via its external URL, which is available in the same dropdown.
  3. Repeat this set of steps for each Railway PostgreSQL and Redis database service you want to move.

Create services

Let's look at how to recreate your Railway services on Render.

Web services

If your Railway service has a public domain assigned, it receives HTTP traffic from the internet. On Render, this corresponds to a web service. Every web service receives an onrender.com subdomain, and you can add your own custom domains.

  1. In the Render Dashboard, click New > Web Service:

  2. Specify the following:

    • Your project repo and branch to deploy (from any supported Git provider)
    • Your app's language (Node.js, Python, etc.)
    • The region where you want to host the service
  1. Provide the commands that Render will use to build and run your code:
Command Value
Build Command Provide the same build command from your Railway service settings. Common examples include npm install for Node.js or pip install -r requirements.txt for Python.
If your Railway service used Railpack's auto-detected build command, provide the equivalent command explicitly.
Pre-deploy Command (optional) Provide the same pre-deploy command from your Railway service settings, if any.
Like Railway, Render runs the pre-deploy command before each deploy of your service. Use it to run database migrations and other setup tasks.
Start Command Provide the same start command from your Railway service settings.
Common examples include npm run start for Node.js and gunicorn your_application.wsgi for Python.

Here's an example of these commands for a Node.js app:

  1. Set any required environment variables for your web service:
    • **For datastore connections,**provide the internal datastore URLs you copied earlier.
  1. If your Railway service had a healthcheck endpoint configured, set the same path under your Render service's Health Check Path setting. Render pings this path and waits for a 200 response before routing traffic to a new deploy.

  2. If your Railway service used a volume for persistent storage, add a Render Disk to your service. Specify the same mount path you used on Railway. Note that Render Disks are per-service and not shared across services.

  3. Click Deploy Web Service.

You're all set! Render kicks off your service's first deploy. You can view the build logs in the Render Dashboard.

When the deploy completes, your service is live at its onrender.com subdomain. If you encounter any issues, see Troubleshooting Deploys.

Private services and background workers

If your Railway service runs continuously without a public domain, it might map to one of two Render service types:

If your Railway service is a queue processor or another non-request-driven process, create a Render background worker:

The steps for creating a background worker are similar to those for creating a web service. The key differences are:

For any Railway service that stays internal but still receives requests, create a private service instead. For any Railway service that runs jobs in the background, create a background worker and specify the appropriate build and start command.

Cron jobs

If your Railway service is configured with a cron schedule, it corresponds to a Render cron job. Railway and Render both use standard cron expressions for scheduling.

In the Render Dashboard, click New > Cron Job and provide the same schedule and start command from your Railway service settings.

Services do not share environment variables by default.

If your web service and background workers require some of the same environment variables, you can do one of the following:

3. Swap over to your Render infrastructure

With everything up and running on Render, we're ready to move your data and DNS configuration over from Railway.

This final step (moving your data and DNS configuration) requires downtime for your app, even if brief.

Schedule your migration for off hours to minimize the impact on your users.

Scale up your Render datastores

Before you move over your data, make sure your Render Postgres and Key Value instances have sufficient storage and compute resources to handle your current requirements. You can upgrade as needed in the Render Dashboard.

Render Postgres

Render Key Value

Stop your Railway services

Railway does not have a built-in maintenance mode. To stop your services from accepting traffic during the migration:

  1. In the Railway Dashboard, click on each service to open it.
  2. Find the active deployment and open its 3-dot menu.
  3. Click Remove to stop the deployment.

This stops your service entirely. Repeat for each service in your Railway project.

Removing a deployment stops all traffic to that service.

Unlike a maintenance mode, Railway does not display a maintenance page. Requests to your Railway domain fail until you either redeploy on Railway or point your DNS to Render.

Export data from Railway Postgres

  1. Confirm that TCP Proxy is enabled on your Railway Postgres service (it's enabled by default for Railway database templates).

  2. Get your public database connection URL.

In the Railway Dashboard, open your Postgres service and find the DATABASE_PUBLIC_URL variable.

  1. Create a backup of your database.
$ pg_dump "<YOUR RAILWAY DATABASE_PUBLIC_URL>" -F c -f railway_backup.dump

Import data into Render Postgres

  1. Obtain your Render Postgres database's External Database URL from its Info page in the Render Dashboard.

  2. Import railway_backup.dump into your Render Postgres database.

$ pg_restore --verbose --no-acl --no-owner -d <YOUR RENDER DB EXTERNAL CONNECTION STRING> railway_backup.dump

For large databases, consider using the --jobs flag with both pg_dump and pg_restore to speed up the process.

For example, pg_dump --jobs 4 and pg_restore --jobs 4 run four parallel workers.

Export and import Railway Redis data

If you're migrating a Railway Redis service to Render Key Value:

  1. Confirm that TCP Proxy is enabled on your Railway Redis service.

  2. Get your Railway Redis public connection URL from the Redis service's variables (REDIS_URL with the TCP Proxy host and port).

  3. Use redis-cli to export your data and import it into your Render Key Value instance:

$ redis-cli -u <YOUR RAILWAY REDIS PUBLIC URL> --rdb railway_redis.rdb
  1. Import the data into your Render Key Value instance using the Render Key Value external connection URL from the Render Dashboard:
$ redis-cli -u <YOUR RENDER KEY VALUE EXTERNAL URL> --pipe < railway_redis.rdb

Alternatively, if your dataset is small, you can use the DUMP and RESTORE commands to transfer keys individually.

Update your DNS records

If your Railway service uses a custom domain, follow the instructions to update your DNS configuration to point to Render instead of Railway. Apply each app's custom domain to the corresponding Render web service.

Note that it takes some time for your DNS changes to propagate, and for Render to then provision a TLS certificate for your domain.

Troubleshooting

If you run into issues during your migration, check the following first:

For more help with general deploy issues, see Troubleshooting Deploys.

Next steps

Congratulations! You've successfully migrated your Railway app to Render.

Next, explore more of Render's capabilities. Here are a few to get you started: