N8n Upgrade Process

Hello everyone… I might soon need to update several versions of n8n (1.108.0 → 1.120.0) . I currently have it deployed in my AKS cluster with an external PostgreSQL database and running in queue mode.

When I update my Dockerfile to the new version and then deploy it to my cluster, I shouldn’t need to do anything else, right?

  1. Does n8n handle the whole update process by itself? I mean everything—front-end updates, new database tables, etc. Is that process automatically handled at first?

Should I just make sure that the container doesn’t crash or throw errors such as missing database columns or migration failures?

  1. If an error does occur during the update because of migration issues, is that when I should manually run the command:
    kubectl exec -it <n8n> -- npx typeorm migration:run

*** Should this command be run in the “main” container or the “worker” container?

  1. Should that command fix the issue 100%, or is there a chance it won’t? In what cases could it fail?

Thanks.

1 Like

You’re right @Sebastian_Pacheco in most cases you only need to deploy the new n8n image and let it start. n8n handles the rest.

1. Does n8n update itself?

Yes. For Docker/K8s installs, updating the image is enough. When the pod starts, n8n automatically runs DB migrations and serves the updated UI. No separate “frontend update” or manual typeorm step is required.
Just ensure all main + worker pods use the same image tag in queue mode.

2. What should you watch for?

Check the main pod logs after rollout. You want to see migrations start and finish successfully.
Errors like “failed to run migrations”, missing columns, or FK issues mean the update didn’t complete cleanly.

3. When to use npx typeorm migration:run?

Only as a last resort if the pod fails to start because of migration errors and restarting doesn’t fix it.
Run it inside a main pod (not a worker), using the same env/image.

4. Practical tips

  • Back up Postgres before upgrading.

  • Keep all n8n pods on the same version.

  • If migrations fail, fix the underlying issue first, then restart.

  • If logs look clean and pods stay healthy, the upgrade is done no extra commands needed.

hi @Anshul_Namdev , thanks!!!

1 Like

Glad it helped, @Sebastian_Pacheco
Happy to help make sure everything rolls out smoothly, let me know if it doesn’t