Skip to main content
A Dokku host is a Docker host. Its apps run as plain containers, so Levelrail can read them over SSH without installing anything on the old server: the control plane opens an SSH login, uses it only to reach the Docker socket, and sends read-only requests. That is the first route on this page. If you cannot give Levelrail an SSH login, you can import one app’s environment variables from a dokku config:export dump instead. 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).
  • An SSH login on the Dokku host whose user can use the Docker socket (member of the docker group, or root). See Migrate over SSH for what is read and what is never done.
  • The app’s git repository, or a registry image, to deploy from.

What moves

What needs a manual step

  • Domains. They live in Dokku’s stored config, which is not read. Add them after the plan with levelrail-cli apps domains add.
  • Build. Levelrail builds a Dockerfile with BuildKit, or detects the stack and builds with Railpack. It does not run Heroku buildpacks. See Buildpack apps.
  • Procfile process types. The import reads containers, not the Procfile. Check each service after the plan. levelrail-cli import config reads a Procfile and app.json offline and proposes an app.yaml.
  • Persistent storage from dokku storage:mount. Named volumes can be copied through the tunnel. Bind mounts and stopped containers use the printed rsync commands. See Migrate over SSH.
  • Datastores from Dokku plugins (postgres, mysql, redis and others) are copied with the database copy step below.
  • Cron and plugin config are not read.

What does not move

  • Dokku’s proxy config, certificates from its Let’s Encrypt plugin, and deploy history. Certificates are issued here on first use once DNS points here.
  • Buildpack-specific behavior. Check that the app builds with a Dockerfile or Railpack before the cutover.
The Dokku routes have not been rehearsed against a live Dokku host. Read the plan before you apply it, and keep the Dokku app running until you have verified the copy.

Steps

1

Test the SSH connection

With no --fingerprint it lists the host keys the server presents. Compare one with what the Dokku host reports, then pass it with --fingerprint SHA256:.... The test shows the container, volume and image counts and changes nothing. Use a key made for this move and remove it from authorized_keys afterwards.
2

Plan and stage the apps

The plan says why it made each choice. Apply creates the apps stopped and not routed, with env and secrets stored encrypted. The dashboard has the same flow under Migrate, Import apps, Connect over SSH.
3

Move images and volumes

Images that Dokku built on the host are streamed through the tunnel and checked by image ID. Run the volume copy again right before the DNS switch to catch the last changes.
4

Set the domains

Add each domain to the staged app, then check it before you change DNS:
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

Check and switch

Fallback: env dump for one app

Use this when you have no SSH login to give, or only want the variables. It brings in the environment and nothing else: set the image or repository, port and domains on the app yourself.
1

Dump the env on the Dokku host

The file holds secrets. Delete it once the import is staged.
2

Plan and stage the app

Dashboard: Settings, Import from another platform, the Dokku env dump tab. The content stays in memory for the session and secret-looking values stay masked.
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.

Dokku command map

The commands you used every day, and where they went. Levelrail commands are written without the levelrail-cli prefix. Rows marked from v0.9.5 are being added on the v0.9.5 release branch and are not in earlier versions. There is no dokku alias in the CLI on purpose: Levelrail calls an API with permissions and approvals, and a Dokku-shaped alias would hide that.

Datastore coverage

Each Dokku datastore plugin maps to a managed database engine, a catalog template you run as an app, or nothing. A managed engine gets generated credentials, backups, restore and the database copy step. A catalog template is an ordinary app with its own volume: move its data with the volume copy in Migrate over SSH and back it up as app storage. The database copy step handles managed engines only. Catalog templates have no dump and restore step, so stop the source service before copying its volume. GET /api/v1/database-engines is the live source for engines.

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.

Domains and TLS

Dokku’s own proxy owns ports 80 and 443. Point DNS at a new server, or install Levelrail in coexist mode. Lower the TTL to 300 seconds a day ahead. Certificates are issued here on first use once DNS points here. See Domains and ingress.

Common problems and fixes

Verify and roll back

Run levelrail-cli migrate cutover --verify after you switch DNS. It checks the certificate, the health path and DNS. The copy only reads the old server, so nothing there is changed. To roll back, restart the old app if you paused it and point DNS back at the old server.

Choose to stay if

You want Dokku’s git push workflow with buildpacks and a very small footprint, and it already works. Levelrail builds from Dockerfiles or Railpack and has a beta push remote. See Dokku alternative and the comparison.
Last modified on November 8, 2026