# \[solved\] Node-Red Directories in Root?

**URL:** <https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507>\
**Category:** General\
**Created:** [25 April 2020 22:43 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507 "2020-04-25T22:43:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![applekor](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@applekor](https://discourse.nodered.org/u/applekor)\
**Post date:** [25 April 2020 22:43 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/1 "2020-04-25T22:43:07Z")

</div>

Hi. I've just installed node-red on a fresh Raspbian Buster installation on an RPi4. Based on posts I've read, I thought node-red was supposed to run somewhere outside of the root. However, when I start my server, I see that it is looking at /root/.node-red/settings.js for my settings file, /root/.node-red for my user directory, and /root/.node-red/flows\_raspberrypi.json for my flows file. Is all of that correct? I thought it was supposed to be using copies somewhere in the user space.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/5/55ab36ea1d89703c5c2ab853ea18b1c648fa66ed.png)

---

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [25 April 2020 22:50 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/2 "2020-04-25T22:50:01Z")

</div>

How did you install node-RED?  
Did you use the [recommended installation script](https://nodered.org/docs/getting-started/raspberrypi) for Raspberry Pi's?

---

<div class="post-metadata">

**Author:** ![applekor](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@applekor](https://discourse.nodered.org/u/applekor)\
**Post date:** [25 April 2020 22:52 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/3 "2020-04-25T22:52:28Z")

</div>

Yessir. From that exact page.

---

<div class="post-metadata">

**Author:** ![applekor](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@applekor](https://discourse.nodered.org/u/applekor)\
**Post date:** [25 April 2020 22:53 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/4 "2020-04-25T22:53:34Z")

</div>

I'm working on another fresh Raspbian install to try again.

---

<div class="post-metadata">

**Author:** ![applekor](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@applekor](https://discourse.nodered.org/u/applekor)\
**Post date:** [26 April 2020 00:37 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/5 "2020-04-26T00:37:48Z")

</div>

Reinstall done.

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/2/72520d636522e52c4c0be9cfbe1c2be936af6934.png)

Same results.

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

Any thoughts? Is this the way it's supposed to be and I'm worried over nothing?

The reason I ask is because yesterday, I did an install on a different RPi (an RPi3). I then installed EasyMIDI and node-red-contrib-midi-windows via NPM. I updated functionGlobalContext in the /home/pi/.node-red/settings.js file and I was able to use EasyMIDI functions. Everything was working well until it wasn't (different, non node-red issue), and I had to re-image that installation. After reinstalling everything (including node-red), and updating I found I couldn't reference EasyMIDI anymore via global.get() anymore.

That's when I decided to start over from scratch, yet again, but this time on a different machine: the RPi4. I tried updating /home/pi/.node-red/settings.js, but, once again, I couldn't reference EasyMIDI with global.get(). It just kept returning 'undefined'. Searching around, I found a forum post here that talked about watching where node-red was looking for the settings file on startup and that it should be looking somewhere in the user directories. That's when I noticed that my install was looking under /root/.node-red.

Like I said, any thoughts?

Thanks, in advance.

---

<div class="post-metadata">

**Author:** ![applekor](https://avatars.discourse-cdn.com/v4/letter/a/2bfe46/32.png) [@applekor](https://discourse.nodered.org/u/applekor)\
**Post date:** [26 April 2020 01:31 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/6 "2020-04-26T01:31:35Z")

</div>

Nevermind. I figured it out. I was running node-red-start under sudo. Running without sudo solved my issue.

---

<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:** [10 May 2020 01:31 UTC](https://discourse.nodered.org/t/solved-node-red-directories-in-root/25507/7 "2020-05-10T01:31:36Z")

</div>

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