October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
VGSources
Blog

How to Update n8n on Docker Without Losing Your Workflows

Learn how to upgrade n8n on Docker without losing workflows or credentials. This guide covers SQLite, PostgreSQL, Compose volumes, encryption keys, scaled deployments, verification, troubleshooting, and rollback.
Length10 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Yes, you can update n8n on Docker without losing workflows. The container is disposable; your workflows, credentials, execution history, and settings survive only when the persistent database and n8n data directory remain attached to the replacement container. For the standard SQLite setup, that means preserving and backing up /home/node/.n8n. For PostgreSQL, it means protecting the database as well as n8n’s configuration and encryption settings.

The safest update is controlled rather than improvised: review release notes, record the current image tag, back up the data, confirm the volume and environment variables, pull a reviewed image, recreate the container, watch migrations finish, and test important workflows before declaring the upgrade complete.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What actually survives a Docker update?

Docker containers are replaceable runtime instances. Removing a container does not inherently remove data stored outside it, but a newly created container starts empty if its database volume or bind mount is missing, renamed, or pointed at the wrong directory. n8n can then appear to be a fresh installation even though the old container was only recently removed.

Your protection is persistent storage, not the container ID. Keep the same storage declaration and the same encryption configuration when you recreate n8n.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

SQLite deployments

In the default single-instance setup, n8n stores its SQLite database and essential user data in /home/node/.n8n. That directory includes the credentials encryption key. A volume such as n8n_data:/home/node/.n8n keeps those files outside the container lifecycle.

If the directory is not mounted, is mounted at a different path, or is replaced with a new empty named volume, the new container has no access to the old database. Workflows and credentials have not been “deleted” by the image update; they are simply invisible to the new container.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

PostgreSQL deployments

With PostgreSQL, workflow and credential records live in the PostgreSQL database, so that database must be backed up and retained. You must still preserve n8n’s /home/node/.n8n directory and its configuration, including the encryption-key setting. A database restore without the original encryption key can leave encrypted credentials unusable.

Queue and scaled deployments

Queue mode and other scaled arrangements normally include a main process, workers, and sometimes runners. Treat those components as one release unit. When external S3 binary storage is enabled, n8n requires the main, worker, and runner images to be upgraded to the same version at the same time; mixing versions can create protocol incompatibilities.

Before touching the running container

Preparation is the part that makes an update reversible. Complete these checks while the current instance is healthy.

1. Read the release notes and breaking changes

Check the n8n release notes and the official Docker guidance for breaking changes that could affect your nodes, database, authentication, or deployment mode. The n8n documentation explicitly advises checking breaking changes before upgrading.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Write down the exact image tag currently running. A tag such as latest does not tell you which build you were using after the tag moves. Record the output of your deployment configuration, the current tag, and any custom environment variables. That record gives you a known target for rollback.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

2. Inspect the effective Compose configuration

Do not rely on memory or an abbreviated example. Render the configuration that Docker Compose will actually use:

docker compose config

Confirm all of the following:

  • The n8n service mounts the existing named volume or bind mount at /home/node/.n8n.
  • The database host, database name, user, and password settings are unchanged.
  • The existing N8N_ENCRYPTION_KEY, or the equivalent encryption-key configuration used by your deployment, remains unchanged.
  • Webhook, queue, runner, timezone, proxy, and authentication variables are still present.
  • Worker and runner services, if used, reference the same release family you intend to deploy.

Inspect the running container as a second check if the Compose file has recently changed:

docker inspect <container-name>

Compare its mounts and environment with the file you plan to use. A typo in a volume name is enough to create an empty database on the next start.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Back up persistent data while n8n is stopped

For SQLite, stop n8n before copying the data so the database is not changing during the backup. With a named volume called n8n_data, one portable approach is:

docker compose stop n8n
docker run --rm -v n8n_data:/source -v $(pwd):/backup alpine tar czf /backup/n8n_data-before-upgrade.tgz -C /source .

