Mad World #Save_GAZA: Free Palestine  

Search

n8n Update to 3.0 in Docker: Backup, Upgrade and Rollback

n8n Update to 3.0 in Docker: Backup, Upgrade and Rollback

Updating n8n in Docker within version 2.x is quick: a new image tag, a pull and a restart. The move to n8n 3.0 is different. It removes old nodes, changes several defaults and changes the database, and n8n's announcement calls it one way: there is no going back to 2.x afterwards. The documentation names n8n 3.4.1, released on 26 November 2026, as the stable 3.0 release, and on 3 December 2026 the latest tag of the Docker image already pointed to 3.4.3.

We tested the whole path on 3 December 2026 on an Ubuntu 26.04.1 server with Docker 29.10.1: n8n 2.49.9 with two workflows and one credential, updated to 2.50.6, fixed with the Migration Report, backed up, upgraded to 3.4.3, then rolled back twice, the wrong way and the right way. Every screenshot below comes from that test.

Quick answer: update n8n in Docker

In plain words: n8n in Docker is a program, the image, plus your data, kept in a volume. An update tells Docker to run a newer image on the same data. Within 2.x that is routine. The jump to 3.0 rewrites part of the data on its first start, so you fix your workflows first, copy the data somewhere safe, and only then switch.

  1. Check the version that runs and the image tag in docker-compose.yml. With latest or no tag, the next pull is already 3.x.
  2. Update to the latest 2.x with an exact tag (2.50.6 on 3 December 2026): change the tag, then run docker compose pull and docker compose up -d.
  3. Open Settings > Migration Report and fix every workflow it lists: Migrate where n8n offers it, by hand where it does not.
  4. Stop n8n and back up the whole data volume (database and encryption key) and the compose file.
  5. Change the tag to the 3.x version (3.4.3 here), pull and start. Let the first start finish its database migrations.
  6. Check the version and the log, then run a workflow. To go back, restore the backup: changing the tag back is not enough.

Each step has a full, tested section below. The result in our lab:

n8n 3.4.3 editor, workflow Daily status check run by hand: Logs says Success in 632ms for Schedule Trigger and Build status, and the output shows status ok and checkedAt 2026-12-03T10:01:19.127Z
1: the run on n8n 3.4.3 succeeded. 2: the output of its Code node.

What you need

  • n8n running with Docker Compose, its data in a named volume. Ours is the official n8nio/n8n image with the n8n_data volume mounted at /home/node/.n8n, as in n8n's documentation, and the default SQLite database.
  • Docker Engine with the Compose plugin. We used Ubuntu 26.04.1 LTS, Docker 29.10.1 and Docker Compose v5.8.1.
  • The owner or an admin account in n8n. Other users see only the workflows they can edit in the Migration Report, and not its Instance issues tab.
  • Disk space for one more n8n image and for a copy of the volume.

Check both Docker versions:

Terminal
docker --version
docker compose version
Terminal on an Ubuntu server: docker --version prints Docker version 29.10.1 and docker compose version prints Docker Compose version v5.8.1
1: Docker Engine. 2: the Compose plugin.

Step 1: Check your n8n version and image tag

Go to the folder of your compose file (~/n8n in our test). This is the file we started from, with n8n 2.49.9:

YAML
services:
  n8n:
    image: n8nio/n8n:2.49.9
    restart: unless-stopped
    ports:
      - "5678:5678"
    environment:
      - GENERIC_TIMEZONE=America/New_York
      - TZ=America/New_York
      - N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true
      - N8N_SECURE_COOKIE=false
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:
Terminal: cat docker-compose.yml shows the n8n service with the image n8nio/n8n:2.49.9, port 5678, the time zone, N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS, N8N_SECURE_COOKIE=false and the n8n_data volume
1: the compose file we started from.
  • image: an exact version. The tag decides what docker compose pull downloads, so it is the line each step below changes.
  • n8n_data:/home/node/.n8n: the volume with the database, the encryption key and the settings. It stays when the container is replaced, which is why an update keeps your workflows.
  • GENERIC_TIMEZONE and TZ: the time zone of Schedule Trigger nodes and of the container. Use yours.
  • N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS: n8n sets 0600 permissions on its settings file, the one that holds the key.
  • N8N_SECURE_COOKIE=false: lets you sign in over plain HTTP on your own network. By default n8n sends its cookie over HTTPS only; remove the line once n8n is behind HTTPS.

Then read the tag and ask the running container for its version:

