Update docker, but changes not affected


I’ve n8n on my server via docker.
I run command docker pull n8nio/n8n and it downloads and extract files, but changes did not affect. I tried restart container by docker restart n8n but no changes.
How can I put a new image into an old container? Do I need to remove the container and make a new one?
I know that data like workflows are stored somewhere else, but I had some env variables for simply auth and webhook tunnel, so every time i am wondering if I need to write those variables always during update?

I am new with docker, so sorry if it’s stupid question, but what should I do after

The link below shows the steps.

About the env variables. All the env variables are in the .env file so you should not need to fill then again every time.

Hey @Shirobachi!

Are you using docker-compose? Here are the steps that I follow to update n8n when running via a docker-compose.yml file

  1. docker-compose down
  2. docker-compose pull
  3. docker-compose up -d

Before updating, make sure that you have persistent storage for your docker container.

So as I remember I installed n8n via docker, no docker-compose. I installed it now, but server sais:

Can't find a suitable configuration file in this directory or any parent. Are you in the right directory?

What makes sense bc I am in my home directory, how can I get to know where is my n8n dir? If, I can update n8n via docker-compose despite that installed via docker.

I am not sure you can update n8n that was installed via docker, using docker-compose.

I would suggest you run the docker ps command to get the running containers. You can also run docker image ls to get a list of all the images. It should also show you the version you’re using.

You can run the ls -a command to list the directories that are present in the root directory of your server.

So I did like that:

docker stop n8n 
docker rm n8n
history | grep docker
# And here paste command what I used to run docker before

Thanks for your help

Probably I did it just wrong but my envirement vars did set automatically (I needed to paste those by MySQL)