Use your actual volume name; obtain it from docker compose config or docker volume ls. If you use a bind mount, copy or snapshot the host directory that maps to /home/node/.n8n after stopping n8n. Keep the archive on storage separate from the Docker host when possible, and verify that it can be read.

For PostgreSQL, take a consistent database backup using the same backup procedure you use for production. Preserve the n8n data directory and encryption-key configuration alongside that database backup. A PostgreSQL major-version migration is a separate project and should not be combined casually with an n8n image update.

4. Decide how tightly to control the image tag

A pinned tag makes the change auditable and rollback straightforward. The official image supports pulling a specific version, for example:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
docker pull docker.n8n.io/n8nio/n8n:<reviewed-version>

Using a moving stable or latest tag is simpler, but it allows the image selected by a later pull to change without a corresponding edit to your Compose file. Use the approach that matches your change policy; for production, record the resolved version even when policy permits a moving tag.

Safe Docker Compose update procedure

The standard Compose sequence is pull, remove the old container, and start a replacement while retaining the volume declaration.

Step 1: Edit the image reference deliberately

Change only the image tag you have reviewed. A minimal service might look like this:

services:
  n8n:
    image: docker.n8n.io/n8nio/n8n:${N8N_VERSION}
    ports:
      - 5678:5678
    environment:
      - N8N_ENCRYPTION_KEY=${N8N_ENCRYPTION_KEY}
    volumes:
      - n8n_data:/home/node/.n8n

volumes:
  n8n_data:

Keep your existing ports, health checks, database variables, proxy settings, and other deployment-specific options. The important details in this example are the unchanged volume target and encryption-key value, not the sample service’s minimal set of options.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Step 2: Pull the reviewed image

docker compose pull

For a single-container installation without Compose, pull the exact image tag with docker pull docker.n8n.io/n8nio/n8n:<reviewed-version>. Pulling an image does not alter your database or volume.

Step 3: Recreate the service without deleting volumes

docker compose down
docker compose up -d

docker compose down removes the project’s containers and networks. It does not remove named volumes unless you explicitly add the volume-removal option. Never append -v during a routine n8n image update unless deleting the data is intentional and you have independently confirmed that the volume is disposable.

Before running the command, check that the Compose project and file are the ones that own your production volume. Running the command from a different directory or with a different project name can target a different volume set.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

Step 4: Follow startup and database migrations

docker compose logs -f n8n

For a non-Compose container, use docker logs -f <container-name>. Wait for startup to complete and do not interrupt a database migration. Depending on the release and database, migration messages may continue for a while before the web interface becomes ready.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A migration is a database change, so treat the first successful startup as a checkpoint. Do not repeatedly stop and start the container because the log appears quiet; first determine whether n8n is still working, waiting for a dependency, or reporting a genuine error.

Step 5: Verify the running instance

Use the following order, stopping the rollout if any check fails:

  1. Confirm the expected n8n version in the user interface or startup logs.
  2. Open several important workflows, including one with credentials and one with a trigger.
  3. Check that credential fields decrypt and that connected services authenticate.
  4. Run a safe test execution that cannot send unwanted messages, charge an account, or modify production data.
  5. Review recent execution history and error logs for migration or node-compatibility problems.
  6. Run n8n’s security audit if you use it; the audit can indicate that an instance is outdated.

Updating a single container without Compose

Compose is preferable because it records mounts and environment variables, but a manually managed container follows the same principles. First record the current image tag and inspect the container’s mounts. Stop the container, pull the reviewed image, and create the replacement with the identical -v or --mount mapping to /home/node/.n8n, the same database variables, and the same encryption-key setting.

Do not use a convenient new docker run command copied from a quick-start page if it omits your existing volume or environment. That creates a clean instance rather than an upgrade. Keep the old container definition or an equivalent script until verification is complete, but do not run two instances against the same SQLite database at the same time.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Storage and deployment choices compared

Deployment choice What must be preserved Backup before image update Main risk
SQLite, one container The volume or bind mount mapped to /home/node/.n8n, plus the encryption-key setting Stop n8n and copy or snapshot the mounted directory A new or misnamed volume looks like a blank installation
PostgreSQL, one main process The PostgreSQL database, n8n configuration directory, and encryption settings Take a consistent database backup and preserve n8n’s data directory Restoring records without the original encryption key can prevent credential decryption
Compose-managed deployment The Compose file, project name, volume declaration, and environment values Back up the underlying volume or database before docker compose down Using another project or adding -v can target or remove the wrong volume
Queue or scaled deployment Main, worker, and runner configuration and compatible image versions Back up the external database and any binary-storage data Mixed component versions can break communication, especially with S3 binary storage

Latest tag versus a pinned tag

A moving tag reduces editing but weakens change control: the same Compose file can pull different software on different days. A pinned tag records exactly what you approved and lets you return to the previous tag if startup or workflow checks fail.

Approach Advantages Trade-off Best fit
Moving stable/latest tag Simple pull and fewer file edits Less predictable and harder to audit or reproduce Small, actively monitored installations with a policy that permits automatic tracking
Pinned version tag Repeatable deployment, clear rollback target, easier incident diagnosis Requires deliberate version changes and release-note review Production and any installation where a surprise change is unacceptable
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Common failure modes and how to recover

The interface opens as a new installation

Stop the new container and inspect its mount. Compare the volume name, host path, and container target with the last known-good definition. If the new container used an empty volume, recreate it with the original mount. Do not create new workflows in the empty instance and then overwrite the original data; that complicates recovery.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

Credentials fail to decrypt

Check that the encryption-key environment variable is exactly the previous value and that the original /home/node/.n8n data is attached. Do not generate a replacement key as a “fix”; a different key cannot decrypt credentials encrypted with the old one. If the key is genuinely lost, restoring the database alone will not restore access to those encrypted values.

Startup stops during migration

Keep the logs, note the exact error, and avoid repeated attempts against the only copy of the database. Confirm that the image tag matches the documented upgrade path and that the database is reachable. Preserve the pre-upgrade backup before trying a rollback or another migration attempt.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Workers or runners cannot connect

Check that every component is using the intended version and the same queue, authentication, and network settings. In an S3-backed scaled deployment, bring main, workers, and runners to the same n8n version rather than upgrading only the web-facing container.

The old container was removed accidentally

Container removal is recoverable when the volume or external database still exists. List Docker volumes, identify the original mount, and recreate the service using that storage. If the volume itself was deleted, restore the SQLite archive or database backup before starting n8n.

Rollback without making the situation worse

Keep both the previous image tag and the pre-upgrade backup until verification is complete. If the new image will not start or important workflows behave unexpectedly:

  1. Stop the upgraded service and preserve its logs.
  2. Determine whether n8n completed database migrations. A migration may have changed the database schema.
  3. Change the image reference back to the recorded previous tag.
  4. Start the service with the same volume, database settings, and encryption key.
  5. Only restore the backup if the database state requires it. Restoring blindly after a migration can replace newer changes or create a schema mismatch.
  6. When possible, test the rollback against a copy of the volume or a restored database first.

For PostgreSQL, coordinate any database restore with the application version that created the schema. For SQLite, make a copy of the current file before replacing it with the pre-upgrade archive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Operational checklist

  • Release notes and breaking changes reviewed.
  • Current image tag recorded.
  • Compose project and effective configuration verified.
  • /home/node/.n8n mount confirmed.
  • Encryption-key setting preserved.
  • SQLite volume archive or PostgreSQL backup completed and readable.
  • Reviewed image pulled.
  • docker compose down run without -v unless volume deletion is intentional.
  • Startup logs monitored through migration completion.
  • Version, workflows, credential decryption, and a safe execution checked.
  • Main, worker, and runner versions aligned in scaled deployments.
  • Previous image tag and backup retained until the upgrade is accepted.

The practical rule

Updating the n8n image is safe when storage and configuration are treated as the product. Pulling a new image and replacing a container does not erase workflows; detaching, renaming, or deleting the database does. Preserve the persistent mount, encryption key, and external database, then use the controlled Compose sequence and verify the instance before removing your rollback materials.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.