Migrate from Heroku to your own servers
Move a Heroku app to Tenkai with its Procfile processes, config vars, Heroku Postgres database and Heroku Scheduler jobs, step by step.
Last verified on 2 November 2026 against Heroku's documentation. Report a mistake.
Your Heroku app keeps its Procfile, its config vars and its Postgres data when it moves to a cluster of servers you own. Tenkai charges your team one price, whatever the number of apps.
What each part becomes
| On Heroku | On Tenkai |
|---|---|
web process |
Web application |
Other process types, such as worker |
Workers |
release process |
Pre-deploy commands |
| Config vars | Variables |
| Heroku Postgres | PostgreSQL |
| Heroku Key-Value Store | Redis® or Valkey |
| Heroku Scheduler | Scheduled jobs |
| Review apps | 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 app
- Build the image in your CI. Add the Dockerfile of your framework's guide, such as Rails, Django, Node.js, Next.js or PHP. 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 onPORTand0.0.0.0answers at once. - Copy the config vars. Run
heroku config --shell -a your-appand paste its lines in the project's Variables with Edit as .env…. Leave outDATABASE_URL,REDIS_URLandPORT, because Tenkai sets them. - Stop the writes. Run
heroku maintenance:on -a your-app. Note the command and frequency of each Scheduler job, then delete it. Let your workers empty the queue, then stop them withheroku ps:scale worker=0 -a your-app. - Copy Heroku Postgres. Add a PostgreSQL and choose From database under Initial data. Paste the URL that
heroku config:get DATABASE_URL -a your-appprints, followed by?sslmode=require. On an Essential plan, follow the section below instead. - Bind the databases. Bind the PostgreSQL to the web application, so it receives
DATABASE_URL. For Key-Value Store, add a Redis® and bind it, so the app receivesREDIS_URL. The new store starts empty, so sessions and other Redis data start over. That URL has no TLS, so remove the TLS options your Redis client needed on Heroku. - Add the workers, the release command and the scheduled jobs. Each other line of your Procfile becomes a worker from the same image, with its command as the entrypoint. The
release:line becomes a pre-deploy command. Each Scheduler job becomes a scheduled job. Both read cron in UTC, so every 10 minutes is*/10 * * * *and daily at 00:00 is0 0 * * *. 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 and replace its
herokudns.comCNAME with the one Tenkai shows.
A database on an Essential plan
A Heroku Postgres Essential database holds event triggers that only a superuser can create, so Tenkai cannot copy it as is. Capture a backup with heroku pg:backups:capture, download it with heroku pg:backups:download, then remove the triggers on your machine. Your tables, data and extensions stay.
pg_restore -l latest.dump | grep -v 'EVENT TRIGGER' > list.txt
createdb heroku_copy
pg_restore --no-owner -L list.txt -d heroku_copy latest.dump
pg_dump -Fc --no-owner heroku_copy > clean.dump
Upload clean.dump to your storage bucket and load it with From dump.
Sources
We read these pages on 2 November 2026.
- Heroku Dev Center, The Procfile and Release phase
- Heroku Dev Center, Maintenance mode
- Heroku Dev Center, Connecting from outside of Heroku and Import and export
- Heroku Dev Center, Heroku Key-Value Store
- Heroku Dev Center, Heroku Scheduler
Redis is a registered trademark of Redis Ltd. Any rights therein are reserved to Redis Ltd.
Something wrong in this guide?
Heroku 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.