{"id":11908,"date":"2026-06-24T12:19:13","date_gmt":"2026-06-24T12:19:13","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=11908"},"modified":"2026-06-24T12:19:13","modified_gmt":"2026-06-24T12:19:13","slug":"how-to-migrate-n8n-workflows-between-hostinger-vps-instances","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-to-migrate-n8n-workflows-between-hostinger-vps-instances\/","title":{"rendered":"How to migrate n8n workflows between Hostinger VPS instances"},"content":{"rendered":"<p>This article explains how to migrate your n8n workflows, credentials, and system settings to a new instance running on a Hostinger VPS. Moving your n8n setup securely ensures that your workflow data, database configurations, and environment variables remain intact. You can perform this migration using a full data volume transfer or a command-line interface (CLI) export.<\/p><h2 id=\"h-before-you-start\">Before you start<\/h2><p>Before migrating, verify your system configuration, database types, and version compatibility between your source and destination instances.<\/p><h3>Check n8n version compatibility<\/h3><p>The destination n8n version must be equal to or newer than the source version. Do not import workflows from a newer n8n version into an older one, as workflow data structures, credential schemas, and node behaviors are not backward compatible.<\/p><table style=\"border-collapse: collapse;width: max-content;max-width: 100%\">\n<tbody>\n<tr style=\"background-color: #e3e7fa\">\n<td>\n<p style=\"text-align: center\"><b>Source version<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: center\"><b>Destination version<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: center\"><b>Compatible<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p class=\"no-margin\">1.x<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">1.x (same or higher)<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Yes<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p class=\"no-margin\">1.x<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">0.x (older)<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">No<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p class=\"no-margin\">0.x<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">1.x<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Yes<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><p><strong>NOTE<\/strong><\/p><ul>\n<li>To check your n8n version, run <code>docker exec -u node -it &lt;container-name&gt; n8n --version<\/code> on your source VPS terminal.<\/li>\n<\/ul><h3>Check database and storage<\/h3><p>n8n stores workflows, user accounts, and execution data in a connected database. Custom configurations and binary data reside in the local file system directory (<code>\/home\/node\/.n8n<\/code> inside the container).<\/p><table style=\"border-collapse: collapse;width: max-content;max-width: 100%\">\n<tbody>\n<tr style=\"background-color: #e3e7fa\">\n<td>\n<p style=\"text-align: center\"><b>Database type<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: center\"><b>Storage location<\/b><\/p>\n<\/td>\n<td>\n<p style=\"text-align: center\"><b>Migration approach<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p class=\"no-margin\">SQLite (default)<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">n8n data directory<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Fully covered by volume copy in Method 1.<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p class=\"no-margin\">PostgreSQL<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">External or separate container<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Requires independent <code>pg_dump<\/code> backup and restore alongside file transfers.<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table><p><strong>NOTE<\/strong><\/p><ul>\n<li>To check if your source instance uses PostgreSQL, run <code>docker inspect &lt;container-name&gt; | grep -E \"DB_TYPE|DB_POSTGRESDB\"<\/code> on your source VPS terminal. If the output shows <code>DB_TYPE=postgresdb<\/code>, back up and restore the PostgreSQL database independently.<\/li>\n<\/ul><h3>Handle the encryption key<\/h3><p>n8n secures stored credentials using an encryption string set via the <code>N8N_ENCRYPTION_KEY<\/code> environment variable. This key is generated automatically on first launch unless defined manually.<\/p><p><strong>NOTE<\/strong><\/p><ul>\n<li>An encrypted credential import only succeeds if the destination instance uses the exact same <code>N8N_ENCRYPTION_KEY<\/code> value.<\/li>\n<li>If your destination instance uses a different encryption key, use the decrypted export path in Method 2.<\/li>\n<li>To check if an explicit encryption key is set on your source instance, run <code>docker inspect &lt;container-name&gt; | grep N8N_ENCRYPTION_KEY<\/code> on your source VPS terminal.<\/li>\n<\/ul><h2 id=\"h-method-1-transfer-the-full-data-volume\">Method 1 &ndash; Transfer the full data volume<\/h2><p>Use this method when both the source and destination n8n instances are deployed on a Hostinger VPS using the standard Hostinger Docker catalog layout. This method copies the persistent Docker volume, preserving your workflows, user accounts, execution history, and credential configurations.<\/p><h3>Step 1 &ndash; Stop both n8n containers<\/h3><p>To prevent data corruption or incomplete file copying, stop both the source and destination n8n containers.<\/p><ol>\n<li>Log in to hPanel and navigate to <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong>.<\/li>\n<li>Locate the source n8n project, click <strong>Manage<\/strong>, and select <strong>Stop<\/strong>.<\/li>\n<li>Repeat for the destination n8n project.<\/li>\n<\/ol><h3>Step 2 &ndash; Create a backup archive on the source VPS<\/h3><p>Connect to your source VPS via SSH. Create a compressed archive of the persistent n8n volume data directory. Replace <code>n8n-XXXX_n8n_data<\/code> with your actual source volume name:<\/p><pre><code>tar -czf \/root\/n8n-backup.tar.gz -C \/var\/lib\/docker\/volumes\/n8n-XXXX_n8n_data\/_data .<\/code><\/pre><h3>Step 3 &ndash; Transfer the archive to the destination VPS<\/h3><p>From your source VPS terminal, securely copy the archive to the destination server. Replace <code>185.185.185.185<\/code> with your destination Hostinger VPS IP address:<\/p><pre><code>scp \/root\/n8n-backup.tar.gz root@185.185.185.185:\/root\/n8n-backup.tar.gz<\/code><\/pre><h3>Step 4 &ndash; Restore the archive on the destination VPS<\/h3><p>Connect to your destination VPS via SSH. Clear the destination volume path completely before unpacking the archive to avoid leftover configuration conflicts. Replace <code>n8n-YYYY_n8n_data<\/code> with your destination volume name:<\/p><pre><code>find \/var\/lib\/docker\/volumes\/n8n-YYYY_n8n_data\/_data\/ -mindepth 1 -delete\r\ntar -xzf \/root\/n8n-backup.tar.gz -C \/var\/lib\/docker\/volumes\/n8n-YYYY_n8n_data\/_data\/<\/code><\/pre><h3>Step 5 &ndash; Start the destination container and verify<\/h3><ol>\n<li>In hPanel, navigate to <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong> for your destination project.<\/li>\n<li>Click <strong>Manage<\/strong> and select <strong>Start<\/strong>.<\/li>\n<li>Once online, click <strong>Open<\/strong> to access the n8n interface.<\/li>\n<li>Log in using your original source credentials.<\/li>\n<li>Review your workflows and credentials to confirm everything transferred correctly.<\/li>\n<\/ol><p><strong>NOTES<\/strong><\/p><ul>\n<li>Keep the source container stopped until you have thoroughly tested the destination instance.<\/li>\n<li>Delete the temporary backup file after a successful migration by running <code>rm \/root\/n8n-backup.tar.gz<\/code>.<\/li>\n<\/ul><h2 id=\"h-method-2-migrate-workflows-and-credentials-via-cli\">Method 2 &ndash; Migrate workflows and credentials via CLI<\/h2><p>Use this method when migrating from alternative self-managed deployments or separate hosting providers where direct volume sharing is not possible.<\/p><h3>Step 1 &ndash; Export workflows from the source instance<\/h3><p>Connect to your source server via SSH. Replace <code>&lt;source-container-name&gt;<\/code> with your active source container name:<\/p><pre><code>docker exec -u node -it &lt;source-container-name&gt; n8n export:workflow --all --output=\/home\/node\/workflows.json\r\ndocker cp &lt;source-container-name&gt;:\/home\/node\/workflows.json \/root\/workflows.json<\/code><\/pre><h3>Step 2 &ndash; Export credentials from the source instance<\/h3><p>Select the option that matches your destination environment.<\/p><p><strong>Option A &ndash; Export encrypted credentials<\/strong><\/p><p>Use this option if your destination instance uses the same <code>N8N_ENCRYPTION_KEY<\/code> value:<\/p><pre><code>docker exec -u node -it &lt;source-container-name&gt; n8n export:credentials --all --output=\/home\/node\/credentials.json\r\ndocker cp &lt;source-container-name&gt;:\/home\/node\/credentials.json \/root\/credentials.json<\/code><\/pre><p><strong>Option B &ndash; Export decrypted credentials<\/strong><\/p><p>Use this option if your destination instance uses a different encryption key:<\/p><pre><code>docker exec -u node -it &lt;source-container-name&gt; n8n export:credentials --all --decrypted --output=\/home\/node\/credentials-decrypted.json\r\ndocker cp &lt;source-container-name&gt;:\/home\/node\/credentials-decrypted.json \/root\/credentials-decrypted.json<\/code><\/pre><p><strong>NOTE<\/strong><\/p><ul>\n<li>Decrypted export files contain plaintext secrets. Treat this data securely, avoid sending it over open networks, and delete it immediately after use.<\/li>\n<\/ul><h3>Step 3 &ndash; Transfer files to the destination VPS<\/h3><p>Replace <code>185.185.185.185<\/code> with your destination Hostinger VPS IP address.<\/p><p>Transfer workflows:<\/p><pre><code>scp \/root\/workflows.json root@185.185.185.185:\/root\/workflows.json<\/code><\/pre><p>Transfer credentials &ndash; run the command matching your export option.<\/p><p>For Option A (encrypted):<\/p><pre><code>scp \/root\/credentials.json root@185.185.185.185:\/root\/credentials.json<\/code><\/pre><p>For Option B (decrypted):<\/p><pre><code>scp \/root\/credentials-decrypted.json root@185.185.185.185:\/root\/credentials-decrypted.json<\/code><\/pre><h3>Step 4 &ndash; Copy export files into the destination container<\/h3><p>Connect to your destination VPS via SSH. Replace <code>&lt;destination-container-name&gt;<\/code> with your target container name.<\/p><p>Copy workflows:<\/p><pre><code>docker cp \/root\/workflows.json &lt;destination-container-name&gt;:\/home\/node\/workflows.json<\/code><\/pre><p>Copy credentials &ndash; run the command matching your export option.<\/p><p>For Option A (encrypted):<\/p><pre><code>docker cp \/root\/credentials.json &lt;destination-container-name&gt;:\/home\/node\/credentials.json<\/code><\/pre><p>For Option B (decrypted):<\/p><pre><code>docker cp \/root\/credentials-decrypted.json &lt;destination-container-name&gt;:\/home\/node\/credentials-decrypted.json<\/code><\/pre><h3>Step 5 &ndash; Import credentials and workflows<\/h3><p>Import credentials first so that incoming workflows can map to existing credential IDs automatically.<\/p><p>For Option A (encrypted):<\/p><pre><code>docker exec -u node -it &lt;destination-container-name&gt; n8n import:credentials --input=\/home\/node\/credentials.json<\/code><\/pre><p>For Option B (decrypted):<\/p><pre><code>docker exec -u node -it &lt;destination-container-name&gt; n8n import:credentials --input=\/home\/node\/credentials-decrypted.json<\/code><\/pre><p>Then import workflows:<\/p><pre><code>docker exec -u node -it &lt;destination-container-name&gt; n8n import:workflow --input=\/home\/node\/workflows.json<\/code><\/pre><h2 id=\"h-map-environment-variables-and-test-workflows\">Map environment variables and test workflows<\/h2><p>After completing Method 2, map any system-level environment variables used by your workflows to your destination VPS. Add them via <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong> &#10095; <strong>Manage<\/strong> &#10095; <strong>Environment variables<\/strong>.<\/p><p>To test each workflow:<\/p><ol>\n<li>Open the destination n8n UI via hPanel &#10095; <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong> &#10095; <strong>n8n container &#10095; &nbsp;<\/strong><strong>Open<\/strong>.<\/li>\n<li>Open an imported workflow and inspect all nodes for credential warnings or missing assignments.<\/li>\n<li>Click <strong>Execute workflow<\/strong> to trigger a manual test run.<\/li>\n<li>Check the execution output of each node for errors. Common post-import failures include <strong>Credential not found<\/strong> and <strong>Webhook URL mismatch<\/strong>. Re-enter credentials or update webhook target URLs in connected third-party services as needed.<\/li>\n<li>Re-run the workflow and confirm the execution log shows a success state for all nodes.<\/li>\n<li>Set the workflow toggle to <strong>Active<\/strong> only after a clean manual test run.<\/li>\n<\/ol><p><strong>NOTE<\/strong><\/p><ul>\n<li>Do not activate workflows in bulk. Enable them one at a time and monitor the execution log for each.<\/li>\n<\/ul><h2 id=\"h-decommission-the-source-or-roll-back\">Decommission the source or roll back<\/h2><p>Leave your source VPS intact for at least 24 to 48 hours after completing the migration.<\/p><p><strong>To roll back if you encounter unexpected issues:<\/strong><\/p><ol>\n<li>Navigate to <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong> on your destination VPS.<\/li>\n<li>Open n8n UI and on each active workflow, set the toggle to <strong>Inactive<\/strong>.<\/li>\n<li>In hPanel, go to your source <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong>.<\/li>\n<li>Open your original n8n project, click <strong> &#8942; <\/strong>, and select <strong>Start<\/strong>.<\/li>\n<li>Confirm the source instance is accessible by clicking <strong>Open<\/strong> and logging in.<\/li>\n<li>Update any third-party services or webhook endpoints to point back to your original domain or IP address.<\/li>\n<\/ol><p><strong>To decommission after a successful migration:<\/strong><\/p><ol>\n<li>Stop the source n8n container via hPanel &#10095; <strong>VPS<\/strong> &#10095; <strong>Docker Manager<\/strong> &#10095; <strong>click &#8942;<\/strong> &#10095; <strong>Stop<\/strong>.<\/li>\n<li>Delete the temporary backup files from both VPS machines based on your chosen migration method.<\/li>\n<li>Remove the source n8n Docker project from <strong>Docker Manager<\/strong> once you confirm the migration is complete.<\/li>\n<\/ol><p>Your n8n workflows and configurations are now fully operational on your new Hostinger VPS.<\/p><h2 id=\"h-additional-resources\">Additional resources<\/h2><ul>\n<li><a href=\"https:\/\/docs.n8n.io\/hosting\/cli-commands\/\" target=\"_blank\" rel=\"noopener\">Official n8n CLI commands documentation<\/a><\/li>\n<li><a href=\"https:\/\/docs.n8n.io\/hosting\/cli-commands\/#export-entities\" target=\"_blank\" rel=\"noopener\">Official n8n credentials export guide<\/a><\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/hostinger-vps-how-to-manage-your-docker-projects\/\">Hostinger VPS: How to manage your Docker projects<\/a><\/li>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/7978544-how-to-use-the-browser-terminal-in-hostinger\/\">How to use the Hostinger VPS browser terminal<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Transfer your n8n workflows, credentials, and settings across Hostinger VPS environments.<\/p>\n","protected":false},"author":648,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-11908","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/11908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/648"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=11908"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/11908\/revisions"}],"predecessor-version":[{"id":11913,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/11908\/revisions\/11913"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=11908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=11908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=11908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}