docker inspect snapshot. Everything else (image or repository, domains, ports, database data) you set or copy yourself. Read the migration overview first for the flow and the downtime table.
Prerequisites
- Levelrail installed on the new server and the CLI signed in (
levelrail-cli auth login). - Shell access to the Dokku host, to run
dokkucommands anddocker inspect. - The app’s git repository, or a registry image, to deploy from.
What imports automatically
What needs a manual step
- Image or repository, port and domains for the env dump route. Set them on the app after planning.
- Domains on the snapshot route: they are read from Traefik
Hostrules only, and Dokku uses nginx, so add them by hand. - Build. Levelrail builds a Dockerfile with BuildKit, or detects the stack and builds with Railpack. It does not run Heroku buildpacks. See Importing apps for detection.
- Databases from Dokku plugins (postgres, mysql, redis and others). The data is copied with the database copy step.
- Persistent storage from
dokku storage:mount: copy the files by hand. - Procfile process types, cron, and plugin config are not read.
What cannot be migrated
- Live Dokku over SSH. There is no importer that connects to a Dokku host.
- Dokku’s nginx config, certificates (Dokku’s Let’s Encrypt plugin), and deploy history. Certificates are issued here on first use.
- Buildpack-specific behavior. Check that the app builds with a Dockerfile or Railpack.
Steps
1
Dump the env on the Dokku host
2
Plan and stage the app
3
Set the image or repository, port and domains
Connect the repository (or a registry image) and set the port and domains on the app, then deploy. Or let Levelrail infer it:
levelrail-cli up from a checkout of the repo. See Getting started.4
Alternative: snapshot the containers
5
Copy databases
Create a managed database of the same engine on Levelrail (same or newer major version). On the Dokku host, make the database reachable from the new server and read its credentials:Then copy:Restrict the exposed port by firewall to the new server, and run
dokku postgres:unexpose mydb afterwards. If you would rather use Dokku’s own tools, dokku postgres:export makes a dump you can restore with the restore tools.6
Copy storage, check and switch
Copy
dokku storage directories by hand (for example with rsync -aHAX) into the new volume. Then:Databases and the downtime window
The copy is a full dump and restore with row counts compared and the source read-only. There is no incremental sync. Pause the Dokku app (dokku ps:stop APP), run the final copy, start the app here, switch DNS. The window is the final copy time plus a restart. A Dokku app that only serves from its image and has no database can move with no outage you would notice. See the downtime table.