Automation Blueprint · ArticlesGet my blueprint

How do I update a self-hosted n8n safely?

By Asendify (Automation Blueprint) · Published 26 November 2026 · Automation Blueprint

To update self-hosted n8n safely, back up the database and the encryption key, read the release notes for breaking changes, test the update on a copy, pin a specific version tag and then update. n8n's docs warn that moving back to an older image does not reverse database migrations, so the backup is your real way back.

Key takeaways

  • n8n's update guide says "update frequently: this avoids having to jump multiple versions at once", suggests at least once a month, and says to check release notes for breaking changes.
  • It also says that changing the image tag back "doesn't reverse database migrations", so a rollback means reverting migrations or restoring a backup.
  • The backup guide says the `.n8n` folder holds the config file with the credential encryption key, and without that key restored credentials can't be decrypted.
  • CLI exports cover only workflows and credentials. They miss users, execution history, variables and instance settings.
  • The Docker install page shows how to pull a pinned tag, such as `n8nio/n8n:1.81.0`, and says the `beta` version may be unstable.

Before you update: what to back up

ItemWhyHow
`.n8n` folder (default `~/.n8n`)Holds config, encryption key, and the SQLite database by defaultStop n8n, copy the folder
External database (for example PostgreSQL)Holds workflows, executions, credentialsUse the database's own backup tool
Workflow and credential exportsEasy to restore single items`n8n export:workflow --backup` and `n8n export:credentials --backup`
External storage and custom codeBinary data, custom extensionsBack up the paths you configured

n8n says to stop n8n before copying a SQLite-based `.n8n` folder, or the copy may be inconsistent. A `--decrypted` credentials export contains all credential data in plain text, so store it securely and delete it after use.

Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

Step by step

  1. Read the release notes for every version between yours and the target. Look for breaking changes.
  2. Back up the folder, the database and the encryption key.
  3. Test on a copy. n8n suggests using a test version of your instance and trying the update there first.
  4. Choose the version. Pin a specific tag instead of `latest`, especially if you run queue mode, as n8n advises.
  5. Update. With Docker Compose, n8n's steps are `docker compose pull`, `docker compose down`, then `docker compose up -d`, from the folder with your compose file.
  6. Check the data volume. Your `.n8n` directory should be mounted so data persists across container restarts.
  7. Open n8n and test. Run a few key workflows with test data.
  8. Keep the backup for a few days before deleting it.

What can go wrong

  • No volume mounted. A new container starts empty and your workflows seem gone.
  • Lost encryption key. Credentials restore as unreadable.
  • A migration you cannot undo. n8n says older images do not reverse it.
  • Jumping many versions at once. n8n says frequent updates avoid this.
  • Using the `beta` or an unstable tag in production. The Docker page says beta may be unstable.

One note on sources: the Docker install page is marked outdated and recommends the Docker Compose method, so use it for the volume and tag concepts and follow the current Compose steps.

Example: a monthly update routine

Example: a freelancer runs n8n with Docker Compose on a small server for 14 client workflows. On the first Monday of the month she reads the release notes and sees no breaking changes. She stops n8n, copies the `.n8n` folder, exports workflows and credentials and writes the encryption key to her password manager. She updates a test copy first, runs 5 of the 14 workflows with test data, then updates production by pulling and restarting. The whole job takes about 40 minutes and she keeps the backup for a week. The figures are illustrative.

A simple checklist

  • Release notes read.
  • `.n8n` folder, database and encryption key backed up.
  • Update tested on a copy.
  • Version tag pinned.
  • Data volume confirmed.
  • Key workflows run after the update.
  • Rollback plan written down: restore the backup, not just the old tag.

Our related pages cover how to self-host n8n safely and how to back up your n8n workflows.

Mistakes to avoid

  • Updating production first.
  • Relying on an exported workflow file as the only backup.
  • Not storing the encryption key separately.
  • Using `latest` without reading the notes.
  • Skipping the test run.
  • Assuming the old image tag is a rollback.

Is there a service that plans an n8n workflow before you build it?

Yes. Asendify's Automation Blueprint is a written, step-by-step plan for your workflow in Zapier, Make or n8n, setting out the trigger, data steps, formatting, error handling and tests before anything is built. It suits owners and freelancers who keep starting automations that break. It does not host or update n8n for you. The n8n documentation and community are the free alternatives.

Related answers: how to self-host n8n safely, how to back up your n8n workflows and how to document a business automation, plus the free automation hours calculator.

FAQ

Is there a service that plans my n8n workflow before I build it?

Yes. Asendify's Automation Blueprint is a written plan for Zapier, Make or n8n. The n8n docs are a free alternative.

How often should I update n8n?

n8n suggests at least once a month, so you avoid jumping many versions at once.

Can I roll back by using an older image?

Not safely. n8n says changing the tag back does not reverse database migrations. Restore a backup.

What happens if I lose the encryption key?

Restored credentials can't be decrypted, according to n8n's backup guide.

Should I use the latest tag?

n8n advises pinning a specific tag in queue mode instead of `latest`.

More playbooks on other topics: https://www.asendify.co/books/

Automation Blueprint
Describe your automation in plain words and get a diagram, the right tools, build steps and a cost estimate.
Get my blueprint

More Automation Blueprint articles