# How can I change the default $HOME/.node-red folder location from the source code?

**URL:** https://discourse.nodered.org/t/how-can-i-change-the-default-home-node-red-folder-location-from-the-source-code/61037
**Category:** General
**Created:** [9 April 2022 19:23 UTC](https://discourse.nodered.org/t/how-can-i-change-the-default-home-node-red-folder-location-from-the-source-code/61037 "2022-04-09T19:23:59Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![raylight](https://avatars.discourse-cdn.com/v4/letter/r/cdc98d/32.png) [@raylight](https://discourse.nodered.org/u/raylight)
#### Post date: [9 April 2022 19:23 UTC](https://discourse.nodered.org/t/how-can-i-change-the-default-home-node-red-folder-location-from-the-source-code/61037/1 "2022-04-09T19:23:59Z")

</div>

I like to install multiple instances of Node-RED with a single user on Linux. For doing that, I used to get Node-RED source code from GitHub and then using Visual Studio I substituted all `.node-red` words inside its source code with `.node-red2` or something else. Well, that used to work in the past but I tried doing the same and it doesn't work with version 2.2.2.

After running `npm install` and `npm start` I receive the following message:

```auto
> node-red@2.2.2 start
> node packages/node_modules/node-red/red.js

9 Apr 16:10:09 - [info] 

Welcome to Node-RED
===================

9 Apr 16:10:09 - [info] Node-RED version: v2.2.2
9 Apr 16:10:09 - [info] Node.js version: v16.14.2
9 Apr 16:10:09 - [info] Linux 5.4.0-107-generic x64 LE
9 Apr 16:10:09 - [info] Loading palette nodes
9 Apr 16:10:10 - [info] Worldmap version 2.28.0
9 Apr 16:10:10 - [info] Dashboard version 3.1.3 started at /ui
9 Apr 16:10:10 - [info] Settings file : /home/user/.node-red/settings.js
9 Apr 16:10:10 - [info] HTTP Static : /home/user/.node-red/static
9 Apr 16:10:10 - [info] Context store : 'default' [module=memory]
9 Apr 16:10:10 - [info] User directory : /home/user/.node-red
9 Apr 16:10:10 - [warn] Flows file name not set. Generating name using hostname.
9 Apr 16:10:10 - [info] Flows file : /home/user/.node-red/flows_lavos.json
9 Apr 16:10:10 - [error] Uncaught Exception:
9 Apr 16:10:10 - [error] Error: listen EADDRINUSE: address already in use 0.0.0.0:1880
    at Server.setupListenHandle [as _listen2] (node:net:1330:16)
    at listenInCluster (node:net:1378:12)
    at doListen (node:net:1516:7)
    at processTicksAndRejections (node:internal/process/task_queues:84:21)

```

In fact, the address 1880 is already in use with a different instance of node-red. But what bugs me is that it's looking at the folder `/home/user/.node-red/flows_lavos.json` and not `/home/user/.node-red2/flows_lavos.json`. What am I missing? I'm sure that all `.node-red` words on Node-RED's source code were substituted by `.node-red2`. Is there any extra procedure or a different way of accomplishing the same?

---

<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: [9 April 2022 20:03 UTC](https://discourse.nodered.org/t/how-can-i-change-the-default-home-node-red-folder-location-from-the-source-code/61037/2 "2022-04-09T20:03:12Z")

</div>

There is no need to change the source code.

Start Node-RED with the `-u` argument to tell it what directory you want it to use.

[https://nodered.org/docs/getting-started/local#command-line-usage](https://nodered.org/docs/getting-started/local#command-line-usage)

---

<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: [23 April 2022 20:03 UTC](https://discourse.nodered.org/t/how-can-i-change-the-default-home-node-red-folder-location-from-the-source-code/61037/3 "2022-04-23T20:03:28Z")

</div>

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