# Install node red

**URL:** https://discourse.nodered.org/t/install-node-red/23157
**Category:** General
**Created:** [16 March 2020 06:01 UTC](https://discourse.nodered.org/t/install-node-red/23157 "2020-03-16T06:01:01Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)
#### Post date: [16 March 2020 06:01 UTC](https://discourse.nodered.org/t/install-node-red/23157/1 "2020-03-16T06:01:01Z")

</div>

How to install node red on particular directory on windows?  
eg  
npm install D:\abc\def\Node-red --unsafe-perm node-red

its not working please let me know how to do that thanks

---

<div class="post-metadata">

### Author: ![Nxito](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nxito/32/88293_2.png) [@Nxito](https://discourse.nodered.org/u/Nxito)
#### Post date: [16 March 2020 07:30 UTC](https://discourse.nodered.org/t/install-node-red/23157/2 "2020-03-16T07:30:31Z")

</div>

what i do in cmd is:

> cd "D:\abc\def\Node-red"

and then:

> npm i node-red

U can read NPM documentation too  
A simple google search can help a lot

---

<div class="post-metadata">

### Author: ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)
#### Post date: [16 March 2020 09:07 UTC](https://discourse.nodered.org/t/install-node-red/23157/3 "2020-03-16T09:07:01Z")

</div>

after installing this error came

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/e/9e98aaf80ce34c1b10aa930b5d87a61f6ebdaa42.png)

---

<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: [16 March 2020 09:47 UTC](https://discourse.nodered.org/t/install-node-red/23157/4 "2020-03-16T09:47:05Z")

</div>

npm has two ways of installing modules - either as a local module or a global module.

When installed as a global module (by using the `-g` option) then it will place any scripts the module provides onto your path so they can be run from anywhere.

When installed as a local module (as you are doing here) then it does _not_ put the scripts onto your path.

To run node-red when it has been installed into a local directory you would run:

`node node_modules/node-red/red.js`

You may also want to look at [New Utility: alternate-node-red-installer](https://discourse.nodered.org/t/new-utility-alternate-node-red-installer/13490)

---

<div class="post-metadata">

### Author: ![Nxito](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nxito/32/88293_2.png) [@Nxito](https://discourse.nodered.org/u/Nxito)
#### Post date: [16 March 2020 09:47 UTC](https://discourse.nodered.org/t/install-node-red/23157/5 "2020-03-16T09:47:14Z")

</div>

When installing locally and not globally, the command can be found from the installation folder:  
"D: \ abc \ def \ Node-red \ node\_modules \ .bin \ node-red.cmd"  
You can use this file to run node-red or create a service with nssm. I recommend you take a look at the documentation:  
[https://nodered.org/docs/getting-started/local](https://nodered.org/docs/getting-started/local)  
Look at Comand line

---

<div class="post-metadata">

### Author: ![DemonKing](https://avatars.discourse-cdn.com/v4/letter/d/b4bc9f/32.png) [@DemonKing](https://discourse.nodered.org/u/DemonKing)
#### Post date: [16 March 2020 10:01 UTC](https://discourse.nodered.org/t/install-node-red/23157/6 "2020-03-16T10:01:23Z")

</div>

node node node\_modules/node-red/red.js  
this working fine thank you  
but flows created C:\Users\user.node-red (default)  
can we change this in to custom directory?

---

<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: [16 March 2020 10:02 UTC](https://discourse.nodered.org/t/install-node-red/23157/7 "2020-03-16T10:02:52Z")

</div>

Yes - look at the docs @Nxito pointed you at - [https://nodered.org/docs/getting-started/local#command-line-usage](https://nodered.org/docs/getting-started/local#command-line-usage)

You can use all the same command-line arguments when using `node node_modules/.....` as you can with the `node-red` command.

---

<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: [16 March 2020 15:12 UTC](https://discourse.nodered.org/t/install-node-red/23157/8 "2020-03-16T15:12:42Z")

</div>

I put up an article on different ways to install Node-RED:

> **[FAQ 3: What different ways are there to install Node-RED and which is best?](https://it.knightnet.org.uk/kb/nr-qa/faq3-types-of-installation/)**
>
> There are several possible ways to install Node-RED, this post provides an overview and some thoughts about when you might want to use which approach.

Obviously, the official docs should be read first.

---

<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: [30 March 2020 15:12 UTC](https://discourse.nodered.org/t/install-node-red/23157/9 "2020-03-30T15:12:51Z")

</div>

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