# Node-red default install location

**URL:** https://discourse.nodered.org/t/node-red-default-install-location/79245
**Category:** General
**Created:** [16 June 2023 10:47 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245 "2023-06-16T10:47:11Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Aivaras1](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Aivaras1](https://discourse.nodered.org/u/Aivaras1)
#### Post date: [16 June 2023 10:47 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/1 "2023-06-16T10:47:11Z")

</div>

Hello,

I am trying to install node-red on ASUS tinkerboard. It uses Debian 10.  
I am using this command: `bash <(curl -sL https://raw.githubusercontent.com/node-red/linux-installers/master/deb/update-nodejs-and-nodered)`

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/b/d/bd00b898ab857a47724874f69aab448bbd83074e.png)

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [16 June 2023 11:15 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/2 "2023-06-16T11:15:55Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Aivaras1](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Aivaras1](https://discourse.nodered.org/u/Aivaras1)
#### Post date: [16 June 2023 11:40 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/3 "2023-06-16T11:40:18Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [16 June 2023 12:18 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/4 "2023-06-16T12:18:04Z")

</div>

Did you get any error messages?

---

<div class="post-metadata">

### Author: ![Aivaras1](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Aivaras1](https://discourse.nodered.org/u/Aivaras1)
#### Post date: [16 June 2023 12:46 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/5 "2023-06-16T12:46:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 June 2023 13:02 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/6 "2023-06-16T13:02:38Z")

</div>

> [@Aivaras1](#):
>
> how to change default install location from /root/.node-red to /var/lib/node-red/.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](https://nodered.org/docs/getting-started/local#command-line-usage) that sets the user directory and the port.

This may help : [Node red multiple instances - #7 by Steve-Mcl](https://discourse.nodered.org/t/node-red-multiple-instances/9787/7) (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)_

---

<div class="post-metadata">

### Author: ![Aivaras1](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Aivaras1](https://discourse.nodered.org/u/Aivaras1)
#### Post date: [16 June 2023 13:26 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/7 "2023-06-16T13:26:13Z")

</div>

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

You mean this ?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/8/c80948799226a3c10f0ab6f1909dbee0da8eba0e.png)

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [16 June 2023 13:28 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/8 "2023-06-16T13:28:55Z")

</div>

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"

---

<div class="post-metadata">

### Author: ![Aivaras1](https://avatars.discourse-cdn.com/v4/letter/a/8797f3/32.png) [@Aivaras1](https://discourse.nodered.org/u/Aivaras1)
#### Post date: [20 June 2023 08:03 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/10 "2023-06-20T08:03:06Z")

</div>

Thank you for information

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [19 August 2023 08:03 UTC](https://discourse.nodered.org/t/node-red-default-install-location/79245/11 "2023-08-19T08:03:27Z")

</div>

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