Site icon JD Bots

How to Update n8n in Docker

Card titled How to Update n8n in Docker, labelled n8n Tutorial how-to, with a terminal window ticking off four steps: check your version, run the upgrade, new images pulled, workflows kept.

If you installed n8n with its one-line setup, updating it takes one command, and your workflows, credentials and settings stay where they are. This guide shows how to update n8n in Docker: check which version you have, run the update, and confirm the new version.

By the end, your n8n runs the newest stable release, with all your work still in place.

Cost: free. Updating the Community Edition costs nothing.

Every screen and output on this page is real, from an update of n8n 2 in Docker on macOS, from version 2.48.5 to 2.48.7.

Prerequisites

Step 1: Check Your n8n Version

In n8n, click Help, the question-mark icon near the bottom of the left sidebar. When a newer version is out, the menu ends with Update and how many versions you’re behind. Clicking it opens n8n’s update guide in a new tab.

Help shows when a newer version is out.

To see your exact version, click About n8n in the same menu. The n8n Version line shows it.

Before the update: n8n 2.48.5.

Step 2: Read What Changed

Before you update, skim n8n’s release notes for anything that needs your attention; n8n’s GitHub releases list every fix. For example, 2.48.7, the update on this page, fixed two bugs in n8n’s core.

n8n’s update advice is to update often, at least once a month, so you never have to jump many versions at once.

Step 3: Run the Update Command

Open Terminal in the folder where you installed n8n: the folder that holds the n8n folder. If you followed the install guide, that’s your home folder, where Terminal opens. Then run:

Terminal

curl -fsSL https://get.n8n.io | sh -s -- --upgrade

It downloads n8n’s setup script and runs it with --upgrade. The script changes two version lines in n8n/.env (N8N_VERSION and N8N_SANDBOX_VERSION) to the newest stable release, downloads the new images and restarts n8n. Your data, secrets and other settings stay as they are.

Wait until it prints All set! Here it took 160 seconds, most of it downloading the new images.

Output

✔ Docker found (29.9.3)
✔ Docker Compose found (5.7.0)
✔ n8n version: 2.48.5 -> 2.48.7
✔ sandbox service version: 1.8.1 -> 1.8.1
Pulling images...
[+] pull 42/42
 ✔ Image ghcr.io/n8n-io/n8n-sandbox-service-api:1.8.1         Pulled                  1.6s
 ✔ Image ghcr.io/searxng/searxng:latest                       Pulled                 16.8s
 ✔ Image ghcr.io/n8n-io/n8n-sandbox-service-runner-dind:1.8.1 Pulled                  1.6s
 ✔ Image docker.io/n8nio/n8n:2.48.7                           Pulled                135.6s
 ✔ Image ghcr.io/n8n-io/runners:2.48.7                        Pulled                 95.7s
✔ Restarted with n8n 2.48.7 and sandbox service 1.8.1
Waiting for n8n to become ready (first boot pulls images and runs migrations) ... ✓

n8n is running at: http://localhost:5678
Data stored in:    ./n8n (Docker volume: n8n-data)
Config files:      ./n8n/compose.yml, ./n8n/.env

To stop:  docker compose -f ./n8n/compose.yml down
To start: docker compose -f ./n8n/compose.yml up -d
More everyday commands: https://docs.n8n.io/deploy/host-n8n/install-options/one-line-setup#everyday-commands

Security notes:
  - Only port 5678 (n8n) should ever be reachable from the internet.
  - The sandbox runner is privileged Docker-in-Docker — never publish its ports.

This setup is meant to try n8n locally. For production (TLS, Postgres, queue
mode) see https://docs.n8n.io/hosting/

get-n8n.sh v1.4.0 — source: https://github.com/n8n-io/n8n/blob/master/docker/get-n8n.sh

➜  All set! Open http://localhost:5678 in your browser to get started.

Step 4: Check the New Version

Reload n8n in your browser and open Help › About n8n again. n8n Version shows the new release, and the Update line is gone from the Help menu.

After the update: n8n 2.48.7.

Common Mistakes

MistakeWhat happensDo this instead
Running the command in the wrong folderIt stops with Error: no existing install found in ./n8n — run without --upgrade to install.Go to the folder that holds the n8n folder, then run it again
Leaving out -s -- --upgradeThe setup prints Found an existing install in ./n8n — leaving it untouched. and changes nothingRun the full command from Step 3

Troubleshooting

ProblemCauseFix
Docker Hub pull rate limit reachedDocker Hub limits how many images you can download without signing inWait about an hour and run the command again, or sign in with docker login, as the script suggests

FAQ

Will updating n8n delete my workflows?

No. The update only changes the version lines in n8n/.env. Your workflows, credentials and settings live in the n8n-data Docker volume and stay as they are, as n8n’s one-line setup page explains.

How often should I update n8n?

n8n recommends at least once a month. Small, frequent updates are easier than one big jump.

Can I update to a specific version?

Yes. Add --version and the version number to the update command:

Terminal

curl -fsSL https://get.n8n.io | sh -s -- --upgrade --version 2.48.7

Can I go back to the version I had before?

Not just by setting the old number again. An update can change n8n’s database, and n8n’s update guide explains that going back to an older version doesn’t undo those changes. To be able to roll back, take a backup before you update.

Does the old version stay on my computer?

Yes. Docker keeps the old version’s images until you remove them; here they took about 1.7 GB. Docker Desktop lists them under Images, where the bin icon on a row removes an image (Docker’s guide).

What does “Get ready for n8n 3.0” mean?

n8n shows this banner ahead of n8n 3.0, its next major version. Settings › Migration Report lists the workflows that need changes before you move to it (n8n’s migration tool guide). The update command installs the newest stable release, so once 3.0 is out, open the report before you update.

Conclusion

Updating a one-line setup install is one command run from the folder that holds n8n. Check the version and the release notes first, run the update, and confirm the new version in About n8n. Your workflows and settings come through untouched.

Additional Resources

Related

n8n, Docker and other names mentioned are trademarks of their respective owners. JD Bots isn’t affiliated with or endorsed by n8n GmbH or Docker, Inc.

Exit mobile version