How I Successfully Updated n8n on My Mac and Linux Server
I use n8n for several automation tasks, and recently I needed to update it both on my Mac (running with Docker) and on my Linux server (running with PM2).
Here’s the full process I followed, written simply and clearly.
Updating n8n on macOS (Docker)
My local n8n runs in a Docker container, so updating it is mostly about pulling the new image.
Stop and remove the old container
docker stop n8n
docker rm n8n
Download the latest n8n image
docker pull n8nio/n8n:latestStart it again with the same volume
docker run -it --name n8n -p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n:latestAll flows and credentials remained safe because they live in the ~/.n8n folder, not inside the container.
Updating n8n on a Linux Server (PM2)
On my server, n8n wasn’t running inside Docker.
It was installed globally with npm and managed by PM2. The data lived in:
/home/<username>/.n8n
This folder contains workflows, credentials, and settings.
Stop the n8n process
pm2 stop ecosystem.config.js
Update n8n
npm install -g n8n@latest
Restart n8n
pm2 restart ecosystem.config.js
Confirm the version
n8n --version
After updating, mine showed:
[Latest Version]
Checking Node and PM2 Versions
It’s helpful to verify that Node.js and PM2 are also on supported versions:
node -v
pm2 -v
My setup was:
- Node.js 20
- PM2 6.0.13
Both work well with the latest n8n releases.
Optional Updates
These aren’t required but can be done if needed:
Update npm:
npm install -g npm@latest
Update PM2:
npm install -g pm2@latest
pm2 update