# Running Node Red in Windows

**URL:** <https://discourse.nodered.org/t/running-node-red-in-windows/3697>\
**Category:** General\
**Created:** [4 October 2018 21:32 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697 "2018-10-04T21:32:42Z")\
**Posts on this page:** 6\
**Page:** 2

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [5 October 2018 01:32 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/21 "2018-10-05T01:32:37Z")

</div>

> [@dedynobre](#):
>
> What is the path of the log file? I did not find it

That would depend upon what you are using to start node-red, so the log directory should be configured in NSSM somewhere. But at this point I would remove NSSM and set up a Scheduled Task like Julian suggested. There you can also see the output directory, task run history, and log entries (if i recall correctly).

---

<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:** [5 October 2018 07:54 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/22 "2018-10-05T07:54:14Z")

</div>

> [@shrickus](#):
>
> There you can also see the output directory, task run history, and log entries (if i recall correctly).

I think log output may depend on how/when you are starting the task. If you start manually, you will see the console which contains the log. You will most likely want to dump the log to a file. To do that, you need to create a wrapper cmd or powershell script and redirect the output. You might also want to improve that file by putting in log rotation logic.

PM2 will do all that for you of course.

---

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [5 October 2018 11:40 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/23 "2018-10-05T11:40:40Z")

</div>

@dedynobre,  
I pulled my hair out for the same problem....  
You need to use the -u argument in the AppParameters

```auto
nssm set Node-RED AppParameters "-u c:\Users\\"%USERNAME%"\.node-red > c:\temp\node-red.log"

```

![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/8/8a83a56077803fae841b1740c66d8937eca12dcc.png)

---

<div class="post-metadata">

**Author:** ![dedynobre](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dedynobre/32/950_2.png) [@dedynobre](https://discourse.nodered.org/u/dedynobre)\
**Post date:** [5 October 2018 11:58 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/24 "2018-10-05T11:58:17Z")

</div>

Thank you.

Now, is running correctly.

Very good.

---

<div class="post-metadata">

**Author:** ![shrickus](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/shrickus/32/517_2.png) [@shrickus](https://discourse.nodered.org/u/shrickus)\
**Post date:** [5 October 2018 12:38 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/25 "2018-10-05T12:38:14Z")

</div>

> [@arneym](#):
>
> You need to use the -u argument in the AppParameters

That's odd -- if you _don't_ specify the `-u xxx` option, it should use the current working dir, which is the same Startup directory...

If that didn't work, then I would also try `-u .` to force it to use the current dir -- that would avoid all the USERNAME substitution stuff.

---

<div class="post-metadata">

**Author:** ![arneym](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arneym/32/54_2.png) [@arneym](https://discourse.nodered.org/u/arneym)\
**Post date:** [5 October 2018 13:05 UTC](https://discourse.nodered.org/t/running-node-red-in-windows/3697/26 "2018-10-05T13:05:56Z")

</div>

On my system it referenced C:\Windows\System32\config\systemprofile.node-red

[Previous page](https://discourse.nodered.org/t/running-node-red-in-windows/3697.md?page=1)
