Updating n8n should be boring. Follow this routine: back up, read the release notes, update, verify, and know how to roll back.
n8n releases new versions often. Updates bring fixes, security patches and new nodes, but they can also change behaviour. A short routine keeps your workflows safe.
Dump the database and copy your environment file, including the encryption key. Follow our backup guide. If something goes wrong, this is how you go back.
cd ~/n8n
mkdir -p ~/backups
docker compose exec -T postgres pg_dump -U n8n n8n | gzip > ~/backups/pre-update-$(date +%F).sql.gz
cp .env ~/backups/env-$(date +%F).bak
Open the n8n release notes for every version between yours and the target. Look for breaking changes, removed nodes, renamed settings and new required environment variables. This takes five minutes and prevents most surprises.
In your docker-compose.yml, use a specific version tag instead of latest.
n8n:
image: docker.n8n.io/n8nio/n8n:1.XX.X # replace with the version you chose
Pinning means updates happen only when you decide, and you always know what is running.
docker compose pull
docker compose up -d
docker compose logs -f n8n
Watch the logs. n8n may run database migrations on the first start, so give it a minute.
If the new version causes trouble, set the previous version tag in the compose file and restart. Be careful: after a database migration, an older version may not start on the newer database. In that case restore the pre-update dump, as shown in the backup guide, then start the older version.
Updates are also part of keeping your server safe. See our n8n security checklist. If you would rather not handle updates, managed n8n hosting patches the server, OS and Docker for you, while you stay in control of when n8n itself is updated.
We patch the server, OS and Docker for you. You choose when n8n updates.
Explore Managed n8n Hosting