Prerequisites
- Levelrail installed on the new server, signed in with the CLI (
levelrail-cli auth login). - A Coolify API token. Use the
read:sensitiveability, or secret values come back empty. - The Coolify URL reachable from the Levelrail control plane. For a private address, set
APP_IMPORT_ALLOW_PRIVATE_NETWORKS=trueon the control plane and pass--allow-private. - For apps built on the Coolify host: SSH access to it with a login that can run
docker(root or thedockergroup). - For databases: a database user on each Coolify database, and a route from the Levelrail node to its port.
What moves
What needs a manual step
- Database contents are copied by a separate step (below).
- Volume contents are copied by
rsynccommands you run. - Images built on the Coolify host exist nowhere else. Use the Move images step.
- Git-built apps do not build by themselves. Connect the repository (with credentials for a private one) and run a build, or let verify do it.
- Old database hostnames in env vars are only rewritten through a mapping you confirm.
- Secrets the token could not read are skipped and flagged.
- Build settings move with
migrate coolify: base directory, Dockerfile path, static build command and publish directory, start command, pre and post deployment hooks, and build-time variables (stored as secrets with build access). With--apply, a repository given as a full URL is connected with those settings; a private one still needs credentials. - Basic auth,
wwwredirects, preview deployments and common proxy labels (redirectscheme,redirectregex,stripprefix,headers) are translated into ingress settings on--apply: a placeholder basic auth credential (never shown, set the real one withdomains basic-auth set), a canonical redirect, forwarder and header rules, and previews on with the default policy (gated when the source used basic auth). Until basic auth is set the app is public, and file mode sets nothing. Unknown label keys stay as manual items with the reason. Apps that shared a custom docker network are listed with their peers; no connection is created automatically. - Git webhooks: pass
--create-webhookswith--applyto register one push webhook per git-sourced app after it is created. It is off by default because it writes to your git host. A hook is only created when the repository URL is https and its scheme, host and port match an authorized git connection (GitHub App, GitLab, Gitea or Bitbucket), and it goes through the existingapps git-source register-webhookroute with your own token. The control plane generates the webhook secret, which is never printed or written to the report. A re-run does not add a second hook. Every app that is skipped gets the reason, and a failure on one app does not stop the others. Without--applythe report lists what would be created and writes nothing to the git host.APP_MIGRATE_WEBHOOK_LIMIT(default 200) caps hooks per run andAPP_MIGRATE_REPO_URL_MAX_LEN(default 2048) caps the accepted repository URL length. - Multi-server instances: pass
--node-map source-server=node,other=node2to put each app on the named node. An unmapped server keeps its apps on the control plane node with a finding, and an unknown or ambiguous node name stops the run before anything is created. Placement needs a token with the root ability, checked first. - Extra ports, raw host port mappings, other custom labels, tags, the Node version pin, webhooks and backup schedules are called out as needs attention or planned items. Nothing is dropped without a row in the report. See the gap report.
What does not move
- Coolify one-click services are not created as apps.
migrate coolifyreads each service’s compose file and env, translates itsSERVICE_magic variables and stages the result ascompose.yamlunder--stage-dir(default./migrated/compose), with hosts under--domain-suffix. Nothing is deployed. Review the file, then deploy it withlevelrail-cli compose deploy. The file and--applymodes stage services. The dry-run and verify reports list them as skipped. See one-click services to Compose. Staging is pending run against a real Coolify instance. - Coolify Docker Compose applications (the
dockercomposebuild pack) are staged like one-click services: onecompose.yamlunder--stage-dirwith magic variables and generated secrets resolved, plusstack.env(mode 0600) when env values were requested. A file that setsprivileged, host networking, hostpidoripc,cap_add,devicesor mounts the Docker socket stays blocked with the same reason a manual compose deploy gives. Compose text and secret values never appear in the report. - File storages are copied as app files at their mount path with identical bytes. Unsafe paths (relative,
.., backslash, control characters) are refused with the reason. Content is copied only with--include-secret-values(otherwise the report lists each path and size), and a secret-looking file is set through the encrypted store. In file mode they are written under<out-dir>/<app>.files/with owner-only permissions. - TLS certificates, DNS records, deploy history, logs and metrics. Certificates are issued here on first use.
- ClickHouse, KeyDB and Dragonfly databases are created empty as managed databases, like the other engines. A Dragonfly version is kept only when the source pins a full
vX.Y.Ztag, and a KeyDB version only for an exacteqalpha/keydbrelease tag, otherwise the newest supported one is used. Copy the data with the printedmigrate db-copycommand, or with the engine’s own dump tool and the restore tools where the copy step does not support the engine.
Exit report and cutover checklist
To leave Coolify completely, start with a dry run. It reads Coolify (GET requests only), creates nothing, and prints one row per resource with its outcome: imported, manual (a person finishes it) or skipped (it will not move, with the reason). It also prints the DNS switch order and an ordered cutover checklist.POST /api/v1/migration/coolify/exit-report and GET /api/v1/migration/apps/sessions/{id}/exit-report, and the read-only MCP tool is get_app_import_exit_report.
How to read it:
- Skipped rows never move on their own. One-click services, engines without a managed equivalent, and backup schedules and S3 storage destinations (with the
backups schedule setorbackup-targets createcommand that recreates them) land here. Staged one-click services are written as compose files and still need a deploy. - Manual rows are the work list: volume data, database data (with the exact
migrate db-copycommand), backup schedules of imported databases, webhooks on your code host, a proxy that owns ports 80 and 443. - The report says
ready_to_retireonly when nothing is manual or skipped.
- Stateless apps (no volume, no database). A bad switch loses nothing.
- Apps with a volume or a database. Pause writes on the old app, run the last data copy, then switch.
- Apps with both. Switch last, one at a time.
- Do not stop or delete anything on Coolify until the app has run a full traffic cycle here.
- Lower the TTL ahead of time. A rollback restores the previous record (
levelrail-cli import cutover rollback) and the old app answers again. - For an app with a database, the fallback holds only until the first write lands here. After that, copy the data back before rolling back.
- Before you delete Coolify, keep a copy of its
.env(theAPP_KEYdecrypts everything it stored) and a dump of its own database.
Steps
1
Plan
Dashboard: Settings, Import from another platform, “Move apps from Coolify”. CLI:Every app and database gets a verdict (ready, ready with notes, needs attention, unsupported) with the reason. Nothing is created.
2
Stage
appimp-123. Re-running skips what exists. Use --map OLD_DB_HOST=NEW_DB_HOST for hostnames you want rewritten, shown with a masked before and after.3
Move images built on the Coolify host
docker save over SSH and checks the loaded image by content. The target must be the control plane node for now.4
Copy databases
levelrail-cli migrate server --engine postgres --host db.old.example.com --user admin --password-stdin --plan, then --apply.5
Copy volumes
import platform, enter the file and byte counts from both hosts on the checklist instead (levelrail-cli migrate step APP data_verified --volume NAME=SRC_FILES:SRC_BYTES:DST_FILES:DST_BYTES).6
Verify
curl --resolve app.example.com:443:NEW_IP https://app.example.com/healthz.7
Cut over
levelrail-cli import cutover rollback --session appimp-123 --app web.8
Retire Coolify
Stop Coolify only after a full traffic cycle and a checked backup. Download the receipt first:
levelrail-cli import apps --session appimp-123 --receipt.Databases
The copy streamspg_dump, mysqldump or mariadb-dump, mongodump or a Redis RDB snapshot from the source into the managed database, then compares row counts per table. It is safe to repeat: the restore replaces the target in one transaction. The source is only read.
Coolify databases often have no published port. The Levelrail node must reach the database host and port. Publish the port in Coolify temporarily (restricted by firewall to the new server) or use the migrate server --container path when the database container runs on the same node.
Downtime window
Pause or put the old Coolify app into maintenance mode before the final database copy, so no write lands after it.
Domains and TLS
- Lower the TTL a day ahead.
levelrail-cli migrate cutoverreturnsgo,wait(TTL too high),no-go(not healthy here) orswitchedper domain. - The guided cutover switches a domain by the first method that applies: a connected Cloudflare or Route 53 record (previous value stored for rollback), the managed proxy route, or a record you set by hand followed by
import cutover confirm-dns. - It then checks the public name and rolls back on its own if that fails within
APP_CUTOVER_VERIFY_TIMEOUT(5 minutes). - Coolify’s Traefik may own ports 80 and 443. Install Levelrail in coexist mode first, or switch DNS to a new server.
Common problems and fixes
Resume or undo an —apply run
Everymigrate coolify --apply run writes a journal: one entry per app with each step (created, git source, node, ingress, previews, secrets, files, webhook) and its outcome. The journal holds names, step states and a fingerprint of each created app. It never holds env values, secrets, tokens, passwords or connection strings. It is written with mode 0600, atomically, and a lock file stops two runs from using it at once. The default path is under ~/.config/<cli>/migrate-journals/; pick one with --journal FILE. The path is printed at the end of the run.
If the run stopped half way, continue it with the same flags:
--force. An app whose fingerprint is missing or no longer matches (it changed since the run, or the run stopped before recording it) is always skipped unless you name it with --force-app NAME; --force never overrides that. Undo checks each app again right before it deletes it. Apps have no immutable id in the API, so the fingerprint is the app’s shape (image, domains, port, node, volumes and similar, never env values): if someone deletes an app and re-creates one with the same name and shape, undo cannot tell them apart, so read the plan before passing --yes. An app holding volume data is skipped unless you pass --include-data and type the number of such apps to confirm; its volumes are then deleted with it. Undo refuses a journal that is a symlink or sits in a symlinked folder, readable by others, over APP_MIGRATE_JOURNAL_MAX_BYTES (default 4 MiB), written for another control plane, or with a name that is not a valid app name.