# How to stop embedded Node-RED?

**URL:** <https://discourse.nodered.org/t/how-to-stop-embedded-node-red/59904>\
**Category:** General\
**Created:** [15 March 2022 23:44 UTC](https://discourse.nodered.org/t/how-to-stop-embedded-node-red/59904 "2022-03-15T23:44:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![SebCanet](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sebcanet/32/38069_2.png) [@SebCanet](https://discourse.nodered.org/u/SebCanet)\
**Post date:** [15 March 2022 23:44 UTC](https://discourse.nodered.org/t/how-to-stop-embedded-node-red/59904/1 "2022-03-15T23:44:26Z")

</div>

Hello everyone,  
I am developing software to help program microcontroller boards and I want to integrate Node-RED into my Electron application to retrieve data sent by my boards.  
I used the example code ([https://nodered.org/docs/user-guide/runtime/embedding](https://nodered.org/docs/user-guide/runtime/embedding)) and it works fine, but I can't find how to stop the Node-Red runtime (the RED.stop() command doesn't stop anything) or even the express server. I have the impression that it's the same solution everywhere: close the application window. But this is not a solution in my opinion...  
I would like the user to be able to launch a popup (node-red launches in the background) and close it (and thus close node-red and the express server). This seems impossible...  
I tried to list the connections to close them one by one but it doesn't work, I tried to replace Express with Fastify but the problem is the same. In short....HELLLLPPP !!!!  
Thank you very much in advance.

---

<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:** [14 May 2022 23:45 UTC](https://discourse.nodered.org/t/how-to-stop-embedded-node-red/59904/2 "2022-05-14T23:45:07Z")

</div>

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