# Mqtt broker - add a new one via ui?

**URL:** <https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391>\
**Category:** General\
**Created:** [19 April 2021 09:00 UTC](https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391 "2021-04-19T09:00:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)\
**Post date:** [19 April 2021 09:00 UTC](https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391/1 "2021-04-19T09:00:04Z")

</div>

Is it possible to add the mqtt connect infos via a user interface page instead of the setup in the flow?  
I do similar things with tcp-connections, where msg.port and msg.ip are good friends of mine.

---

<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:** [19 April 2021 19:50 UTC](https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391/2 "2021-04-19T19:50:24Z")

</div>

No, not possible but you can use environment variables e.g. ${brokerip}. So a kinda workaround can be achieved.

Notee. Env vars are only read on startup of node-red.

---

<div class="post-metadata">

**Author:** ![alexander77](https://avatars.discourse-cdn.com/v4/letter/a/3ec8ea/32.png) [@alexander77](https://discourse.nodered.org/u/alexander77)\
**Post date:** [20 April 2021 11:18 UTC](https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391/3 "2021-04-20T11:18:21Z")

</div>

A clear answer is definitely a help.  
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:** [19 June 2021 11:18 UTC](https://discourse.nodered.org/t/mqtt-broker-add-a-new-one-via-ui/44391/4 "2021-06-19T11:18:30Z")

</div>

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