# How do I restart Node Red without a Powershell window

**URL:** <https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756>\
**Category:** General\
**Created:** [28 May 2023 12:49 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756 "2023-05-28T12:49:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mikee1234K](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikee1234k/32/70283_2.png) [@Mikee1234K](https://discourse.nodered.org/u/Mikee1234K)\
**Post date:** [28 May 2023 12:49 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/1 "2023-05-28T12:49:13Z")

</div>

I am on Windows 11, and start Node Red with the task scheduler at startup. This does not open a powershell window, so I cannot stop Node Red with a Ctrl-C or by closing the window. So when I want to restart Node Red, I close all node.js processes in the task manager, then open a powershell window and type node-red...  
Is there a easier way ?

---

<div class="post-metadata">

**Author:** ![omrid](https://avatars.discourse-cdn.com/v4/letter/o/77aa72/32.png) [@omrid](https://discourse.nodered.org/u/omrid)\
**Post date:** [28 May 2023 13:31 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/2 "2023-05-28T13:31:16Z")

</div>

Task scheduler logs-in and runs the server in a background window, so you cannot see it.  
If you want it to run in a visible window, where you can stop it with Ctrl-C, place a shortcut to the batch file in your "auto-start" folder.  
Alternatively, you can run the Node-red Server batch file as a Windows "Service", using the utility NSSM.exe, and then stop/start it from the services pane.

---

<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:** [28 May 2023 16:13 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/3 "2023-05-28T16:13:04Z")

</div>

Personally I run node-red on Windows under PM2. That lets you do various things including using the `pm2` command to control what is running and view logs. It also lets you create a set of watches so that you can auto-restart node-red if certain things - like developing nodes, settings.js, etc change.

I run it manually though, I've never bothered to auto-start since I don't always need it running. I have a Windows Terminal configuration that starts the node-red PM2 config and displays the log output, I use package.json to simplify the startup command as well so that if I ctrl-c the open terminal window, I can make changes and then simply do `npm restart` to restart the PM2 session and re-show the log.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/4/a41af176ef35d642dc89ca16edfd99e761532260.jpeg)

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

---

<div class="post-metadata">

**Author:** ![Mikee1234K](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikee1234k/32/70283_2.png) [@Mikee1234K](https://discourse.nodered.org/u/Mikee1234K)\
**Post date:** [28 May 2023 16:19 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/4 "2023-05-28T16:19:55Z")

</div>

That looks interesting, not something I have ever used. Looking at the pm2 website, after installing pm2, I would open a powershell window, and type $ pm2 start node-red ?

---

<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:** [28 May 2023 16:25 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/5 "2023-05-28T16:25:21Z")

</div>

> [@Mikee1234K](#):
>
> after installing pm2, I would open a powershell window, and type $ pm2 start node-red ?

Yes, or a cmd window, whatever preference you have. I think I'm using a cmd window simply because my PowerShell startup is a bit complex and so takes some time.

Windows terminal is a fantastic tool for devs by the way, I strongly recommend it on W10, it is the default now I think on W11. It gives you a multi-tabbed shell interface so you can have node-red, plain cmd, PowerShell, WSL and SSH all open together.

---

<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:** [27 July 2023 16:25 UTC](https://discourse.nodered.org/t/how-do-i-restart-node-red-without-a-powershell-window/78756/6 "2023-07-27T16:25:59Z")

</div>

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