← Back to blog

How to Update Self-host n8n in Docker in a Few Simple Steps

n8ndockerautomation

n8n is a powerful automation tool, and keeping it up-to-date ensures you have the latest features, security fixes, and performance improvements.

If you’re running n8n in Docker, updating is quick and easy — no need to rebuild everything from scratch.

Check Your Current Version

Before updating, see which version you’re running:

sudo docker ps

Look for the n8nio/n8n container and note the image tag or image name.

Example:

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

1a2015bf4741 docker.n8n.io/n8nio/n8n “tini — /docker-ent…” 2 minutes ago Up 2 minutes 0.0.0.0:5678->5678/tcp, :::5678->5678/tcp n8n

Pull the Latest n8n Docker Image

Run:

docker pull n8nio/n8n:latest

This downloads the newest n8n image from Docker Hub.

If you want a specific version instead of the latest:

docker pull n8nio/n8n:1.52.3

Stop Your Current n8n Container

docker stop n8n
docker rm n8n

Replace n8n with your container name if it’s different.

Start n8n with the New Image

If you’re using Docker Compose:

docker-compose up -d

If you’re running n8n directly with docker run:

docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n:latest

Make sure you mount the same volume (-v ~/.n8n:/home/node/.n8n) so your workflows and credentials are preserved.

Verify the Update

Once n8n is running:

  1. Open http://localhost:5678 (or your server’s URL).
  2. Go to Settings → About and check the version number.

That’s It!

You’ve successfully updated n8n in Docker.

The next time a new version comes out, just pull → stop → start and you’ll be on the latest release.

Quick Commands Recap

docker pull n8nio/n8n:latest
docker stop n8n && docker rm n8n
docker-compose up -d # If using Docker Compose

# OR

docker run -it --rm -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n:latest

Tips

  1. Always back up your ~/.n8n folder before updating.
  2. Use specific version tags in production for stability.
  3. Check the n8n changelog before upgrading to see what’s new.