Cannot start/restart Node-Red Docker Desktop (Windows)

How do I find the location of the setting.js file on Windows? I previously edited the file, but there was an error in the functionglobal command.

Error loading settings file: /data/settings.js /data/settings.js:517 functionGlobalContext: {

It is wherever the /data volume is mapped to in your docker setup.

on Windows it is by default in your user (home) directory, which by default is c:\users\your-username\.node-red. (unless you explicitly set different paths)

Is that correct when running under docker?

No, you are 100% correct in what you said re docker. But he asked about Windows. I assumed that he is developing under Windows (and then creating a docker image out of it).

Obviously, the Windows settings.js needs to be tweaked for docker, mostly WRT paths

I think that @maulanamuslih needs to clarify which docker image he is running and how he is running it.

1 Like

Thank you all for your help, I have found the location of node-red settings.js
It is at \wsl.localhost\docker-desktop\mnt\docker-desktop-disk\data\docker\overlay2

That path does look like you're data is in the writable layer of your container.
Also, you shouldn't modify anything inside those directories, those are Docker internal.

You should use a volume or bind mount for your /data location, otherwise your data will be lost when you recreate the container!