N8n selfhosted docker update, lost data

Installed using the docker instructions, I did create the volume per the instructions.

Just followed the docker-compose update instructions and it’s asking me for my information again, as if I have never used it.

I’m hoping there’s a way to attach the volume and get my workflows back.
Currently the docker compose has this for the n8n volume:

volumes:
      - n8n_data:/home/username/n8n/n8n-local-files:/files

If I can change this line to get my workflows back, I created the volume while in /home/username/n8n/ what should the line look like to get them back?

Very new to docker… hoping i didn’t wipe them out by following the documented update procedure.

This is the doc i followed to install.

Will data persist between updates using this method?

Hi @tkintenn, I am very sorry you are having trouble.

From which version did you upgrade? Is there a chance you upgraded from an n8n version before v1 and have missed this step?

If I can change this line to get my workflows back, I created the volume while in /home/username/n8n/ what should the line look like to get them back?

So the line in itself looks problematic to me. The syntax of the volumes section in a docker compose would be this:

volumes:
  - {path or volume on your host machine}:{path inside your docker container}

So the host path (or docker volume) on the left side of the : and the path inside the n8n docker container on the right side. You do however seem to have a line with three values.

My best guess is these were originally two separate lines, something like this:

volumes:
  - n8n_data:/home/node/.n8n
  - n8n-local-files:/files

Now assuming you have used /home/node/.n8n as the part on the right hand side (which is where the standard n8n docker image would write data to) and you were already using n8n v1 or later, the above should bring back your data.

Keep in mind this is just my best guess made without knowing exactly how you previously deployed and configured n8n.

Hope this still helps :crossed_fingers: