Moving n8n to a new server

Moving a self-hosted n8n instance is mostly a backup and restore job with a few traps: the .n8n folder holds the encryption key, and custom node directories must come along. The work is fixed-scope once the instance inventory is known.

On this page

How long does moving n8n to a new server take?

No fixed duration applies to every move. The effort to relocate a single-host n8n instance depends on how many components must travel together and how many workflows and credentials must keep working after cutover. A small instance with a local database and one .n8n folder is a short job. An instance with an external PostgreSQL database, external binary or execution data storage, custom node directories set through N8N_CUSTOM_EXTENSIONS, and queue workers spread across several hosts has more pieces to copy, verify and restart in the right order. n8n's backup guidance covers moving to a new server and lists each of these components, so the first step is an inventory of what your instance actually uses.

The components that drive effort are the ones that hold state or configuration. The .n8n folder carries the encryption key that unlocks stored credentials, so it is required even when PostgreSQL holds the workflows. Queue mode adds work because the encryption key must match on every worker and webhook processor, and each of those hosts needs its own restart and check. The number of workflows matters less than the number of credentials and external endpoints, because each credential must be tested against the new network path, and each webhook URL that changes with the new host or domain must be updated in the systems that call it. Confirm with your own environment how many credentials, webhooks and custom nodes you have before estimating anything.

No price or duration in this section is a quote. Your own team's time, the number of environments you must rehearse, and any change window your business requires will set the schedule. When you request a quote from a partner, ask for the written scope to list each component above, the restore and verification steps, the DNS cutover plan, and the rollback path, so the estimate reflects your inventory rather than a generic template.

What moves cleanly in moving n8n to a new server and what needs checking

This table compares each part of a self-hosted n8n instance with where it lives, what it becomes on the new server, and whether it needs the same version or new settings. Read it as a checklist: items marked as carrying over still need verification, and items that depend on DNS, proxy or paths must be re-pointed before you switch traffic.

ComponentWhere it livesWhat it becomes on the new serverMigration notes
The .n8n folderLocal disk of the original host, holding the encryption key and local settingsCopied to the new host so the same encryption key is availableSame key required. Without it, stored credentials cannot be decrypted. Confirm the n8n version matches before first start.
External PostgreSQL database, if usedSeparate database server holding workflows, credentials and executionsRestored into a new or existing PostgreSQL instance and pointed to by the new n8nRestore the database with the same n8n version that created it. Credentials remain encrypted and depend on the .n8n key.
External binary or execution data storageFilesystem path or external store holding binary data and execution dataCopied or mounted at the same logical location on the new serverConfirm the storage configuration is identical. Missing binary data breaks workflows that depend on files.
Directories in N8N_CUSTOM_EXTENSIONSCustom node or extension folders on the original hostCopied to the new host and referenced by the same environment variable pathRe-point the path if the directory layout changes. Confirm custom nodes load after start and check their dependencies.
Webhook URLs and DNSPublic hostname pointing to the original server, used by external servicesSame public URLs served by the new server after a DNS changeWebhook URLs are not moved by the backup. Update DNS only after testing, and confirm external services still reach the same paths.
Reverse proxy and certificatesProxy configuration and TLS certificates on the original hostRebuilt or copied on the new host with the same hostnameProxy settings are not part of the n8n backup. Recreate them, issue or copy certificates, and test the webhook and editor routes.

Documented backup and restore paths for n8n

n8n's backup guide names four components that make up a complete backup when you move an instance. Each one holds a different part of the running system, and missing any one of them can leave a restored instance with broken credentials, missing nodes or incomplete execution history.

The .n8n folder

This folder holds the encryption key that protects credentials stored in the database, so it is part of the backup even when PostgreSQL is in use. On the source host, confirm where the folder lives for your install method and check that the key file is present and readable. Copy it with the database, never separately, so the key always matches the data it decrypts. A restored instance without the matching key cannot read saved credentials.

Backup and restore docs

The external PostgreSQL database

When n8n uses an external PostgreSQL database, the database holds workflows, credentials, execution records and settings. Confirm the connection settings on the source host, including the database name and host, and take a consistent dump while n8n is stopped or idle so workflows and credentials are captured together. Record the database version so the target server runs a compatible PostgreSQL release before restore.

