# To install Node-Red globally or not to

**URL:** <https://discourse.nodered.org/t/to-install-node-red-globally-or-not-to/216>\
**Category:** General\
**Created:** [17 May 2018 17:33 UTC](https://discourse.nodered.org/t/to-install-node-red-globally-or-not-to/216 "2018-05-17T17:33:06Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![nlecaude](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nlecaude/32/25_2.png) [@nlecaude](https://discourse.nodered.org/u/nlecaude)\
**Post date:** [18 May 2018 14:13 UTC](https://discourse.nodered.org/t/to-install-node-red-globally-or-not-to/216/3 "2018-05-18T14:13:32Z")

</div>

I always install Node-RED locally on my side. My workflow looks somewhat like this:

```bash
mkdir myNodeREDProject
cd myNodeREDProject
npm init (to create a package.json file)
npm install --save node-red

```

I then usually add a start script in the package.json file for quick tests:

```json
{
"scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "start": "node node_modules/node-red/red.js -v -u ."
  }

```

For persistence I use pm2 to run the local copy. A typical pm2 process file would look like this:

nodered\_pm2.yaml

```auto
apps:
    - name: myNodeREDapp
      script: ./node_modules/node-red/red.js
      args: ["-v", "-u", "."]

```

That file lives in the myNodeREDProject folder and I would start it like this:

```bash
pm2 start nodered_pm2.yaml

```

I also like to hardcode the name of the flow file in `settings.js` as it makes it more portable and is not dependant on the hostname.

---

_[View the full topic](https://discourse.nodered.org/t/to-install-node-red-globally-or-not-to/216)._
