Migrate from Heroku to Plexivo
Move a Heroku app, its config vars, Heroku Postgres and custom domain to Plexivo App Runner and Plexivo Postgres in Mumbai, step by step.
This guide moves a Heroku app to Plexivo App Runner, its database to Plexivo Postgres and its domain to Plexivo, with a short, planned switch-over. Your Heroku app keeps serving until you change DNS, so you can go back at any point before that.
Heroku and Plexivo, side by side#
| On Heroku | On Plexivo |
|---|---|
App with web dynos | A Plexivo App Runner app. Choose a size and its Minimum instances and Maximum instances; see Scaling and sizes. |
| Buildpacks | A Dockerfile at the root of your repository, or Plexivo detects your language. Without a Dockerfile, the web line of your Procfile can give the start command. See Builds. |
worker and other process types | A second, private app from the same repository. Plexivo runs one process per app, and every app must accept connections on PORT; see Workers. |
release phase | No separate release step. Run migrations as your app starts, or from your computer before you deploy. |
| Heroku Scheduler | A CronJob on Plexivo Kubernetes, from the Startup plan. |
| Config vars | The app’s Environment tab, and Plexivo Secrets for keys several apps share. |
| Heroku Postgres | Plexivo Postgres. Plexivo copies it for you. |
| Heroku Key-Value Store (Redis) | Plexivo Cache, Redis-compatible. Your app fills it again as it runs. |
| Other add-ons, such as email or search | Keep the service you use: put its key in the Environment tab. |
heroku logs --tail | The app’s Logs tab; see Logs and metrics. |
| Custom domains and their certificates | Custom domains. Plexivo issues and renews the certificates. |
Before you begin#
- A Plexivo account, and the Heroku CLI signed in to your Heroku account.
- Your code on GitHub, GitLab or Bitbucket, or a public container image of it.
- Access to your domain’s DNS settings.
Move your app#
- Take stock. Write down what the app uses: its processes (
heroku ps), config vars (heroku config), add-ons (heroku addons), domains (heroku domains) and any Heroku Scheduler jobs.heroku pg:infoshows your PostgreSQL version. - Create the app. In the Plexivo console, choose Create, then Plexivo App Runner. Connect your Git provider, pick the repository and branch, choose a size, and deploy. See Deploy from Git. Or ask Plexivo AI with the repository link: it plans the app and its database with the monthly price, and creates nothing until you approve.
- Copy your config vars. On the app’s Environment tab, add each config var, then apply. Leave out
DATABASE_URL,REDIS_URLand others that point at Heroku add-ons: Plexivo sets the new ones when you connect a database or cache. See Environment and secrets. - Move the database. Create an empty Plexivo Postgres database. In Migrations, choose New migration, then Heroku Postgres, and paste the URL from
heroku config:get DATABASE_URL. Turn onheroku maintenance:onbefore the copy starts, so nothing written afterwards is left behind. When it completes, connect the database on the app’s Environment tab. See Move a PostgreSQL database. - Add your domain. On the app’s Domains tab, add your hostname and prove you own it with the
TXTrecord Plexivo shows. The TXT record leaves your traffic on Heroku, so you can do this ahead of the switch. See Custom domains. - Switch DNS. Test the app on its
plexivo.appaddress first. Then replace the record that points at Heroku with the routing record Plexivo shows. Plexivo issues the certificate on the first HTTPS request once the hostname routes. - Check it. On the Domains tab, Routing reads Ready on Plexivo and the certificate is valid. Open your site, run your usual checks, and watch the app’s Logs and Metrics.
- Retire Heroku. Keep the Heroku app in maintenance mode for a few days as your way back. When you are satisfied, remove its add-ons and delete it.
With the API#
To copy every config var at once, send them to the Plexivo API. This replaces the app’s whole environment, so do it before you add anything by hand.
heroku config --json -a my-app \
| jq '{env: del(.DATABASE_URL, .REDIS_URL)}' > env.json # drop add-on URLs
curl -s -X PUT $API/deployments/$APP/env \
-H "Authorization: Bearer $PLEXIVO_TOKEN" \
-H "Content-Type: application/json" \
-d @env.jsonWorkers#
Each Plexivo App Runner app runs one process and must accept connections on PORT within 5 minutes of starting, or it is restarted. To run a worker process:
- Create a second app from the same repository and make it private.
- Choose the process with a variable, for example
PROCESS=worker, read by yourDockerfile’s start command. - Have the worker open
PORT, for example with a small health endpoint.
CMD ["sh", "-c", "if [ \"$PROCESS\" = worker ]; then node worker.js; else node server.js; fi"]A worker that cannot open a port runs well on Plexivo Kubernetes as a Deployment.
Database TLS#
Plexivo Postgres accepts only TLS connections and gives your app its CA certificate as DATABASE_CA_CERT. If your code turned off certificate checks for Heroku, for example rejectUnauthorized: false, point it at the CA certificate instead. See TLS.
Free migration help#
Prefer a hand? Tell us what you run, and Plexivo support plans the move with you. Ask for free migration help. Moving a paid workload? You may also be able to apply for migration credits.
Next steps#
Heroku is a trademark of its owner. Plexivo is not affiliated with, endorsed or sponsored by Heroku.
Updated 2 November 2026