External binary or execution data storage

If binary data or execution data is kept outside the database, for example on a file system volume or object storage, that storage is a separate part of the backup. Files referenced by workflows and past executions are useless without it. Identify the storage location on the source host, confirm the path or bucket and its size, and plan to copy it with the same cutover point as the database so references stay valid.

Custom extension directories

Directories listed in the N8N_CUSTOM_EXTENSIONS setting contain private custom nodes and extensions that n8n loads at startup. Confirm the exact paths from the environment configuration on the source host, then copy each directory to the same path on the target or update the setting to match. Workflows that call a missing custom node will fail after restore, so verify the node list on the target before switching traffic.

How the parts of an n8n instance move between hosts

The move starts on the source host, where the .n8n folder, the external PostgreSQL database if one is used, external binary or execution storage, and any directories listed in N8N_CUSTOM_EXTENSIONS hold the instance's state. Those parts cross a transfer path into the new environment, and each copy must be restored there before anything else happens. Verification comes next: confirm the restored instance starts, credentials decrypt and workflows run. Only after that check passes should DNS switch to the new host, with the old host kept read-only until cutover is confirmed.

Parts of an n8n instance that must be backed up, restored and verified before DNS moves.

The sequence for moving n8n: inventory, backup, restore, checks and DNS switch

This sequence moves a self-hosted n8n instance to new hardware or another cloud with a complete backup, a verified restore, functional checks and a DNS cutover that can be reversed.

  1. Inventory the instance and its extensions

    Record the n8n version, the database type and host, the location of the .n8n folder, any external binary or execution data storage, and every directory listed in N8N_CUSTOM_EXTENSIONS. Note the reverse proxy, certificates, environment variables, webhook URLs and any queue mode workers or webhook processors. Your team needs to provide server access, the current configuration files and the list of people who own workflows. The step is done when the inventory is written down and someone outside the migration team has reviewed it.

  2. Freeze or schedule workflow changes

    Agree a change window with workflow owners so no workflows are edited, activated or deleted between the backup and the DNS switch. Pause or confirm schedules for triggers that would write data during the window, and confirm which active workflows call external systems that may fail while the instance is unavailable. Your team needs to supply the change window and the approvers. The step is done when owners have confirmed in writing that the freeze is in effect.

  3. Take a complete backup

    Back up the .n8n folder, the external PostgreSQL database if one is used, external binary or execution data storage, and the directories set in N8N_CUSTOM_EXTENSIONS. Treat the .n8n folder as required even with PostgreSQL, because the key that encrypts credentials stored in the database lives there. Store the backup somewhere the old host cannot overwrite. The step is done when every item on the inventory has a backup copy and the encryption key file is confirmed to be inside it.

  4. Restore the database and .n8n folder

    On the new server, install the same n8n version as the source, restore the PostgreSQL database and place the .n8n folder with its original encryption key before starting n8n. Matching the version avoids schema surprises during first start. Restore external storage and custom extension directories in the same pass. The step is done when n8n starts without errors on the new host and the instance shows the expected count of workflows and credentials.

  5. Install matching custom node directories

    Copy each directory referenced by N8N_CUSTOM_EXTENSIONS to the new server at the same path or update the variable to match, then confirm that custom nodes load and appear in the editor. Check that package versions and runtime dependencies match what the source instance used. If a custom node fails to load, workflows that depend on it will fail at execution, so resolve this before checks begin. The step is done when every custom node loads without errors in the startup log.

  6. Run functional checks on workflows, credentials and webhooks

    Test a representative set of workflows on the new server, including ones that use credentials, scheduled triggers and webhooks. Confirm that credentials decrypt and connect to their target systems, that webhook URLs respond at the new address, and that executions complete and log as expected. Use test endpoints or sandbox systems where possible so no live data is changed twice. Your team should confirm which external systems can be reached from the new network. The step is done when the agreed test list passes and the results are recorded.

  7. Switch DNS with a rollback plan

    Lower the DNS record time-to-live ahead of the change, then point the instance hostname to the new server during the agreed window. Keep the old host running and its configuration unchanged so the record can be reverted quickly if checks fail. Re-check webhook responses and a sample execution after the switch. Your team needs to supply DNS access and the rollback owner. The step is done when the hostname resolves to the new server, the rollback steps are written, and the change owner confirms the instance is serving traffic.

  8. Decommission the old host after observation

    Keep the old host available for a defined observation period agreed before the switch, then shut it down and remove its copies of the encryption key and database. Retire stored secrets that were only needed for the old host. Record the final state and close the change. Your team should decide the observation period and the data disposal method in advance. The step is done when the old host is off, its sensitive files are removed or archived under your retention rules, and the decommission is signed off.

