# Running on windows server 2012 r2

**URL:** <https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586>\
**Category:** General\
**Created:** [1 October 2018 11:57 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586 "2018-10-01T11:57:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [1 October 2018 11:57 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/1 "2018-10-01T11:57:17Z")

</div>

Hi everyone, so as the title suggest, i'm running node-red on windows server. The server reboots it self every night at some fixed time, and when it "comes back" does not start the session, but it starts all the services except the node-red, so my question is how can i make the node-red start without having to initiate the session?

Greatings.

Andrés

---

<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:** [1 October 2018 12:00 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/2 "2018-10-01T12:00:05Z")

</div>

I use this program and procedure, from @dceejay, to run NR on my server. I runs flawlessly!

> <https://gist.github.com/dceejay/576b4847f0a17dc066db>

---

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [1 October 2018 12:04 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/3 "2018-10-01T12:04:51Z")

</div>

sorry for the silly question, does this means that i have to reinstall node-red?

---

<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:** [1 October 2018 12:07 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/4 "2018-10-01T12:07:07Z")

</div>

No. Just download, install NSSM, and follow the procedure in my previous reply. It is very easy.

Thanks,  
Mike

---

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [1 October 2018 12:08 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/5 "2018-10-01T12:08:09Z")

</div>

thanks a lot, i'll try this.

Andrés

---

<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:** [1 October 2018 13:36 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/6 "2018-10-01T13:36:31Z")

</div>

As you can see from the thread there, there are other ways as well. PM2 is OK. You can actually do it without any additional tools as well, just using Windows Scheduler.

---

<div class="post-metadata">

**Author:** ![Andres](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andres/32/112_2.png) [@Andres](https://discourse.nodered.org/u/Andres)\
**Post date:** [1 October 2018 13:40 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/7 "2018-10-01T13:40:04Z")

</div>

i already try the windows scheduler and didn't work, now i've tried what @arneym suggested on my test server and work flawlessly, honestly i don't know why

---

<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:** [1 October 2018 13:43 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/8 "2018-10-01T13:43:01Z")

</div>

> [@Andres](#):
>
> i already try the windows scheduler and didn't work

Getting the quotes and paths right can be a challenge. I'm not using the scheduler at the moment as I run it manually (using W10 for my dev machine). Also, I use npm's package.json to define a "start" script with all of the parameters included so that I can do `npm start`, this should be adaptable for the Scheduler.

Here are some settings - this for a schedule task that is run manually. Note the non-standard location of the start folder.

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

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

---

<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:** [1 October 2018 14:32 UTC](https://discourse.nodered.org/t/running-on-windows-server-2012-r2/3586/9 "2018-10-01T14:32:55Z")

</div>

That is a great option too! I just wasn't smart enough to figure the scheduler out. I found the NSSM solution by searching "Running Node-RED as a service".
