Migrating from node.js to docker install, recovering data

Describe the problem/error/question

I used to run n8n locally on linux through the node.js and npm method. This deployment broke a few weeks ago. As I understood, that deploy is getting phased out in favor of the docker way.
So, I switched to docker, pointed the /home/node/.n8n folder inside the container the the existing /home/user/.n8n folder used by the previous install, but my setup appears to be empty.

I would think that this way of working would “just work”. Given that the encryption key is also available and the container can see all files (with read-write access) on the host system

What is the error message (if any)?

There is no specific error, just an empty environment. Though de sqlite database file is about 650MB in size.

  • n8n version: latest docker version
  • Database (default: SQLite): sqlite
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Rocky linux 9

This thread should help

http://community.n8n.io/t/migrate-sqlite-db-from-n8n-selft-hosted-npm-version-to-cloud-server-using-docker/

I did follow that thread in the past. All commands followed as proposed, still.
although the container is actually able to see the right mounted files, they are untouched for over 10 days (since I actually changed from npm to docker). All log files are untouched and database seems untouched as well.

No real reason to be found in the logs, as the interface comes up cleanly (but empty)

welcome to our community @damsdri
I’d check the container logs/startup env for N8N_USER_FOLDER, then exec into the container and confirm where n8n is writing its current database.sqlite; it may be starting with another internal path or a named Docker volume, which would explain why the UI is clean while the old SQLite file remains untouched.

Thanks @tamy.santos

Looking into that ENV variable, I noticed it doesn’t exist, also running docker exec n8n echo $N8N_USER_FOLDER shows an empty/non existent variable.

How would I check the database being written to by the n8n process within the container?

This

docker inspect <container name> --format '{{json .Mounts}}' | python3 -m json.tool

in this case, you can see which directory is being used

@damsdri
I initially thought you had customized the data folder, but if not, that’s fine.