# Trigger flow in one instance from another instance

**URL:** <https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177>\
**Category:** General\
**Created:** [4 February 2024 08:22 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177 "2024-02-04T08:22:32Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dacron](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Dacron](https://discourse.nodered.org/u/Dacron)\
**Post date:** [4 February 2024 08:22 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/1 "2024-02-04T08:22:33Z")

</div>

Hi I have node red instances setup and working on two systems, a mini pc and an inverter both on the same network. Both are working and controlling their systems perfectly. I would like to be able to trigger a flow on one instance from a flow result on the other, how is the best way to do this. I very new to this thanks.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [4 February 2024 08:31 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/2 "2024-02-04T08:31:18Z")

</div>

IMO, MQTT is the simplest.

You setup 1 broker (on one of the computers) and configure both instances to point at that. Then you can send structured messages between the two by way of simple topics like `nodered/1/status` and `nodered/2/control` (or whatever topics you care to invent)

If you are not familiar with MQTT, there are lots of great video tutorials on YouTube (search "node-red MQTT")

As for the broker, the go-to broker of choice is mosquitto. Note. After install, you will need adjust it's config:

```auto
listener 1883 0.0.0.0

```

in mosquitto.conf to permit connectivity from across your lan network.

---

<div class="post-metadata">

**Author:** ![Dacron](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Dacron](https://discourse.nodered.org/u/Dacron)\
**Post date:** [4 February 2024 08:41 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/3 "2024-02-04T08:41:27Z")

</div>

Thanks for the reply Steve perfect

---

<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:** [4 February 2024 09:26 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/4 "2024-02-04T09:26:40Z")

</div>

To learn more about MQTT then see this tutorial [MQTT Essentials - All Core Concepts Explained](https://www.hivemq.com/mqtt-essentials/)

---

<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:** [4 February 2024 16:16 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/5 "2024-02-04T16:16:42Z")

</div>

If you don't want to add an MQTT broker. The next simplest is almost certainly a simple HTTP(S) endpoint.

On the target, use a pair of http-in/-out nodes to create a simple endpoint. Add a 2nd output on the http-in node to trigger your flow. On the source instance, use an http-request node to trigger.

---

<div class="post-metadata">

**Author:** ![Dacron](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Dacron](https://discourse.nodered.org/u/Dacron)\
**Post date:** [4 February 2024 17:02 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/6 "2024-02-04T17:02:17Z")

</div>

Thanks Colin 👍

---

<div class="post-metadata">

**Author:** ![Dacron](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@Dacron](https://discourse.nodered.org/u/Dacron)\
**Post date:** [4 February 2024 17:03 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/7 "2024-02-04T17:03:33Z")

</div>

Thanks I will research both methods

---

<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:** [4 May 2024 17:03 UTC](https://discourse.nodered.org/t/trigger-flow-in-one-instance-from-another-instance/85177/8 "2024-05-04T17:03:54Z")

</div>

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