Code
grep image: docker-compose.yml
docker compose exec n8n n8n --version
Terminal: grep image: docker-compose.yml shows image: n8nio/n8n:2.49.9, and docker compose exec n8n n8n --version prints 2.49.9
1: the tag the compose file asks for. 2: the version that runs.

If the image line has no tag, or :latest, first change it to the version that runs now. On 3 December 2026, latest was the same image as 3.4.3 (see the tag section below), so a plain docker compose pull would have moved this server to 3.0 without any of the checks in this guide.

If you installed n8n with our guide Run n8n with Docker Compose, the version is the N8N_VERSION line of .env, used by both the n8n and the task runner images. Change it there: the documentation says the runners image version must match the n8n version.

Step 2: Update to the latest 2.x first

n8n's announcement gives the order: update to the latest 2.x, open the Migration Report, fix what it flags, take a full backup, then upgrade. The Migration Report exists from 2.39 on, and the latest 2.x has its newest version: 2.50.6 on 3 December 2026. Change the tag, check it, pull and restart:

Code
sed -i 's|n8nio/n8n:2.49.9|n8nio/n8n:2.50.6|' docker-compose.yml
grep image: docker-compose.yml
docker compose pull
docker compose up -d
docker compose exec n8n n8n --version
Terminal: sed changes the tag to n8nio/n8n:2.50.6, docker compose pull pulls it in 84.3 seconds, docker compose up -d starts the container and n8n --version prints 2.50.6
1: the new tag. 2: check it. 3: download the image. 4: replace the container. 5: the new version.

The pull took 84 seconds here. docker compose up -d replaces the container with one from the new image and keeps the volume, so the workflows, credentials and accounts stay. The sed line only edits the tag; any text editor does the same.

Step 3: Read the warnings and the Migration Report

A 2.x instance already lists the defaults that 3.0 changes, in its log at each start:

Terminal
docker compose logs n8n | grep -A 6 'There are deprecations'
Terminal: the n8n 2.49.9 log lists deprecations: N8N_UNVERIFIED_PACKAGES_ENABLED, N8N_RUNNERS_MODE, N8N_RUNNERS_TASK_TIMEOUT from 300 to 60, and the two compression limits
1: the defaults that change, as the 2.x log lists them at each start.

Each line names a variable and what happens to its default. Two of them can stop workflows that work today: N8N_RUNNERS_TASK_TIMEOUT, the time a Code node may run, goes from 300 to 60 seconds, and N8N_UNVERIFIED_PACKAGES_ENABLED goes to false, so unverified community nodes stop loading. If you need the old value, set it in the environment section of the compose file before the upgrade.

Then open the Migration Report: Settings > Migration Report, or the link in the Get ready for n8n 3.0 banner at the top of the editor. It checks every workflow against the 3.0 changes:

n8n Settings, Migration report on 2.50.6: 1 of 2 compatible, with the workflow issues Cron node removed and Item Lists node removed, both marked Executions will fail
1: one of two workflows is ready for 3.0. 2: the Cron node issue. 3: the Item Lists node issue.

One of our two workflows failed, with two issues marked Executions will fail: its Cron node and its Item Lists node are removed in 3.0. The announcement's list of removed nodes also has Function, Function Item, Interval, the legacy OpenAI node and older AI Agent modes. Function nodes become Code nodes, and Cron and Interval become Schedule Trigger nodes.

Migrate a Cron node automatically

Click an issue to see the workflows it affects. For Cron, n8n offers a Migrate button that rewrites the node:

Migration report, Cron node issue: the affected workflow Nightly cleanup (old nodes) and a Migrate button on its row
1: Migrate rewrites the node for you.
Migrate dialog: Migrate saves the changes as a new version, and the published version keeps running unchanged, with the Migrate button
1: confirm: n8n saves a new version of the workflow.

Migrate saves the result as a new version of the workflow. In our test the node kept its name, Cron, and became a Schedule Trigger node. Test the new version, then publish it before the upgrade: until you do, a published workflow keeps running its old version, the one with the removed node.

Replace an Item Lists node by hand

Migrate does not cover every case. For our Item Lists node, the report refused:

Item Lists node issue: n8n cannot migrate the node because Field to Split Out is empty, and says to replace this node by hand
1: why Migrate cannot fix this node.

The node had no field set, so n8n could not tell what to split. The documentation says to replace Item Lists with the node that matches the operation you use: Split Out, Aggregate, Sort, Limit, Remove Duplicates or Summarize. We deleted it, added a Split Out node with the field to split, and saved:

