[email protected]

How-to · PaaS & Cloud Exit

Migrate Railway to Coolify or private infrastructure

Editorial note: This guide was written to the best of our knowledge at the time of publication. Versions, commands, features, prices and licensing terms may change through vendor updates; the current information from the respective provider applies. Please verify critical steps independently before production use. All trademarks, product names and company names mentioned belong to their respective owners. As a rule, WZ-IT is not a partner of the vendors and projects mentioned and is not officially affiliated with them; existing partnerships are stated explicitly. This text does not replace individual professional, legal or tax advice. If any information is outdated or incorrect, please write to [email protected].

Do you want to replace Railway while retaining a Git-based workflow? WZ-IT provides PaaS migration from EUR 1,990 excluding VAT to Coolify, Docker or another controllable target architecture.

A migration from Railway to Coolify or private infrastructure involves more than the application container. Railway organises projects, environments, services, variables, domains, volumes and data products as one platform. Every capability in actual use must be mapped deliberately on the target.

Inventory Railway resources completely

The inventory starts with the production Railway project, not only the repository:

  • projects and environments such as production and staging
  • services built from Git repositories or container images
  • build and start commands, ports and health checks
  • variables and references between services
  • public and private domains
  • volumes, mount paths and actual data
  • PostgreSQL, MySQL, Redis and other data services
  • workers, cron jobs and coupled background processes
  • deployment triggers, branches and rollback behaviour

Railway can hold configuration outside the repository. A successful local start therefore does not prove that all production variables, service addresses and platform assumptions are known.

Transfer variables and service connections

Capture variables by environment and service. Reference variables that inherit values from other Railway services deserve special attention. On the target they may become:

  • internal DNS names in a Docker network
  • explicit database or Redis connections
  • environment variables managed through Coolify
  • secrets from a separate secret-management system

Do not export and reuse sensitive values blindly. API keys, database passwords and webhook secrets can be rotated during cutover. Applications and external integrations then need a coordinated switch to the new values.

Map services to Coolify or Docker

Classify each Railway service as an application, worker, scheduled job or data service. Build and runtime need separate validation:

Railway layer Possible target mapping
Git service Coolify application with Git deployment
Container image image-based Coolify or Docker service
Worker separate process without a public endpoint
Cron job platform scheduler or controlled system timer
Private domain internal service name in the target network
Public domain reverse proxy, DNS and TLS
Volume persistent target volume with a backup path
Database managed or dedicated database instance

Coolify is the possible platform layer for builds and deployments. The server can run with a German or European provider, in a customer data centre or in another suitable environment.

A target option is Coolify on a server from a provider such as Hetzner. Select the location in advance. The platform comparison discusses alternatives; the Coolify operating comparison covers costs and data location.

Build: Railpack, Nixpacks or Dockerfile in Coolify

Coolify offers Railpack (Beta), Nixpacks and Dockerfile build strategies. Transfer the Railway choice deliberately: check detected runtime, build and start commands, system packages and port. A Dockerfile makes the steps explicit. Validate a build from a defined commit on the target before cutover; successful detection alone is not acceptance.

Migrate databases and volumes

Plan persistence independently of application deployment. For relational databases, dump and restore, native exports or replication for larger write-active systems are safer than copying a live data directory.

For each volume determine:

  1. Which files are authoritative?
  2. Can the application write during export?
  3. Which users, groups and permissions does it expect?
  4. How will count, size and checksums be validated?
  5. How will the target volume be backed up and restored?

An initial deployment can use an older data set for testing. Move the final state only during the agreed cutover window.

Postgres: dump and restore

Create an empty PostgreSQL resource in Coolify and check client version and extensions. Connect through a protected tunnel and provide credentials via protected environment variables or password-protected service configuration.

pg_dump --format=custom --no-owner --no-acl --dbname="$SOURCE_DATABASE_URL" --file=source.dump
pg_restore --list source.dump
pg_restore --no-owner --no-acl --exit-on-error --dbname="$TARGET_DATABASE_URL" source.dump

Compare source and target versions, available extensions, row counts per table, sequences and business queries. Produce the final dump after an agreed write freeze; activate target workers and jobs deliberately. Retain the source for rollback. Commands: pg_dump, pg_restore.

Retain Git deployment, staging and production

A push can still trigger a build and deployment after migration. Define the delivery path explicitly:

  • production branch or tag
  • separate variables and data access for staging
  • versioned build and start configuration
  • health check and abort criterion
  • approval before production rollout
  • rollback to an earlier image or deployment

Preview environments are possible, but require rules for secrets, data access, domains and automatic clean-up.

Rehearsal and cutover

Validate the target under a test domain before switching. Cover login, critical user journeys, workers, cron jobs, uploads, email, webhooks, restart, logs, monitoring and backups. Only then transfer final data and DNS.

If the target architecture, dependencies or migration order are unclear, the PaaS Exit Review first provides a dependency map, target options and an actionable migration plan.

Use the PaaS exit checklist for acceptance and rollback.

Sources

Rather have it operated?

You'd rather not run PaaS & Cloud Exit yourself? WZ-IT handles setup, operations and maintenance - privacy-focused from Germany.

Enquiry

Assess a PaaS migration

Describe the source, application and intended target. We assess the migration path for runtime, data, delivery and ongoing operations.

  • You speak directly with Timo and Robin, who are technically responsible
  • A professional assessment of your situation
  • Concrete next steps for infrastructure, software or AI

The conversation is free and non-binding.

I recently worked with Timo and the WZ-IT team, and honestly, it turned out to be one of the best tech decisions I have made for my business. Right from the start, Timo took the time to walk me through every step in a simple and calm way. No matter how many questions I had, he never rushed me. The results speak for themselves. With WZ-IT, we reduced our monthly expenses from $1,300 down to $250. This was a huge win for us.
Aleksandr ShulikoCTO, EVA Real Estate
Timo and Robin, founders of WZ-IT

Assess a PaaS migration

I recently worked with Timo and the WZ-IT team, and honestly, it turned out to be one of the best tech decisions I have made for my business. Right from the start, Timo took the time to walk me through every step in a simple and calm way. No matter how many questions I had, he never rushed me. The results speak for themselves. With WZ-IT, we reduced our monthly expenses from $1,300 down to $250. This was a huge win for us.
Aleksandr ShulikoCTO, EVA Real Estate

Frequently Asked Questions

Answers to the most important questions

Customers from mid-sized business, industry and the public sector, in Germany and internationally

Read client reviews