Why the .n8n folder decides whether credentials still work

Credentials in the database are encrypted with a key held in the .n8n folder, so that folder belongs in every backup, including installs that use PostgreSQL. Teams often treat the database dump as the whole instance because workflows, executions and settings live there. The credential records do live in the database, but they are only readable with the key stored on the filesystem. A backup that captures the database and omits the .n8n folder is incomplete, and the gap only shows up after the restore, when the first workflow that calls a credential fails.

The failure mode is easy to miss during a migration. A restored database without the matching key still loads, workflows still appear in the canvas, and the instance may start without errors. The credentials, however, cannot be decrypted, so API calls and database connections that depend on them fail at run time. If the key was lost or replaced on the new host, re-creating each credential by hand is the only way back. Before cutover, confirm that the key file on the new server is the one from the source instance, and test one credential-backed workflow end to end rather than relying on a clean startup.

In queue mode the same key must be present on the main instance and on every worker and webhook processor node, because each of those processes reads credentials from PostgreSQL. A move to new hardware often adds or rebuilds worker hosts, and a worker started with a different or missing key will fail only on the executions it picks up. Check key handling on each node, and confirm with your own secrets policy how the key is stored, copied and rotated, who may read it, and whether your backup vault is approved to hold it. Your security team should decide where the key lives in the backup set before the first copy is taken.

What drives the cost and duration of a server move

This table lists the factors that change how much planning, restore work and cutover effort a move to new hardware or another cloud requires. Read each row as a question to answer before requesting a quote, since the one-time move work and the recurring cost of running the new host respond to different drivers. The main takeaway is that the amount of state to carry over, the number of webhooks and the verification scope usually matter more than the instance count alone.

DriverWhy it mattersWhat to ask for in a quote
Number of n8n instances and hostsEach instance has its own .n8n folder, database and encryption key, so every instance adds a full backup, restore and verification pass.A per-instance breakdown of planning, restore and cutover work, and whether instances share a host or database.
Database type and sizeThe external PostgreSQL database must be backed up with the .n8n folder, and a larger database lengthens the dump, transfer and restore window.Confirm the database engine and version, its approximate size, and whether the restore is rehearsed on the new host before cutover.
External binary or execution data storagen8n's backup guidance includes external binary or execution data storage, so object or file storage must be copied and checked alongside the database.Whether storage is migrated by copy, sync or re-attachment, and how consistency between storage and database is checked.
Custom node directoriesDirectories named in N8N_CUSTOM_EXTENSIONS must exist at the same paths on the new host, and each added directory adds packaging and dependency checks.Number of directories, whether they carry native dependencies, and whether they are rebuilt or copied as-is.
Queue mode with Redis and workersMain, worker and webhook processor nodes must all receive the same encryption key, and Redis and each worker need their own configuration and placement.Number of workers and webhook processors, Redis topology, and how the key is distributed and verified on every node.
Reverse proxy and certificate setupProxy rules, TLS certificates and forwarded headers must be rebuilt or reissued before DNS points at the new host.Who issues and installs certificates, whether the proxy configuration is rewritten, and how certificate expiry is tracked.
Number of webhooks that clients callExternal systems hold live webhook URLs, so every caller that cannot be updated or tested extends the cutover and the risk of missed events.An inventory of production webhooks, the owners of each caller, and the test method used before and after switching DNS.
Change window constraintsLimited windows force a shorter cutover, a tighter rollback plan and fewer chances to fix problems found during testing.The allowed window, the rollback trigger, and whether a parallel run or staged cutover is included.
Verification scopeChecks on credentials, scheduled workflows, executions and integrations decide how much of the work is spent after the move, and skipping them shifts failures to users.A written list of checks, who performs and signs off on them, and the evidence delivered at the end.

