Migrate from Railway to your own servers
Move your Railway services, variables, cron schedules and Postgres database to Tenkai, step by step.
Last verified on 2 November 2026 against Railway's documentation. Report a mistake.
Your Railway services keep their repository, their variables and their Postgres data when they move to a cluster of servers you own. Tenkai charges your team one price, whatever the number of services.
What each part becomes
| On Railway | On Tenkai |
|---|---|
| Service with a public domain | Web application |
| Service without a domain | Worker |
| Service with a cron schedule | Scheduled job |
startCommand |
Entrypoint |
preDeployCommand |
Pre-deploy commands |
| Service variables | Variables |
| Shared variables | Environment variables |
${{Postgres.DATABASE_URL}} |
A binding |
| Postgres | PostgreSQL |
| Redis | Redis® or Valkey |
| Volume | Kept directory |
| PR environments | Pull request previews |
| Custom domains | Custom domains |
Before you start
You need a cluster with a project on it, as projects and clusters explains. Your CI builds the image of your app, so the cluster needs no Git builds.
Move your services
- Build the image in your CI. Add the Dockerfile of your framework's guide, such as Rails, Django, Node.js, Next.js or PHP, and put your
buildCommandin it as aRUNstep. Then add the workflow that publishes an image to GHCR on each push. - Create the web application. Add a web application, choose Container image and enter your image, such as
ghcr.io/acme/app:main. Tenkai setsPORT, so an app that listens on0.0.0.0:$PORTanswers as it does on Railway. - Copy the variables. Run
railway variable list --kvin the linked service. Wrap each value in single quotes, then paste the lines in the project's Variables with Edit as .env…. Leave outPORT, theRAILWAY_lines and the URLs of your Railway databases, because they describe the service on Railway. - Stop the writes. Stop the web services and cron services. Let your workers empty the queue, then stop them too.
- Copy Postgres. Turn on Public Access in the database's Settings → Networking. Add a PostgreSQL, choose From database under Initial data and paste the
DATABASE_PUBLIC_URL. Turn public access off once the copy ends. - Bind the databases. Bind the PostgreSQL to the web application, so it receives
DATABASE_URL. For Redis, add a Redis® and bind it, so the app receivesREDIS_URL. The new store starts empty, so sessions and other Redis data start over. - Add the workers, the pre-deploy command and the cron services. A service without a domain becomes a worker from the same image, with its start command as the entrypoint. The
preDeployCommandbecomes a pre-deploy command. A service with acronSchedulebecomes a scheduled job with the same expression, because both read cron in UTC. Bind the databases to each of them. - Deploy and point your domain. Deploy the web application, then the workers and scheduled jobs, and check the default address. Add each deploy hook to your workflow, as deploy from GitHub Actions explains. Then add your domain, replace Railway's CNAME with the one Tenkai shows and delete Railway's TXT record.
A service with a volume
That service becomes a web application that keeps a directory at the path where your app writes. Deploy it once, then bring the files over. Download them with railway volume files download / ./volume, put an archive of them at an HTTPS address, and download it into the directory from the application's terminal.
Sources
We read these pages on 2 November 2026.
- Railway, The basics and Config as code
- Railway, Variables and the variable command
- Railway, Pre-deploy command and Cron jobs
- Railway, PostgreSQL and Volumes
- Railway, Domains
Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd.
Something wrong in this guide?
Railway and Tenkai both change, so a step can go out of date. If a command fails or a step does not match what you see, tell us at [email protected]. Once you have an account, you can also choose “Report a bug” in your user menu, as the account guide explains. We fix the guide and reply to you.