Updating self-hosted n8n
Unproofread notes
I hadn't updated my self-hosted n8n instance for over 6 months, so I decided to do it today and didn't realize it was this easy. I just ran a bunch of commands, and it was successfully updated:
sudo apt update && sudo apt upgrade
– refresh package lists and install OS updates on the server.docker pull docker.n8n.io/n8nio/n8n
– download the newest n8n image.docker ps -a
– list all containers so you can see the n8n container ID and name.docker stop [CONT_ID]
– stop the old n8n container.docker rm [CONT_ID]
– remove the stopped n8n container.cd n8n-docker-caddy/
– go into the folder that has your docker-compose.yml.docker compose pull
– fetch the latest images defined in docker-compose.yml for both n8n and Caddy.docker compose down
– stop and remove the running Compose stack, keeping your volumes and data.docker compose up -d
– start the updated stack in the background.
And done! I'm now running the latest n8n with your existing data and config.
- ← Previous
Indie hackers should do SEO
Comment via email