# Finding settings.js

**URL:** <https://discourse.nodered.org/t/finding-settings-js/6450>\
**Category:** General\
**Created:** [6 January 2019 12:28 UTC](https://discourse.nodered.org/t/finding-settings-js/6450 "2019-01-06T12:28:12Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![SolarPilz](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@SolarPilz](https://discourse.nodered.org/u/SolarPilz)\
**Post date:** [6 January 2019 12:28 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/1 "2019-01-06T12:28:12Z")

</div>

Hi all

I am having a big problem finding the settings.js file in my NR install. I am running it on Rasbian Stretch, and I have tried to update it with the script in the documentation:

bash \<(curl -sL [https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered](https://raw.githubusercontent.com/node-red/raspbian-deb-package/master/resources/update-nodejs-and-nodered))

Unfortunately, the directory still only yields:  
**lib node\_modules** package.json package-lock.json

How can I find the settings.js file (or create it) so I can edit it?  
(I have done a directory search, many reboots, and many reinstalls)

Thanks!

---

<div class="post-metadata">

**Author:** ![ukmoose](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ukmoose/32/13_2.png) [@ukmoose](https://discourse.nodered.org/u/ukmoose)\
**Post date:** [6 January 2019 12:37 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/2 "2019-01-06T12:37:38Z")

</div>

should be in your .node-red (notice the dot) directory within the home account of the user you are running Node-RED as.

The path is also listed in the startup messages when you restart node-RED.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 January 2019 13:21 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/3 "2019-01-06T13:21:35Z")

</div>

If you run, in a terminal

```bash
node-red-stop
node-red-start

```

then the startup messages will show you where settings.js is. Since you installed using the pi script then, as @ukmoose said, it should be in the .node-red folder in the home folder of the user that you were logged in as when you ran the script.

---

<div class="post-metadata">

**Author:** ![SolarPilz](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@SolarPilz](https://discourse.nodered.org/u/SolarPilz)\
**Post date:** [6 January 2019 15:54 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/4 "2019-01-06T15:54:39Z")

</div>

Unfortunately it is not there.

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [6 January 2019 15:55 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/5 "2019-01-06T15:55:23Z")

</div>

It is only copied there after you run Node-RED the first time.

---

<div class="post-metadata">

**Author:** ![SolarPilz](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@SolarPilz](https://discourse.nodered.org/u/SolarPilz)\
**Post date:** [6 January 2019 16:54 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/6 "2019-01-06T16:54:13Z")

</div>

Thanks everyone!

So, there was no settings file for the first few times that I ran the stop and start, as @Colin suggested, but I rebooted the Pi a few times and redid the stop/start a number of times, and it eventually appeared. Not sure why that was the case, but thank you for your help!

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [6 January 2019 16:57 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/7 "2019-01-06T16:57:10Z")

</div>

> [@SolarPilz](#):
>
> here was no settings file for the first few times that I ran the stop and start, as @Colin suggested

When you ran it those first few times what did the start log say about the settingsfile?  
If it said that it was in .node-red as expected then perhaps it was a caching issue with whatever you were using to determine whether the file was there or not.

---

<div class="post-metadata">

**Author:** ![SolarPilz](https://avatars.discourse-cdn.com/v4/letter/s/a88e57/32.png) [@SolarPilz](https://discourse.nodered.org/u/SolarPilz)\
**Post date:** [6 January 2019 17:02 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/8 "2019-01-06T17:02:31Z")

</div>

I don't recall seeing any indication of a settings file at all, but that program ran smoothly. This was the main source of confusion; the whole NodeRed install seemed to be running without any settings at all.

I used exactly the same commands to open the directory now to see if the file was in there - I can't really think how I could have done it differently this time. Perhaps I started with:

```
node-red-start
node-red-stop
```

---

<div class="post-metadata">

**Author:** ![cflurin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cflurin/32/29_2.png) [@cflurin](https://discourse.nodered.org/u/cflurin)\
**Post date:** [6 January 2019 18:15 UTC](https://discourse.nodered.org/t/finding-settings-js/6450/9 "2019-01-06T18:15:33Z")

</div>

@SolarPilz  
Have a look here: [RED-settings](https://github.com/cflurin/node-red-contrib-dsm/wiki/RED-settings)

It returns some infos about node-red:

```auto
"nodeRedVersion": "0.19.5",
"dsmVersion": "0.13.4",
"coreNodesDir": "/usr/lib/node_modules/node-red/nodes",
"userDir": "/home/pi/.node-red",
"settingsFile": "/home/pi/.node-red/settings.js",
"logging": "info",
...

```
