Moving an app off Heroku is mostly bookkeeping. This checklist keeps the downtime to the few minutes the database copy takes.
1. Inventory
Write down what the app uses: the database, the add ons, the config vars, the scheduled jobs and the domains. Each one needs a home before the move.
2. Recreate the app
Create the app in Deplo from the same repository, with the same start command as the web process. Workers become apps of their own, built from the same code.
3. Copy the config vars
heroku config --shell --app my-app > .envImport the file from the Variables tab. Mark the secrets as secret: once saved, nobody can read them back.
4. Move the database
Put the app in maintenance mode, then dump and restore:
pg_dump --format=custom --no-owner "$HEROKU_DATABASE_URL" > app.dump
pg_restore --no-owner --dbname "$DEPLO_DATABASE_URL" app.dump5. Switch the domain
Lower the TTL of the record a day before, then point it at the new server. Keep Heroku running until the old record has expired everywhere.