What usually goes wrong when n8n moves to a new host

Most failed n8n moves come from a few predictable gaps: a database restored without the key that decrypts it, extensions left behind, or traffic still reaching the old host. Each card below names one risk and the check to run before you change DNS.

Database restored without the key

The database holds credentials encrypted with the key stored in the .n8n folder. If you restore PostgreSQL but not that folder, workflows load and then fail when they try to use saved credentials. Before the DNS switch, confirm the .n8n folder was copied with the same ownership and that the encryption key file on the new host matches the old one. Then open one credential-backed workflow and run it manually.

Backup and restore docs

Custom extension directories missing

Custom nodes and extensions loaded from the directories listed in N8N_CUSTOM_EXTENSIONS are not part of the database, so a backup of the database alone leaves them behind. Workflows that use those nodes then show errors or missing node types. Before switching, compare the directory list in the new environment with the old one, confirm every path exists, and check that the nodes appear in the editor and run in a test workflow.

Backup and restore docs

Version mismatch between hosts

Restoring data into a different n8n version than the one that wrote it can cause startup errors or changed behavior. Record the exact version on the old host and install that same version on the new one before restoring, then upgrade in a separate, planned step. Confirm the version string on the new host matches the old one and that the instance starts cleanly with the restored data.

Release notes

Webhooks still pointing to the old address

Webhook URLs and the editor address are built from the instance's configured host. External services that call webhooks will keep sending events to the old server if their configuration is not updated, and the old host may start receiving them after you retire it. Before the switch, confirm the webhook base URL on the new host, update each external caller, and send a test event through each webhook.

Executions and binary data left behind

Execution history and binary files can live in PostgreSQL, in local storage on the old host, or in external binary or execution data storage. A backup that skips external storage restores workflows without the files they produced or read. List every storage location in use, copy each one, and open a recent execution that handled a file to confirm the file still loads.

DNS caches keeping traffic on the old host

Resolvers and clients cache DNS answers for the record's time-to-live, so some users and systems keep reaching the old host after the change. Lower the TTL on the record well before cutover, keep the old host running and in sync until traffic has drained, and check resolution from several networks. Do not shut down the old instance until scheduled workflows and webhooks have confirmed they run on the new one.

Checks before switching DNS, by deployment shape

On a single host with the default database, the .n8n folder carries most of the state, including the database file and the encryption key that decrypts stored credentials. Confirm that the copy on the new host is complete before anything points at it, and that n8n starts with the same key the old instance used.

  • Encryption key match: Confirm the key in the .n8n folder on the new host is the one copied from the old host, since credentials cannot be decrypted without it.
  • Folder completeness: Check that the .n8n folder was copied in full, including the database file and any configuration it holds.
  • Custom node directories: Confirm every directory listed in N8N_CUSTOM_EXTENSIONS exists on the new host with the same contents.
  • Startup and login: Start n8n on the new host, sign in as an owner and open a few workflows to confirm they load and their credentials are usable.
  • Test webhook response: Trigger a test webhook against the new host directly, before DNS changes, and confirm the workflow runs.

Confirm the n8n version on the new host matches the old instance before you start it against the copied data, and check the version alignment in your own environment.

Questions buyers ask before outside help moves n8n

What does it cost to move n8n to a new server?

Cost depends on the work you hand over, not on a fixed package. DeployOpen does not publish a price list, and a quote follows from a written scope. The main cost drivers are the number of instances, the size of the PostgreSQL database, whether you use queue mode, how many custom node directories must be carried over, and how many credentials need to be verified after cutover. One-time work covers inventory, backup, restore, testing and cutover. Recurring costs appear only if you later add retainers for support or upgrades. When you ask for a quote, request a line for each activity, a list of assumptions about your environment, and a statement of what you must provide, such as access and a test window.

How long does a server move take, and what sets the timeline?

The timeline depends on how much state the instance holds and how many systems depend on it. Start with an inventory of the .n8n folder, the external PostgreSQL database if you use one, external binary or execution data storage, and any directories listed in N8N_CUSTOM_EXTENSIONS. Each item adds restore and verification work. Queue mode, reverse proxy settings, certificates and external systems that call your webhooks add more checks. The available change window and the number of owners who must sign off also shape the schedule. Ask any provider to base the timeline on a written inventory of your instance and to list which steps wait on your team.

