Hi everyone. For some reason, n8n won’t automatically update itself when I run the update command (as given in the documentation). And so, I created a cheatsheet to help me through manual update steps.
Please note that I use PM2 to monitor the app; you can skip it if you don’t use it.
Comments at the end of the command are expected outputs of the command.
— MANUAL UPDATE CHEATSHEET —
# --------------------------------------
# n8n Update & PM2 Fix - Full Cheat Sheet
# --------------------------------------
# Step 1: Stop and delete n8n from PM2
pm2 stop n8n # [PM2] App [n8n] stopped
pm2 delete n8n # [PM2] App [n8n] deleted
# Step 2: Find all installed n8n binaries
sudo find / -name "n8n" -type f 2>/dev/null
# Expected: /usr/lib/node_modules/n8n/bin/n8n
# Ignore paths like /.n8n-xyz/bin/n8n (they are temp/cached installs)
# Step 3: Uninstall old global n8n install
sudo npm uninstall -g n8n # removed 1 package
# Step 4: Clear npm cache
sudo npm cache clean --force # npm WARN using --force...
# Step 5: Reinstall latest n8n globally
sudo npm install -g n8n # + n8n@<latest_version>
# Step 6: Confirm installation
npm list -g --depth=0 | grep n8n
# Expected: ├── n8n@<latest_version>
# Step 7: Check if binary exists
ls /usr/lib/node_modules/n8n/bin/n8n
# Expected: /usr/lib/node_modules/n8n/bin/n8n
# Step 8: Create or fix the symlink
sudo ln -sf /usr/lib/node_modules/n8n/bin/n8n /usr/local/bin/n8n
# Step 9: Test if command works
n8n --version
# Expected: <latest_version> (e.g., 1.75.0)
# Step 10: Check PM2 ecosystem config
cat /home/pi/ecosystem.config.js
# Should include:
# name: 'n8n'
# script: 'n8n'
# args: 'start'
# env: { WEBHOOK_URL, N8N_HOST, etc. }
# Step 11: Start n8n with PM2 using existing config
cd /home/pi
pm2 start ecosystem.config.js # [PM2] App [n8n] launched
# Step 12: Save PM2 process list
pm2 save # [PM2] Saving current process list...
# Step 13: Enable PM2 startup on boot
pm2 startup | sudo bash # [PM2] Init system found...
# Step 14: Final check - should show n8n online
pm2 list
# Expected: n8n app listed as 'online'