# How to trigger a Node-RED flow from a shell script

**URL:** <https://discourse.nodered.org/t/how-to-trigger-a-node-red-flow-from-a-shell-script/67208>\
**Category:** General\
**Created:** [1 September 2022 08:03 UTC](https://discourse.nodered.org/t/how-to-trigger-a-node-red-flow-from-a-shell-script/67208 "2022-09-01T08:03:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [1 September 2022 09:13 UTC](https://discourse.nodered.org/t/how-to-trigger-a-node-red-flow-from-a-shell-script/67208/2 "2022-09-01T09:13:32Z")

</div>

MQTT would work, but you would need an MQTT client installed on the PC, which you may not. curl may well already be installed, and is easily installed if it isn't, so possibly best to use that.

> [@HonestJohn61](#):
>
> presumably the IP would be that of the Node-RED server

Yes

> [@HonestJohn61](#):
>
> a particular port specified in both the curl request and Node-RED listening node

It would be the same port that node red uses (1880 by default). [This post](https://cookbook.nodered.org/http/create-an-http-endpoint) in the cookbook shows how you can easily create an http endpoint in node-red.

> [@HonestJohn61](#):
>
> does it matter that Node-RED will never respond to the curl request?

It _will_ respond, as described in the example.

---

_[View the full topic](https://discourse.nodered.org/t/how-to-trigger-a-node-red-flow-from-a-shell-script/67208)._
