| name | n8n-migrate |
| description | Migrate n8n workflows between instances (cloud to self-hosted or vice versa). Exports, remaps credentials, and imports in one pass. Use when moving workflows across n8n environments. |
| user_invocable | true |
/n8n-migrate — Migrate Workflows Between n8n Instances
Move workflows from one n8n instance to another with credential remapping.
Arguments
/n8n-migrate <workflow-id> --from cloud --to hostinger
/n8n-migrate --all --from cloud --to hostinger
Procedure
Step 1: Export from Source
n8n-cli --profile <source> workflows export <id> -o /tmp/migrate-wf.json
n8n-cli --profile <source> --json workflows list > /tmp/migrate-list.json
Step 2: Map Credentials
n8n-cli --profile <source> --json credentials list > /tmp/creds-source.json
n8n-cli --profile <target> --json credentials list > /tmp/creds-target.json
Compare credential types between instances. For each credential referenced in the workflow:
- Find the matching credential type on the target instance
- If a match exists, update the credential ID in the workflow JSON
- If no match, flag it for manual creation
Step 3: Clean and Import
Strip source-specific fields from the workflow JSON:
- Remove
id, createdAt, updatedAt, versionId
- Update credential references to target instance IDs
- Keep everything else intact
n8n-cli --profile <target> workflows import /tmp/migrate-wf-remapped.json
Step 4: Verify
n8n-cli --profile <target> workflows get <new-id>
Available Profiles
cloud — aibuildlab.app.n8n.cloud
hostinger — n8n.srv761271.hstgr.cloud
Output
Report for each migrated workflow:
- Source ID -> Target ID
- Credential mapping results (matched / missing / needs setup)
- Active/inactive status
- Any warnings (missing nodes, version mismatches)