n8n editor, workflow Nightly cleanup (old nodes): the Cron node, now a Schedule Trigger node, connected to a new Split Out node
1: the Split Out node that replaces Item Lists.

Check that every workflow is compatible

n8n checks a workflow again each time you save it. After the two fixes, the report showed 2 of 2 compatible:

Migration report after the fixes: 2 of 2 compatible, and on the Instance issues tab, Task runner timeout default is reduced to 1 minute, marked Executions might fail
1: both workflows are ready for 3.0. 2: an instance setting to check: the time limit of Code nodes.

The Instance issues tab still lists four items: they are settings, not workflows, so they stay listed. Read each one. The task runner timeout is one of them: if a Code node of yours runs longer than a minute, add N8N_RUNNERS_TASK_TIMEOUT=300 to the environment of n8n, and of every external task runner, as the report says.

Step 4: Back up n8n before the upgrade

The full backup in n8n's documentation is the .n8n folder, which in Docker is the n8n_data volume: it holds the config file with the credential encryption key and, with SQLite, the database itself. With PostgreSQL, also back up the database with its own tools. We made two backups: JSON exports, then the whole volume.

Export workflows and credentials

Terminal
docker compose exec n8n n8n export:workflow --backup --output=/home/node/.n8n/backups/workflows/
docker compose exec n8n n8n export:credentials --backup --output=/home/node/.n8n/backups/credentials/
docker compose exec n8n ls /home/node/.n8n/backups/workflows/
Terminal: n8n export:workflow --backup exports 2 workflows and n8n export:credentials --backup exports 1 credential into /home/node/.n8n/backups, and ls lists the two workflow files
1: the workflows. 2: the credentials, still encrypted. 3: one JSON file per workflow.

--backup writes one readable JSON file per workflow and per credential. We wrote them inside the volume on purpose: the documentation warns that a backups folder elsewhere in the container is lost when the container is recreated. The credentials stay encrypted, so they need the same encryption key, and the exports leave out users, execution history, variables and instance settings. They are not a full backup.

Back up the whole volume

Find the volume's name, stop n8n so the SQLite database does not change during the copy, archive the volume with a throwaway Alpine container, and make the archive readable by you only:

Terminal
docker volume ls
docker compose stop
docker run --rm -v n8n_n8n_data:/data:ro alpine tar czf - -C /data . > n8n-backup-2.50.6.tar.gz
chmod 600 n8n-backup-2.50.6.tar.gz
Terminal: docker volume ls shows n8n_n8n_data, docker compose stop stops n8n, an Alpine container archives the volume read-only into n8n-backup-2.50.6.tar.gz, and chmod 600 locks it
1: the volume name. 2: stop n8n. 3: archive the volume. 4: only your user can read the archive.

Compose puts the project name in front of the volume name: n8n_n8n_data is the n8n_data volume of a project in a folder named n8n. The :ro mount means the backup container cannot change anything. Then keep the compose file as it was, and check the archive:

Code
cp docker-compose.yml docker-compose.yml.2.50.6
ls -lh n8n-backup-2.50.6.tar.gz docker-compose.yml.2.50.6
tar tzf n8n-backup-2.50.6.tar.gz | grep -v "^./backups/" | head -n 12
Terminal: cp keeps docker-compose.yml.2.50.6, ls -lh shows the 496K archive with -rw------- and the compose copy, and tar tzf lists database.sqlite, config, storage and nodes
1: the compose file as it was. 2: both files. 3: inside the archive: the database, and config with the encryption key.

The archive has the database (database.sqlite with its -wal and -shm files) and config, the encryption key. Anyone with this file can read every credential, so treat it like a password and keep a copy off the server.

Step 5: Upgrade n8n to 3.0

The same moves as Step 2, with the exact 3.x version:

Code
sed -i 's|n8nio/n8n:2.50.6|n8nio/n8n:3.4.3|' docker-compose.yml
grep image: docker-compose.yml
docker compose pull
docker compose up -d
docker compose exec n8n n8n --version
Terminal: sed changes the tag to n8nio/n8n:3.4.3, docker compose pull pulls it in 97.4 seconds, docker compose up -d starts it and n8n --version prints 3.4.3
1: the 3.x tag. 2: check it. 3: download the image. 4: start n8n 3.4.3. 5: the new version.

The pull took 97 seconds. Give the first start a minute: it updates the database first, and its log asks you not to stop the process during that time. The log of that start:

