# Settings file path change

**URL:** <https://discourse.nodered.org/t/settings-file-path-change/81883>\
**Category:** General\
**Created:** [9 October 2023 13:42 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883 "2023-10-09T13:42:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![LucasPeluso](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LucasPeluso](https://discourse.nodered.org/u/LucasPeluso)\
**Post date:** [9 October 2023 13:42 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/1 "2023-10-09T13:42:16Z")

</div>

Hi, I need to change the setttings.js path. Is this posiblle?  
Thanks, Lucas

 ![captura](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/6/867ff97cb687a37ee5f2afdbf43a0eee9563704a.png)

```auto

```

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [9 October 2023 13:45 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/2 "2023-10-09T13:45:09Z")

</div>

Hi @LucasPeluso,

I'm not sure how you are starting/running Node RED - but it can be passed various args - one of which is `-s`, -`-settings`

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

---

<div class="post-metadata">

**Author:** ![LucasPeluso](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LucasPeluso](https://discourse.nodered.org/u/LucasPeluso)\
**Post date:** [9 October 2023 13:52 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/3 "2023-10-09T13:52:20Z")

</div>

Hi marcus, i´m running node-red from powershell. The thing is that i don´t know where i can change that path.  
Thanks, Lucas

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [9 October 2023 13:58 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/4 "2023-10-09T13:58:24Z")

</div>

`settings.js` by default is loaded from `~/.node-red/settings.js` (its in the source code)  
To change it - you pass it an arg of `--settings`

Assuming your running the module directly.

`node node_modules/node-red/red.js --settings E:/NRSettings/settings.js`

---

<div class="post-metadata">

**Author:** ![LucasPeluso](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LucasPeluso](https://discourse.nodered.org/u/LucasPeluso)\
**Post date:** [9 October 2023 14:28 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/5 "2023-10-09T14:28:05Z")

</div>

Hi Marcus, I think I understand you. I have some doubts. I will explaind you all more detailed.  
I´m working with 2 servers. The instalation was made in the .152 but in the server .151 don´t work the node-red. The only disk shared between the servers is the U disk. So I need to change de running path to de U disk.

I copy the .node-red carpet to the U disk.

On the other hand, I have the red.js file in the folder .node-red not in the node\_modules/node-red. Is the same?

Then I imagen that the path --settings is the path of the new file that i want to open.

I hope I have made myself understood, since English is not my native language.  
Thanks Lucas

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [9 October 2023 14:47 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/6 "2023-10-09T14:47:09Z")

</div>

Node RED consists of the Node RED install its self (i.e. the Node RED application)  
under normal circumstance - this is some global `node_modules` folder

- i.e `C:\Users\<User>\AppData\Roaming\npm\node_modules`

In here is where `red.js` lives `node_modules\node-red\red.js` (the Node RED application)

The 2nd location is the users home directory (the person running Node RED)  
By default this is : `C:\Users\<User>\.node-red` and in here is:

- The persons flow file (flows.json)
- The persons settings file (settings.js)
- a few other things

So if you do not provide any argument to `red.js` it will use defaults:

- Home being `<user>/.node-red`
- Settings being `<Home>/settings.js`
- Flows being `<Home>/flows.json`

And you can override these defaults at runtime with the args I posted.

And just in case your trying to do something fancy - any running instance of Node RED must use their own `Home` folder - as that is a recipe for disaster if 2 Node RED instances are running with the same `Home` folder set.

Its also important to note: any user installed Nodes, will be installed into the `Home` folder Node RED is using

---

<div class="post-metadata">

**Author:** ![LucasPeluso](https://avatars.discourse-cdn.com/v4/letter/l/bbe5ce/32.png) [@LucasPeluso](https://discourse.nodered.org/u/LucasPeluso)\
**Post date:** [9 October 2023 14:57 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/7 "2023-10-09T14:57:11Z")

</div>

ok, great. I could change the settings.js path.  
But it does´t solve my problem.

I what to try to change the userDir.

What would the command be like in this case?

---

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [9 October 2023 14:58 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/8 "2023-10-09T14:58:31Z")

</div>

to set the `userDir` - what I have been referring to as `Home` 😅

`red.js --userDir E:/some/Home/location`

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 October 2023 16:44 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/9 "2023-10-09T16:44:32Z")

</div>

It is also possible to install Node-RED itself to the U: drive if you want to. It is "just" a node.js app and so can be installed anywhere, it doesn't have to be installed to the global location.

---

<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:** [8 December 2023 16:45 UTC](https://discourse.nodered.org/t/settings-file-path-change/81883/10 "2023-12-08T16:45:06Z")

</div>

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