# Install ~/.node-red without running node-red

**URL:** https://discourse.nodered.org/t/install-node-red-without-running-node-red/30232
**Category:** General
**Created:** [16 July 2020 22:44 UTC](https://discourse.nodered.org/t/install-node-red-without-running-node-red/30232 "2020-07-16T22:44:45Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mrSidX](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mrsidx/32/18935_2.png) [@mrSidX](https://discourse.nodered.org/u/mrSidX)
#### Post date: [16 July 2020 22:44 UTC](https://discourse.nodered.org/t/install-node-red-without-running-node-red/30232/1 "2020-07-16T22:44:45Z")

</div>

I have an AWS instance that is created via ansible provisioning, I am at a point where I need to have the `.node-red` folder in my default `ubuntu` user account. When I install node-red (using root) `sudo npm install -g --unsafe-perm node-red node-red-admin` and run it using `pm2`, I get a root user instance of node-red running in the background. I don't want to have node-red running as root for security reasons, so I want to init my `ubuntu` user to have the `.node-red` folder,  
but when I install node-red it only creates it for the `root` user.

Should I be installing node-red without `sudo` to be able for `ubuntu` user to have the .node-red folder in /home/ubuntu/.node-red ?

I notice once I am in `ubuntu` account I can run node-red and this sets up the folders for me on for that user's home folder.

A problem I have is when I try to run node-red via `ubuntu` user, it hangs on the ansible-playbook running part, as I think it thinks the node-red process hasn't exited yet, and waits.

I was wondering if there is a way to create this init of node-red in `ubuntu` home folder without running node-red?

---

<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 July 2020 22:51 UTC](https://discourse.nodered.org/t/install-node-red-without-running-node-red/30232/2 "2020-07-16T22:51:55Z")

</div>

It doesn't matter how you install node-red, it matters how you run it.

Node-RED will create the .node-red directory in the home directory of the user running it - and that only happens when you run, not when you install.

There's nothing stopping you manually creating the directory yourself.

Another option is to use our Pi install script which works on Ubuntu - [https://nodered.org/docs/getting-started/raspberrypi](https://nodered.org/docs/getting-started/raspberrypi) and will set it up to run as a service, rather than rely on pm2.

I note you are installing `node-red-admin` - in case you missed it, you don't need to install that separately anymore as it is built into the main `node-red` command. See the 1.1.0 release blog post for details.

---

<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 July 2020 22:51 UTC](https://discourse.nodered.org/t/install-node-red-without-running-node-red/30232/3 "2020-07-30T22:51:59Z")

</div>

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