Run n8n Locally for Free with Docker (Part 10 of 10): Upgrading Without Losing Your Workflows
By Abhishek Patoliya · 2026-08-12
This is the final part of the series on running n8n locally with Docker for free. Every part so far built toward a setup that's stable and yours to control — this part covers the moment that stability actually gets tested: upgrading to a new n8n version without losing anything or breaking a workflow you depend on.
← Back to the full series index
Stop Using the latest Tag
If your docker-compose.yml just says image: n8nio/n8n, Docker treats that as n8nio/n8n:latest — meaning every time you pull, you get whatever the newest version happens to be, with no warning about what changed. Pin to a specific version instead:
services:
n8n:
image: n8nio/n8n:1.68.0
container_name: n8n
restart: unless-stopped
ports:
- "5678:5678"
environment:
- N8N_ENCRYPTION_KEY=your-generated-key-here
- GENERIC_TIMEZONE=America/New_York
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data:
Now an upgrade is a deliberate choice — changing that version number yourself — rather than something that happens silently on the next pull.
The Actual Upgrade Process
- Back up first. Run the backup command from Part 9 before touching anything — this is the single most important step.
- Check the release notes. n8n's changelog calls out breaking changes between versions; skim it for anything affecting node types your workflows actually use.
- Update the version tag in
docker-compose.yml to the new version you want.
- Pull and recreate:
docker compose pull
docker compose up -d
- Test your key workflows. Manually trigger a few important ones and confirm they still behave as expected before considering the upgrade done.
Rolling Back If Something Breaks
Because your data lives in a separate volume (set up back in Part 4) rather than inside the image itself, rolling back is just reversing step 3 and 4:
# change the version tag back in docker-compose.yml
docker compose up -d
The old image version starts up again, reading the same volume — your workflows and credentials were never touched by the version change in the first place, since they live outside the image entirely.
Jumping Multiple Versions at Once
If you've left an instance unpatched for a long time, consider upgrading through a couple of intermediate versions rather than jumping straight from a very old release to the newest one — this makes it easier to isolate which specific version introduced a problem, if one shows up, instead of debugging a combined jump across many releases at once.
Series Wrap-Up
Across these ten parts, you've gone from nothing to a local n8n instance that starts automatically, persists its data reliably, has sensible configuration, can receive real external webhooks for testing, supports community nodes, gets backed up on a schedule, and can be upgraded without risk to any of it. That's the same durability a paid, managed setup gives you — built entirely on a free, self-hosted foundation you fully control.
Catch up on any part you skipped: Part 1, Part 2, Part 3, Part 4, Part 5, Part 6, Part 7, Part 8, Part 9.
Written by Abhishek Patoliya, Senior n8n Developer & Automation Architect, Surat, India. Verified n8n Creator.