Docker image > where is node-red's home?

Hi!

Does anybody know where the node-red home directory is located and if (and where exactly) I can access it from the host outside the docker image?

All Node-Red information is in the DATA folder.

In docker you have to map the data folder to physical folder on your server or NAS drive to have direct access.

the necessary details can be found here

I'm using PORTAINER to manage my docker files and have several NR containers running, but the key is the correct mapping of DATA folder
image

Thanks Nexus for this information, I think I found what I've been looking for. Please correct me, if I'm wrong:

  1. There is user data stored inside the container, even if I'm not able to see it in terminal (at the host).
  2. This data can be accessed via "docker cp" command, ran at the host's terminal, to copy out some of the data that is stored in the container's directories.
  3. node-red (the user, that Node-RED is running under) data is found in the directory /usr/src/node-red/ inside the container, so to copy out data that is stored inside a container, I can use

docker cp Containername:/usr/src/node-red/some-data-file.txt /path-of-the-host-where-i-want-the-file-to-store

[Edit]
And - of course - I could use the Volume mapping you described above, to also have direct access to the information that I want to store.

yes, you are correct and can access your DATA inside the docker container as well.

I would not recommend using the default in-docker data location as this can easily be destroyed when re-deploying the container. I always use a proper file location which is directly accessible from outside docker.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.