[{"data":1,"prerenderedAt":161},["ShallowReactive",2],{"seo-verification":3,"blog-n8n-migration-npm-to-docker-before-v3-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-n8n-migration-npm-to-docker-before-v3-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"category":21,"categories":26,"featuredImage":28,"bgImage":29,"posterImage":30,"relatedSolution":31,"intro":34,"sections":35,"ctaTitle":110,"ctaBody":111,"ctaButton":112,"ctaUrl":113,"relatedPosts":114},344,"n8n-migration-npm-to-docker-before-v3",{"fr":12,"en":10,"ar":13,"es":14},"n8n-migration-npm-docker-avant-v3","n8n-migration-npm-to-docker-before-v3-ar","n8n-migracion-npm-docker-antes-v3","n8n 3.0: migrating from npm to Docker before October 2026","n8n 3.0 drops npm and npx support in October 2026. Detect your launch mode, export your workflows, and switch to Docker Compose with PostgreSQL before the deadline.",8,0,false,"2026-09-09T00:00:00+00:00",{"id":22,"name":23,"slug":24,"color":25,"icon":24},2,"Automation","automatisation","bg-brand-action\u002F10 text-brand-action",[27],{"id":22,"name":23,"slug":24,"color":25,"icon":24},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fn8n-migration-npm-docker-avant-v3-poster.svg",{"categorySlug":32,"appSlug":33},"automation-workflows","n8n","n8n 3.0 is scheduled for October 2026 and introduces a structural change: support for npm and npx installations is removed. Only Docker will be distributed. If your instance still runs with `npx n8n` or a global npm package, migration must happen before that date — not because it stops working today, but because a planned migration is always safer than an emergency migration on a Sunday night.",[36,40,49,52,61,64,92,96,99,107],{"type":37,"title":38,"body":39},"h2","What changes with n8n 3.0 and why act now","The official n8n 3.0 breaking changes documentation is unambiguous: \"Self-hosted n8n will require a Docker-based deployment. n8n 3.0 will no longer support installations run using `npm` or `npx n8n`.\" This is not a gradual deprecation warning — it is a hard deadline. In October 2026, any instance launched via `npx n8n` or a global npm package will no longer be updatable. It will be frozen on the last 2.x version, without security patches.",{"type":41,"title":42,"items":43},"ul","Risks of delaying migration to October",[44,45,46,47,48],"**Migration under pressure** — migrating in an emergency while critical automations are running exposes you to configuration errors that are difficult to diagnose.","**SQLite data loss** — GitHub issue #22341 documents cases where Docker containers updated without precautions caused a database regression: workflows and executions \"go back in time\" to the state of an old backup.","**No security patches** — an npm instance frozen at 2.x no longer receives security patches or stability fixes published for the 3.x branch.","**Growing incompatibility** — integrations, community nodes and webhooks rely on APIs that evolve; staying on a dead version creates growing incompatibility debt.","**Unpredictable duration** — a well-prepared migration takes one hour; an improvised migration can take a full day, during which your workflows are stopped.",{"type":37,"title":50,"body":51},"Prerequisites before starting","This procedure targets an existing n8n instance in production. If you are starting from scratch, refer to the dedicated article on installing n8n on a VPS.",{"type":41,"title":53,"items":54},"What you need",[55,56,57,58,59,60],"**VPS with root access** — Ubuntu 22.04 or Debian 12 recommended, minimum 2 vCPU and 2 GB RAM for n8n alone, 4 GB if you add PostgreSQL on the same host.","**Docker Engine and Docker Compose v2** — verify with `docker --version` and `docker compose version` (no-hyphen syntax, v2 plugin).","**PostgreSQL recommended** — n8n supports both SQLite and PostgreSQL, but SQLite on Docker carries data loss risks during poorly managed updates (cf. issue #22341); PostgreSQL is the target for any instance that matters.","**Access to the current npm instance** — the migration requires exporting workflows via the REST API before stopping the old instance.","**A domain name and a TLS certificate** — n8n in production is not exposed over raw HTTP; Nginx acts as a reverse proxy with Let's Encrypt.","**A planned maintenance window** — even a short one avoids losing in-progress executions.",{"type":37,"title":62,"body":63},"Detect your current launch mode","Before anything else, identify precisely how your n8n instance is launched. The command to use depends on the supervision mode.",{"type":65,"title":66,"steps":67},"steps","Detect, export, deploy and validate",[68,71,74,77,80,83,86,89],{"title":69,"body":70},"Identify the n8n process","Look for the running executable: `which n8n` shows the path if n8n is installed globally via npm. Then check if a system service supervises it: `systemctl status n8n` or `systemctl status n8n.service`. If no systemd service exists, look for an active process: `ps aux | grep n8n`. A result containing `node ...\u002Fn8n\u002Fbin\u002Fn8n` or `npx n8n` confirms an npm installation.",{"title":72,"body":73},"Locate the configuration file and database","The default data directory is `~\u002F.n8n\u002F`. Check its contents: `ls -la ~\u002F.n8n\u002F`. The `database.sqlite` file indicates an SQLite database. Note the full path — you will need it for the export. If the `N8N_USER_FOLDER` variable is set in the process environment (`cat \u002Fproc\u002F$(pgrep -f n8n)\u002Fenviron | tr '\\0' '\\n' | grep N8N`), that path takes precedence.",{"title":75,"body":76},"Export all your workflows via the REST API","The n8n REST API allows exporting workflows as JSON. First retrieve an API key from the interface (`Settings → API → Create API Key`), then export: `curl -s -H 'X-N8N-API-KEY: YOUR_KEY' http:\u002F\u002Flocalhost:5678\u002Fapi\u002Fv1\u002Fworkflows | python3 -m json.tool > workflows-export-$(date +%Y%m%d).json`. Verify the file contains your workflows: `python3 -c \"import json; d=json.load(open('workflows-export-*.json')); print(len(d['data']), 'workflows exported')\"`. Keep this file safe before any operation.",{"title":78,"body":79},"Cleanly stop the npm instance","If supervised by systemd: `systemctl stop n8n && systemctl disable n8n`. If launched manually in a terminal or via a startup script, identify the PID (`pgrep -f n8n`) then `kill -SIGTERM \u003CPID>`. Wait a few seconds for n8n to finish in-progress executions before forcing the stop. Once stopped, back up `~\u002F.n8n\u002Fdatabase.sqlite` if you want to preserve execution history.",{"title":81,"body":82},"Create the docker-compose.yml file with PostgreSQL","Create a dedicated directory: `mkdir -p \u002Fopt\u002Fn8n && cd \u002Fopt\u002Fn8n`. Then create the `docker-compose.yml` file with the following content — adapt passwords and domain:\n\n```yaml\nservices:\n  postgres:\n    image: postgres:16-alpine\n    restart: unless-stopped\n    environment:\n      POSTGRES_DB: n8n\n      POSTGRES_USER: n8n\n      POSTGRES_PASSWORD: CHANGE_THIS_PASSWORD\n    volumes:\n      - postgres_data:\u002Fvar\u002Flib\u002Fpostgresql\u002Fdata\n    healthcheck:\n      test: [\"CMD-SHELL\", \"pg_isready -U n8n\"]\n      interval: 10s\n      timeout: 5s\n      retries: 5\n\n  n8n:\n    image: n8nio\u002Fn8n:2.38.4\n    restart: unless-stopped\n    depends_on:\n      postgres:\n        condition: service_healthy\n    environment:\n      DB_TYPE: postgresdb\n      DB_POSTGRESDB_HOST: postgres\n      DB_POSTGRESDB_PORT: 5432\n      DB_POSTGRESDB_DATABASE: n8n\n      DB_POSTGRESDB_USER: n8n\n      DB_POSTGRESDB_PASSWORD: CHANGE_THIS_PASSWORD\n      N8N_HOST: your-domain.com\n      N8N_PORT: 5678\n      N8N_PROTOCOL: https\n      WEBHOOK_URL: https:\u002F\u002Fyour-domain.com\u002F\n      N8N_BASIC_AUTH_ACTIVE: \"true\"\n      N8N_BASIC_AUTH_USER: admin\n      N8N_BASIC_AUTH_PASSWORD: CHANGE_THIS_AUTH_PASSWORD\n    volumes:\n      - n8n_data:\u002Fhome\u002Fnode\u002F.n8n\n    ports:\n      - \"127.0.0.1:5678:5678\"\n\nvolumes:\n  postgres_data:\n  n8n_data:\n```\n\nNote: the version is pinned to `2.38.4` (stable as of 2026-09-09). Never use `:latest` — see the tip below.",{"title":84,"body":85},"Start the stack and import workflows","Start the stack: `docker compose up -d`. Wait for both containers to be healthy: `docker compose ps`. Once n8n is accessible at `http:\u002F\u002F127.0.0.1:5678`, import your workflows via the API: `curl -s -X POST -H 'X-N8N-API-KEY: YOUR_NEW_KEY' -H 'Content-Type: application\u002Fjson' -d @workflows-export-YYYYMMDD.json http:\u002F\u002F127.0.0.1:5678\u002Fapi\u002Fv1\u002Fworkflows`. Verify in the interface that your workflows, connections and credentials are present.",{"title":87,"body":88},"Configure Nginx as a reverse proxy with TLS","Install Nginx and Certbot if not already done: `apt install nginx certbot python3-certbot-nginx -y`. Create the Nginx configuration in `\u002Fetc\u002Fnginx\u002Fsites-available\u002Fn8n` with a proxy_pass to `http:\u002F\u002F127.0.0.1:5678`, including WebSocket upgrade headers and a 300s read timeout. Enable the site and obtain the certificate: `ln -s \u002Fetc\u002Fnginx\u002Fsites-available\u002Fn8n \u002Fetc\u002Fnginx\u002Fsites-enabled\u002F && certbot --nginx -d your-domain.com`.",{"title":90,"body":91},"Validate that the migration succeeded","Perform these checks in order: 1) access `https:\u002F\u002Fyour-domain.com` — the login page appears without a TLS warning; 2) log in and verify your workflows are present and active; 3) manually trigger a simple workflow to validate end-to-end execution; 4) check webhooks: if third-party services point to your old URL or old port, update them in n8n (`Settings → Webhooks`); 5) let it run for 24 hours and review the logs: `docker compose logs n8n --since 24h | grep -i error`.",{"type":93,"title":94,"body":95},"tip","Always pin a version, never :latest","Using `n8nio\u002Fn8n:latest` in your `docker-compose.yml` exposes you to uncontrolled automatic updates during a `docker compose pull`. On an SQLite database, a major version jump without prior migration can trigger the scenario described in issue #22341: data appears present in the volume but the database reverts to an earlier state. Always pin a specific version (`n8nio\u002Fn8n:2.38.4`) and plan your upgrades. To move to a new version, read the release notes first, then: `docker compose pull && docker compose up -d`.",{"type":37,"title":97,"body":98},"Troubleshooting: common issues after migration","Here are the most frequently encountered problems during this transition.",{"type":41,"title":100,"items":101},"Issues and solutions",[102,103,104,105,106],"**Empty workflows after import** — verify that the exported JSON format matches what the import API expects; some n8n versions export an `{ data: [] }` object, others a direct array. Adapt the `curl` command accordingly.","**Webhooks no longer responding** — the `WEBHOOK_URL` variable must match exactly the public URL of your instance (with `https:\u002F\u002F`). Incorrect setup generates wrong webhook URLs in the interface.","**Inaccessible credentials** — credentials are encrypted with the `N8N_ENCRYPTION_KEY`. If you do not set it explicitly and start from a new `n8n_data` volume, old credentials are lost. Retrieve the key from `~\u002F.n8n\u002F.n8n_encryption_key` on the npm instance and set it as an environment variable.","**SQLite database regression (issue #22341)** — if you chose to keep SQLite temporarily, ensure the Docker volume is mounted persistently and that you are not using `--rm` or an aggressive restart policy. Migration to PostgreSQL remains the definitive resolution.","**`ECONNREFUSED` error on PostgreSQL** — the `depends_on.postgres.condition: service_healthy` condition and the `pg_isready` healthcheck ensure n8n waits for PostgreSQL to be ready. Without this condition, n8n starts before PostgreSQL and fails.",{"type":37,"title":108,"body":109},"A migration to do now, not in October","The stable version of n8n at the time of this article is 2.38.4. You have several weeks to conduct this migration properly: cleanly export your workflows, test the Docker stack on a test server, then switch production with a real rollback plan. In October, when n8n 3.0 is available, you will only need to bump the version number in your `docker-compose.yml` — a five-minute step. The difference between five minutes and a stressful day starts now.","A VPS ready for Docker and n8n","ServOrbit offers VPS with root access, dedicated IPv4 and OS choice. Launch your n8n stack in minutes with our Docker template.","Deploy n8n on ServOrbit VPS","\u002Fvps-cloud",[115,131,146],{"id":116,"slug":117,"slugs":118,"title":122,"excerpt":123,"readTime":124,"views":18,"isPinned":19,"publishedAt":125,"category":126,"categories":127,"featuredImage":28,"bgImage":29,"posterImage":129,"relatedSolution":130},3,"install-n8n-on-vps-with-docker-complete-2026-guide",{"fr":119,"en":117,"ar":120,"es":121},"installer-n8n-vps","تثبيت-n8n-على-vps-مع-docker-دليل-شامل-2026","instalar-n8n-en-vps-con-docker","Install n8n on VPS with Docker: complete 2026 guide","Deploy n8n on VPS with Docker, reverse proxy and HTTPS. Covers V8 crash, 502 nginx, npm migration and execution security (GHSA-vrv8-j27g-g7cr advisory, August 2026).",12,"2026-06-05T00:00:00+00:00",{"id":22,"name":23,"slug":24,"color":25,"icon":24},[128],{"id":22,"name":23,"slug":24,"color":25,"icon":24},"\u002Fblog\u002Fcovers\u002Finstaller-n8n-vps-poster.svg",{"categorySlug":32,"appSlug":33},{"id":132,"slug":133,"slugs":134,"title":138,"excerpt":139,"readTime":17,"views":140,"isPinned":19,"publishedAt":141,"category":142,"categories":143,"featuredImage":28,"bgImage":29,"posterImage":145,"relatedSolution":28},338,"replace-github-actions-with-woodpecker-ci-on-a-vps",{"fr":135,"en":133,"ar":136,"es":137},"remplacer-github-actions-woodpecker-ci-self-hosted-vps","استبدال-github-actions-بـwoodpecker-ci-على-vps","reemplazar-github-actions-con-woodpecker-ci-en-vps","Replace GitHub Actions with Woodpecker CI on a VPS","GitHub announced then suspended billing for self-hosted runners on private repos. Switch to Woodpecker CI: clean syntax, under 50 MB RAM, fixed cost on your VPS.",1,"2026-09-07T00:00:00+00:00",{"id":22,"name":23,"slug":24,"color":25,"icon":24},[144],{"id":22,"name":23,"slug":24,"color":25,"icon":24},"\u002Fblog\u002Fcovers\u002Fremplacer-github-actions-woodpecker-ci-self-hosted-vps-poster.svg",{"id":147,"slug":148,"slugs":149,"title":153,"excerpt":154,"readTime":155,"views":18,"isPinned":19,"publishedAt":156,"category":157,"categories":158,"featuredImage":28,"bgImage":29,"posterImage":160,"relatedSolution":28},307,"zapier-vs-n8n-cost-migration-2026",{"fr":150,"en":148,"ar":151,"es":152},"zapier-vs-n8n-cout-migration-2026","zapier-مقابل-n8n-التكلفة-والهجرة-2026","zapier-vs-n8n-costo-migracion-2026","Zapier vs n8n self-hosted: real cost and migration for agencies","Zapier Pro caps at 750 tasks\u002Fmonth. Compare the real cost vs self-hosted n8n and follow the step-by-step migration guide for agencies.",9,"2026-08-27T00:00:00+00:00",{"id":22,"name":23,"slug":24,"color":25,"icon":24},[159],{"id":22,"name":23,"slug":24,"color":25,"icon":24},"\u002Fblog\u002Fcovers\u002Fzapier-vs-n8n-cout-migration-2026-poster.svg",1789046173751]