# Run a flow without running the GUI editor or opening a port

**URL:** <https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367>\
**Category:** General\
**Created:** [24 May 2018 19:03 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367 "2018-05-24T19:03:12Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rytiggy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rytiggy/32/273_2.png) [@rytiggy](https://discourse.nodered.org/u/rytiggy)\
**Post date:** [24 May 2018 19:03 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/1 "2018-05-24T19:03:12Z")

</div>

Hey I am trying to run a flow without having the GUI open or have a port open, essentially what I want is to be able to run `node-red myflow.json` and have the results of the flow output to the terminal. I would like this to happen without the web service spinning up.

is this possible?

Thanks

---

<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:** [24 May 2018 20:37 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/2 "2018-05-24T20:37:18Z")

</div>

If you mean you’d like node-red to start, run your flow, then exit - no, that isn’t possible. Node-RED doesn’t know when any particular flow has ‘finished’ - it is intended to run as a long-running process.

You can disabled the http routes by setting `httpAdminRoot` and `httpNodeRoot` to `false` - [https://github.com/node-red/node-red/blob/master/settings.js#L89](https://github.com/node-red/node-red/blob/master/settings.js#L89), but it’ll still start the http server…

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [24 May 2018 20:51 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/3 "2018-05-24T20:51:55Z")

</div>

Presumably you could use an exec node to run a command to stop node-red when the flow completed.

---

<div class="post-metadata">

**Author:** ![like-a-bause](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/like-a-bause/32/84847_2.png) [@like-a-bause](https://discourse.nodered.org/u/like-a-bause)\
**Post date:** [15 November 2023 12:21 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/4 "2023-11-15T12:21:47Z")

</div>

Hey, sorry for resurrecting this thread. But for me this isn't really answered as the suggestion from Colin would need a special setup inside the flow itself.  
Does this still apply for most recent versions? And if yes: Could I easily use the only the runtime of node red and build a wrapper around a one-time-execution model?

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 November 2023 13:12 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/5 "2023-11-15T13:12:30Z")

</div>

Welcome to the forum @like-a-bause

Since this thread is five years old, and it isn't clear exactly what issue you have, please start a new thread describing the problem you have.

I will close this one.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [15 November 2023 13:13 UTC](https://discourse.nodered.org/t/run-a-flow-without-running-the-gui-editor-or-opening-a-port/367/6 "2023-11-15T13:13:25Z")

</div>