Terminal
docker compose logs n8n | tail -n 30
Terminal: log of the first n8n 3.4.3 start: Migrations in progress, four migrations, the Python task runner warning, one deprecation, Recorded version change: 2.50.6 -> 3.4.3, Version: 3.4.3
1: the first start: database migrations, then the new version and the editor address.

From the top: four database migrations ran, one after the other. The Python task runner did not start because the image has no Python 3; that concerns only Python in Code nodes, and the log points to external task runners for it. The JavaScript runner registered a few lines further down. One deprecation is left, N8N_RUNNERS_MODE, then come Recorded version change: 2.50.6 -> 3.4.3 and the editor address.

Step 6: Check that n8n 3.0 works

Four log lines tell you the upgrade finished, and the container should stay up:

Terminal
docker compose logs n8n | grep -E 'Migrations in progress|Recorded version change|Version:|Editor is now'
docker compose ps --format 'table {{.Name}}\t{{.Image}}\t{{.Status}}'
Terminal: grep on the n8n log shows Migrations in progress, Recorded version change: 2.50.6 -> 3.4.3, Version: 3.4.3 and Editor is now accessible; docker compose ps shows 3.4.3 Up About a minute
1: the four lines that tell you the upgrade finished. 2: the container stays up.

Then sign in and run your important workflows once by hand. The screenshot at the top of this guide is ours: Daily status check on 3.4.3, Success in 632 ms, with the expected output.

Roll back n8n 3.0 to 2.x

The wrong way: change the tag back

The quick move first: put the 2.50.6 tag back and restart.

Code
sed -i 's|n8nio/n8n:3.4.3|n8nio/n8n:2.50.6|' docker-compose.yml
docker compose up -d
docker compose ps --format 'table {{.Name}}\t{{.Image}}\t{{.Status}}'
docker compose logs n8n | tail -n 20
Terminal: sed puts the tag back to 2.50.6, docker compose up -d starts it, docker compose ps shows Up 42 seconds, and the log says Recorded version change: 3.4.3 -> 2.50.6 with no error
1: the old tag back. 2: start. 3: up, no error. 4: n8n 2.50.6 now runs on the database 3.4.3 changed.

No error: the container is up, the log says Recorded version change: 3.4.3 -> 2.50.6, and the editor opened. That is the trap. The database still holds the 3.x migrations, as the next section shows, and the documentation is clear: changing the image tag back to the older version doesn't reverse database migrations. 2.50.6 now runs on a database that 3.4.3 changed.

The right way: restore the backup

Stop n8n, read the newest migrations in the database, empty the volume, restore the archive from Step 4, and read them again:

Terminal
docker compose down
docker run --rm -v n8n_n8n_data:/data alpine sh -c "apk add -q sqlite && sqlite3 /data/database.sqlite 'SELECT name FROM migrations ORDER BY id DESC LIMIT 3'"
docker run --rm -v n8n_n8n_data:/data alpine find /data -mindepth 1 -delete
docker run --rm -i -v n8n_n8n_data:/data alpine tar xzf - -C /data < n8n-backup-2.50.6.tar.gz
docker run --rm -v n8n_n8n_data:/data alpine sh -c "apk add -q sqlite && sqlite3 /data/database.sqlite 'SELECT name FROM migrations ORDER BY id DESC LIMIT 3'"
Terminal: docker compose down, a query of the migrations table shows three 3.x migrations, find empties the volume, tar restores n8n-backup-2.50.6.tar.gz, and the same query shows 2.x migrations
1: stop n8n. 2: the newest migrations, from 3.4.3. 3: empty the volume. 4: restore the backup. 5: the newest migrations, from 2.x again.

Before the restore, the three newest migrations are ones that 3.4.3 added at its first start. After it, they are 2.x ones again. The documentation suggests the same check on the migrations table before an update, to note where to stop. The two sqlite3 lines install SQLite in a throwaway container, so they need internet access, and they only read. The find line deletes everything in the volume: run it only with the backup at hand. Then put the old compose file back and start:

Code
cp docker-compose.yml.2.50.6 docker-compose.yml
docker compose up -d
docker compose exec n8n n8n --version
Terminal: cp puts docker-compose.yml.2.50.6 back, docker compose up -d starts the container and n8n --version prints 2.50.6
1: the old compose file. 2: start. 3: back on 2.50.6.
n8n 2.50.6 after the restore: the banner Get ready for n8n 3.0 and the two workflows, Nightly cleanup (old nodes) and Daily status check
1: the banner of a 2.x instance. 2 and 3: both workflows are back.