What does our team need to provide for the move?

The work needs four things from your side: access, backups, change windows and named owners. Access means a path to the source and target hosts, database credentials with rights to dump and restore, and DNS and proxy control. Backups mean a complete backup taken before any change, including the .n8n folder, because credentials in the database are encrypted with the key held there, so the folder is needed even when PostgreSQL is used. Change windows should cover a freeze on editing workflows during the final copy. Credential owners must confirm which external accounts each credential uses so that someone can test them after the move. Ask your provider to list these items in writing before the work starts.

Can our own team move n8n without outside help?

Yes, a capable platform team can move a single, simple instance using n8n's backup guidance. The risk rises with complexity: external PostgreSQL, custom node directories, queue mode, binary data stored outside the instance, and webhooks called by many systems. Outside help usually adds value when the team needs a documented inventory, a rehearsal on a copy, a tested rollback and evidence of each check for internal change review. Decide by comparing the steps in the backup and restore documentation with your own skills, change calendar and staff availability. Whichever path you choose, rehearse the move against a copy before the production cutover.

How do we move a queue mode n8n deployment to a new server?

Queue mode adds more parts to move. The main instance handles triggers and webhooks and passes executions through Redis to workers that read and write workflow data in PostgreSQL. Every worker and webhook processor must receive the same encryption key as the main instance, because they need it to read credentials from the database. Plan the move as one unit: stop intake, capture the database and .n8n folder, restore the main instance, then bring up workers and webhook processors with the matching key and confirm each one can reach Redis and PostgreSQL. Check that no old worker is still consuming jobs from the previous Redis instance before you switch DNS.

What happens to webhooks and credentials during cutover?

Webhooks point at the hostname your external systems call, so switching DNS moves intake to the new server. Keep the same public URL and webhook paths where possible, and check that the reverse proxy and certificates on the new host serve them before the switch. Credentials stay in the database, encrypted with the key in the .n8n folder, so a restore with the wrong key leaves them unreadable. Test a sample of credentials against their target systems on the new server, and confirm that each external system can still reach its webhook. Lower the DNS time-to-live before the window so you can roll back quickly, and keep the old server running until the checks pass.

Does the Sustainable Use License cover moving n8n to a new server?

n8n is source-available under the Sustainable Use License, not OSI open source. The license permits use or modification for your own internal business purposes, and its terms also cover non-commercial and personal use. Moving your own instance to hardware you control falls within internal use, but files with .ee in their name or directory require a valid n8n Enterprise License. If your instance uses Enterprise features, confirm the license key and entitlement on the target before cutover. Ask your legal or procurement contact to review the license text with the move plan.

How DeployOpen scopes and delivers an n8n server move

DeployOpen treats a move to new hardware or another cloud as a planned change to a running workflow system, not a file copy. The work is scoped in writing first, then built, tested against your workflows and credentials, and handed over with a runbook your team can repeat.

How we scope

  • Inventory the current instance: .n8n folder, external PostgreSQL, binary or execution storage and every directory listed in N8N_CUSTOM_EXTENSIONS.
  • Confirm the target platform, network path, DNS ownership and the cutover window your business users can accept.
  • Agree in writing which workflows, credentials and webhook endpoints are in scope, and which the client will verify after cutover.

How we build

  • Take a complete backup and check that the encryption key in the .n8n folder is preserved with the database it protects.
  • Restore the database and .n8n folder onto the new server, then reattach custom node directories and confirm the instance starts cleanly.
  • Test workflows, credential-backed nodes and webhook responses on a staging address before any DNS record changes.

How we hand over

  • Deliver a cutover runbook covering the final backup, the freeze on changes, the DNS switch and the rollback steps.
  • Document the new server layout, storage paths, backup schedule and where the encryption key is held and who may access it.
  • Walk your operations team through the checks used before and after the switch, so they can repeat them on the next move.

How we support

  • Keep the old server available for a agreed period after cutover so rollback stays possible until acceptance checks pass.
  • Offer ongoing support, upgrades and continuous testing as a retainer if your team wants help after the move.
  • Re-run the restore test whenever the platform, database or backup target changes, using the same written runbook.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.