# MQTT Broker configurable via global variabe UAT PROD

**URL:** <https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158>\
**Category:** General\
**Created:** [15 June 2021 06:24 UTC](https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158 "2021-06-15T06:24:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![riker65](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/riker65/32/38453_2.png) [@riker65](https://discourse.nodered.org/u/riker65)\
**Post date:** [15 June 2021 06:24 UTC](https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158/1 "2021-06-15T06:24:54Z")

</div>

Hi  
just wondering how to hande config managemant.

Want to switch between different brokers but not just edit on broker node IP and port  
but setting IP and Port via variable .

Is this possible?

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:** [15 June 2021 06:59 UTC](https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158/2 "2021-06-15T06:59:08Z")

</div>

For now, you can only partly achieve this. You can use env vars in text fields of the MQTT config e.g. `${BROKER}`

[Reference](https://nodered.org/docs/user-guide/environment-variables)

If that is not enough, then there is already a PR for an MQTT Control that allows you to connect with options (all properties of the config). The hope is this will make it into 2.0.0 or soon after (depends on developers very busy schedules).

---

<div class="post-metadata">

**Author:** ![riker65](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/riker65/32/38453_2.png) [@riker65](https://discourse.nodered.org/u/riker65)\
**Post date:** [15 June 2021 07:23 UTC](https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158/3 "2021-06-15T07:23:29Z")

</div>

ok thanks for the fast response

Thanks

---

<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:** [29 June 2021 07:24 UTC](https://discourse.nodered.org/t/mqtt-broker-configurable-via-global-variabe-uat-prod/47158/4 "2021-06-29T07:24:18Z")

</div>

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