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

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

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, but it’ll still start the http server…

1 Like

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

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?

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.