How to find where my node-red is installed?

I am newbie to Ubuntu

I have node-red running since I can access its UI from IP address.
But I am not sure where it is installed. This is because I need to cd to the install folder
to npm beta nodes.

Should be in /home/YourUserName/.node-red

The . makes the node-red folder "hidden" Not sure why they did this, but it is what it is.

Thanks for your reply. But unfortunately it is not there.
Could not find any .node-red folder.

I tried cd .node-red in ~ folder and it failed.
"bash: cd: .node-red: No such file or directory"

I found the folder.
Somehow installed in ~/nodereddata/ instead.

That is strange, how did you install node-red ?

On Ubuntu you can use the script as documented here.

After which you should be able to cd ~/.node-red

+1 for installing using the recommended script as suggested by @bakman2, then everything will be in the usual place. You should not need to uninstall anything first unless you have done something unusual in your setup so you can give it a go to find out.

If you still want to work out where is is at the moment then, assuming node-red is running automatically on boot, if you run this after a reboot
grep -i "node-red" /var/log/syslog
it should show you the startup log for node-red.

Are you using a docker image by any chance?

Yes. Turns out the machine I am working on is using docker. Just found out about it.
So the ~/nodereddata is a persistent storage folder set by docker.

If you don't have a good reason for using docker then probably best not to. It adds complications if you need to access system resources. If you do stick with docker then mention that if asking further questions as it is often a significant factor.

1 Like