Node-red default install location


I am trying to install node-red on ASUS tinkerboard. It uses Debian 10.
I am using this command: bash <(curl -sL

how to change default install location from /root/.node-red to /var/lib/node-red/.node-red ?
Also I enabled service with this command
`sudo systemctl enable nodered.service

So after reboot I need this folder in /var/lib/node-red

You seem to be installing as root, which is not recommended, no doubt with good reason.
Can you explain why you want to install as root and why in that directory?

Taking a glance at the install script it seems to base it's installation directory on $HOME so you could try mkdir /var/lib/node-red; export HOME=/var/lib/node-red before running the script.

I'm dubious of it being successful. Be ready if necessary to reinstall the OS.

At the moment I have two users. So for now root will be okay.
I have node-red installed in that directory on another device. So I want this directory on tinkerboard.

Those commands didn't help.

Did you get any error messages?

No, just saw that node-red installed in /root/.node-red

First, node-red does not install to this location. This location is created only after you launch node-red. The .node-red directory is where flows are created. This does not exist until node-red has been started.

If you want to avoid the automatic creation of this, simply pass in a user directory when starting node red.

Second, there are almost almost zero reasons to install as root and MANY reasons not to (you will find this out when attempting to install modules etc). Also, when it is installed with the -g option (like the installer script does), each user launching node-red gets their own user directory, by default in their home directory.

So if you want multiple node reds running under the same or different accounts, then just launch node red with the appropriate command line parameters that sets the user directory and the port.

This may help : Node red multiple instances - #7 by Steve-Mcl (it is windows based but should give you the general idea)

Lastly, if you want to run multiple node-red, by far the simplest way is to install something like FlowForge. It does all the work for you, in a nice neat tidy web based frontend. You can add multiple users. You can add multiple node-red. Up to you of course.

(Full disclosure: I work for FlowForge)

"If you want to avoid the automatic creation of this, simply pass in a user directory when starting node red."

You mean this ?

Yes. But I STRONGLY recommend you remove everything are re-install it without root before you end up posting "I have this error trying to install node-red-contib-blahblah"

Thank you for information

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