2.50.6 is back with both workflows, the credential and the banner of a 2.x instance, and the Migration Report showed 2 of 2 compatible, as at the time of the backup. Anything done on 3.x after the backup is gone: the documentation warns that a restore discards changes made after it. It also describes reverting the migrations with n8n db:revert from the newer version, one migration per run, and says to restore the backup when a migration cannot be reverted.

Stay on n8n 2.x for now

You do not have to move on the first day. Version 2.x keeps getting security and critical bug fixes for 12 months after the 3.0 stable release, while new features ship on 3.x only. To get 2.x updates without a jump to 3.x, pin each version as in Step 2, or use the :2 tag. What the tags were on 3 December 2026:

Terminal
docker pull -q n8nio/n8n:2
docker pull -q n8nio/n8n:latest
docker image ls n8nio/n8n --format 'table {{.Repository}}:{{.Tag}}\t{{.ID}}'
Terminal: docker pull of n8nio/n8n:2 and n8nio/n8n:latest, then docker image ls: latest and 3.4.3 share the image ID ea94f42e49ab, and 2 and 2.50.6 share ef1beab04097
1: the 2 tag. 2: the latest tag. 3: which version each tag is.

n8nio/n8n:2 was the same image as 2.50.6, and latest the same as 3.4.3. n8n's Docker page pulls n8nio/n8n for the latest stable version, which now means 3.x. Still on 1.x? There is no direct path to 3.x: update to 2.x first. Support for 1.x ends on 31 December 2026.

What changes in n8n 3.0

The main breaking changes in the documentation, and what to do before the upgrade:

Change in 3.0What to do
Self-hosted n8n runs on Docker only: no runnable npm packageInstalled with npm or npx: move to Docker first
Removed nodes: Function, Function Item, Item Lists, Cron, Interval, the legacy OpenAI node and othersFix them in the Migration Report: Code, Split Out and similar nodes, Schedule Trigger
N8N_RUNNERS_TASK_TIMEOUT default from 300 to 60 secondsSet it to 300 if Code nodes run longer than a minute
N8N_UNVERIFIED_PACKAGES_ENABLED default from true to falseSet it to true, or move to verified community nodes
~/.n8n/binaryData renamed to ~/.n8n/storageA volume mounted on binaryData moves to storage; n8n stops if both folders exist
Compression node limits: 2 GiB to 256 MiB, 5,000 to 1,000 ZIP entriesSet both variables to the old values if you need them
Encryption key rotation on by defaultNothing, the documentation says; back up first
Chat Hub off by default; Import from URL removed from the editorAdd chat-hub to N8N_ENABLED_MODULES; import workflows from a file

Frequently asked questions

How do I update n8n in Docker?

Change the image tag in docker-compose.yml, then run docker compose pull and docker compose up -d. The data stays in the volume. Within 2.x that is all; for 3.0, run the Migration Report and back up first.

Can I go back from n8n 3.0 to 2.x?

Only cleanly with a backup taken before the upgrade. Changing the tag back started 2.50.6 without an error in our test, on a database that still held the 3.x migrations. The documentation also describes n8n db:revert, one migration per run.

Does docker compose pull update n8n to 3.0?

With :latest or no tag, yes: on 3 December 2026, latest was 3.4.3. With an exact 2.x tag or :2, no.

What does a full n8n backup include?

The .n8n folder, which is the n8n_data volume in Docker: the SQLite database and the config file with the encryption key. With PostgreSQL, the database dump as well. The CLI exports alone miss users, executions, variables, settings and the key.

Is n8n 3.0 stable?

Yes. The documentation names 3.4.1, released on 26 November 2026, as the stable release; earlier 3.x versions were betas. We upgraded to 3.4.3.

How long is n8n 2.x supported?

The announcement promises security and critical bug fixes for 12 months after the 3.0 stable release. New features ship on 3.x only.

Where is the n8n Migration Report?

In Settings > Migration Report on 2.39 and later 2.x versions. From 3.5.0, 3.x instances no longer show it, so run it before you upgrade.

What if I still run n8n 1.x?

Update to 2.x first: there is no direct path from 1.x to 3.x. Support for 1.x ends on 31 December 2026.

Sources

Fatima Ezzahra

Posts by Fatima Ezzahra cover AI image prompts, AI tools and open source software. How we test

Leave a comment

Your email address will not be published. Required fields are marked *

Your experience on this site will be improved by allowing cookies Cookie Policy