n8n hosting

Moving an n8n server without losing credentials

How to move n8n from n8n Cloud or your own server to a new instance with every workflow and credential intact, what changes on the way, and how to switch over.

By the RinooSol team Published ⁨5⁩ min read

Moving n8n is an export and an import. What makes people nervous is the credentials: the API keys, OAuth tokens and passwords that workflows depend on, stored encrypted inside the instance. Done in the right order they move too, and nothing stops between the old instance and the new one. This guide is the order.

What moves and what does not

Moves: workflows (as JSON), credentials (as an encrypted export you decrypt on import), tags and folder structure, and your workflow settings such as timezone and error workflows.

Does not move: execution history (the log of past runs, which you rarely need), the instance's encryption key (each instance has its own), and your webhook URLs (they contain the domain, which changes). Community nodes you installed have to be installed again on the new instance.

Before you start

  • List your webhook workflows. Any workflow with a Webhook, Form or chat trigger has a URL that other systems call. Write down which external tools point at each one; you will update them at the switch.
  • Note OAuth credentials. Google, Microsoft and similar connections are OAuth tokens. They export and import fine, but some providers tie a token to the redirect URL of the instance that created it, so plan to reconnect those on the new instance. It takes a click per credential.
  • Pick a quiet hour. Not because anything stops, but because you want to be the one watching the first executions on the new instance.

Step 1: export from the old instance

In n8n, workflows export from the workflow list (select all, download) or one at a time from the workflow menu, as JSON files. Credentials export through the n8n CLI on a self-hosted instance:

n8n export:credentials --all --decrypted --output=credentials.json

The --decrypted flag matters: an export without it is encrypted with the old instance's key, which the new instance does not have. Keep the decrypted file off shared drives and delete it after the import. On n8n Cloud, where there is no CLI, credentials are re-entered on the new instance; the export covers the workflows, and your credential list tells you what to recreate.

Step 2: provision the new instance

A managed instance from RinooSol is live under a minute after payment on the plan you choose: a private container, a subdomain with SSL and a login. If you are self-hosting the destination, get it to the point where the login page loads over HTTPS before you import anything.

Step 3: import

On a managed instance, send us the workflow JSON and the credentials export and we import them, keeping names, tags and folders. Doing it yourself, the CLI imports both:

n8n import:credentials --input=credentials.json
n8n import:workflow --separate --input=./workflows

Imported workflows arrive inactive. That is right: nothing should run on the new instance until it has been checked.

Step 4: check every workflow

Open each workflow on the new instance and run it by hand once with a test input. You are looking for three things:

  1. Credentials that need reconnecting. An OAuth credential that was tied to the old redirect URL shows an error; reconnect it, which takes a click and a login.
  2. Nodes that behave differently. A community node that is not installed yet, or a node whose version changed between the old instance's n8n and the new one's. Install or adjust.
  3. Hardcoded URLs. A workflow that calls another of your own workflows by its old webhook URL. Replace with the new one.

We do this check for every migration we handle, and it is where the time goes, not the import.

Step 5: switch over

Now the only thing left is the webhook URLs. For each webhook workflow:

  1. Activate it on the new instance and copy its new production URL.
  2. Update the external tool that calls it (the form builder, the shop platform, the WhatsApp API instance) to the new URL.
  3. Deactivate the workflow on the old instance.

Do them one at a time, in the order of least traffic first. There is a moment per workflow where both instances could receive a call; because you activate the new one before deactivating the old, nothing is dropped. Scheduled workflows have no URL; activate on the new, deactivate on the old, done.

After the move

Leave the old instance running, with everything deactivated, for a week. If something was missed it is still there to look at. Then export one last copy of everything for your own archive, delete the decrypted credentials file, and let the old subscription lapse at its end date. A managed instance's backups start with the first import; on a self-hosted destination, set up the backup now, before you forget, because the first thing that breaks on a self-hosted server is usually the thing that was never backed up.

Read next

Tell us what you do by hand today

Book a free consultation and we will design the automation with you.

We reply in Arabic or English

Last updated: