# Embedded MQTT Broker - configured programmatically

**URL:** <https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412>\
**Category:** HiveMQ Community Edition\
**Created:** [September 6, 2022, 8:35am UTC](https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412 "2022-09-06T08:35:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mkokoszka](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkokoszka](https://community.hivemq.com/u/mkokoszka)\
**Post date:** [September 6, 2022, 8:35am UTC](https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412/1 "2022-09-06T08:35:03Z")

</div>

Hello all,  
I wonder if there is any possibility to configure the broker programmatically? What I would like to achieve is for example creating a GUI which will allow user to select interface and specify port on which MQTT Broker should listen for incoming messages so the user does not have to edit configuration files. Just select interface from the list and press start button at the UI.

Is there any example how to configure broker without a need to edit the config file?  
Thank you very much in advance for any tips!

Regards  
Marcin

---

<div class="post-metadata">

**Author:** ![mkokoszka](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkokoszka](https://community.hivemq.com/u/mkokoszka)\
**Post date:** [September 13, 2022, 10:15am UTC](https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412/2 "2022-09-13T10:15:56Z")

</div>

Hello community,

seems that nobody tried to configure the broker programmatically? Is it even possible?  
Or configuration via config file is the only one option?

Best regards  
Marcin

---

<div class="post-metadata">

**Author:** ![FloLi](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.hivemq.com/floli/32/17_2.png) [@FloLi](https://community.hivemq.com/u/FloLi)\
**Post date:** [September 14, 2022, 12:31pm UTC](https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412/3 "2022-09-14T12:31:50Z")

</div>

Hi [mkokoszka](https://community.hivemq.com/u/mkokoszka),

glad you’re interested in HiveMQ and welcome to the forum.

To answer your question, no it is not possible to configure any kind of the HiveMQ broker (CE, Embedded, Enterprise) programatically.  
But one way to create a GUI for broker configuration would be changing the configuration-xml-file with the values from the GUI.

Regards Flo

---

<div class="post-metadata">

**Author:** ![mkokoszka](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@mkokoszka](https://community.hivemq.com/u/mkokoszka)\
**Post date:** [October 14, 2022, 9:03am UTC](https://community.hivemq.com/t/embedded-mqtt-broker-configured-programmatically/1412/4 "2022-10-14T09:03:53Z")

</div>

Thanks a lot @FloLi for your response.  
I did as you proposed and my GUI updates the XML config just before starting the embedded broker.

Regards  
Marcin
