On the “docker” command issue:
I did not manage to restart the container… either (when I went via docker command) due to the section below, Tried to run your command in a few different ways but kept getting some errors. So the n8n app is still down, as I have stopped it and removed it but wont restart…
Looks like for both I am having issue restarting, and it feels like I might have messed it up the first time by using the docker command.
So that error is a bit trickier, Docker thinks the container is already being used. I would use the docker rm command to remove the existing container and you should be good to go from there assuming you have the volumes set you shouldn’t lose any data.
Just wanted to share my solution just in case if someone is in my situation. I had the same error as @Vince “Can’t find a suitable configuration file…”
My docker-compose.yml wasn’t in root directory but in my user directory. I found it through Filezilla, because I’m a noob.
The solution : cd /home/{yourusername}
Now that you’re in the good folder : docker-compose down and next docker-compose up -d
@Jon offered a great one line solution on Discord:
alias update-n8n="cd ~/docker/n8n/ && docker-compose pull && docker-compose down && docker-compose up -d && cd -"
I am curious whether there is anyone you can automate this with the DigitalOcean API (e.g. whenever a release is made by n8n, docker-compose could automatically be updated)?
I don’t see why not and you wouldn’t need to use the digital ocean api. You could have a script that runs on a schedule maybe once a day at 1am or something to look for a new version.
If you wanted to get really fancy you could probably use n8n to do the checking and have it save a file to a volume and in a script look for the file and if it exists do the update then remove the file.
I am also updating on a docker compose right now and getting a strange gateway 502 error with following logs after I: stopped the compose stack, pulled the new image and started the compose stack again:
2022-08-25T20:12:43.861Z | info | Initializing n8n process "{ file: 'start.js' }"
2022-08-25T20:12:43.948Z | warn | Migrations in progress, please do NOT stop the process. "{ file: 'migrationHelpers.js', function: 'logMigrationStart' }"
2022-08-25T20:12:43.949Z | debug | Starting migration AddJsonKeyPinData1234567890 "{ file: 'migrationHelpers.js', function: 'logMigrationStart' }"
Migration "AddJsonKeyPinData1234567890 " failed, error: Cannot convert undefined or null to object
2022-08-25T20:12:43.955Z | error | There was an error initializing DB: "Cannot convert undefined or null to object" "{ file: 'start.js' }"
2022-08-25T20:12:43.955Z | info |
Stopping n8n... "{ file: 'start.js', function: 'stopProcess' }"```
Hopefully there is a quick solution for this.
It is probably worth opening a new post as your issue is unrelated to this one… Looking at your error though can you confirm what version you are upgrading to? I suspect that issue was fixed in 0.192.2 which was released yesterday.
Hi @Jon I haven’t updated my n8n in a very long time (40 udpates…).
And after a few different trials of upgrading the version of n8n, I’m still stuck here. Very different issues than before. Everything gets updated then the actual instance while up and running just is 404ing.
Could this be because I installed this on a very old way for n8n? Realised now you’re using Candy and some other setup with Digital Ocean.
PS i tried:
-> cd
-> sudo docker-compose pull
-> sudo docker-compose stop
-> sudo docker-compose rm
-> sudo docker-compose up -d
and also the version in your own update doc for docker.
Should I consider entirely recreating a new droplet with the latest approach in the n8n docs?
I use the same way to upgrade for a long time, and it works perfectly.
I used version 0.234.1 before I upgrade this time(0.236.1), but I cannot enter the system
and it shows “n8n is starting up. Please wait”
This is my docker-compose.yml file, I don’t know if I changed something by mistake?
Please help! Thanks!
Hello. @Jon
I am prompted to create an account again when I upgrade my n8n. How do I save all the workflow and settings?
I use the standard option of updating via dcoker compose
The steps provided look to be correct, If you have lost the data it would suggest that maybe the data volume was not correctly mapped or it is using a dynamic path like ~/ but the user is different.