# Moving LAN MQTT Broker to new machine by text editing flows.json

**URL:** <https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702>\
**Category:** General\
**Created:** [4 December 2021 08:30 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702 "2021-12-04T08:30:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 December 2021 08:30 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702/1 "2021-12-04T08:30:16Z")

</div>

Background  
I need to move old Win10 machine that is running my LAN broker to a place with no wire connection so enabled WiFi on it, removed ethernet cable - changed reservation in my router to swap IP over to WiFI MAC address - computer works fine - no NR MQTT node can connect to it ☹

Ignoring that problem - Long term , I've really just wanted to setup mosquitto on new machine and get all my NR instances using that instead so I may as well do that now

I reckon I can manually edit my flows .json files on all my instances and just change

```auto
    {
        "id": "c6e3938e.73397",
        "type": "mqtt-broker",
        "name": "Win8",
        "broker": "192.168.0.23",
        "port": "1883",

```

to

```auto
    {
        "id": "c6e3938e.73397",
        "type": "mqtt-broker",
        "name": "NewHP",
        "broker": "192.168.0.9",
        "port": "1883",

```

and it'll work

tried a little test and seemed to work

Is this a valid technique or will something bite me?

---

<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 December 2021 08:34 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702/2 "2021-12-04T08:34:07Z")

</div>

Perfectly reasonable and workable Simon.

Ps, just in case you weren't aware, you have to enter settings in mosquitto conf file to permit connection from other computers across your Lan (v2 mosquitto defaults to only permitting localhost connectivity for security reasons).

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [4 December 2021 10:53 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702/3 "2021-12-04T10:53:16Z")

</div>

Thanks Steve - yes mosquitto.conf fine

After a break I resumed the battle against original fault and found that although computer said firewall was off on the Wifi, the public one setting was turned on - once I turned it off - everything sprung back into life 🙂

So I can do the change at my leisure again 🙂

---

<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 December 2021 11:21 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702/4 "2021-12-04T11:21:52Z")

</div>

> [@cymplecy](#):
>
> mosquitto.conf fine

On a linux system it is better not to modify the main conf file (as that may get overwritten during an upgrade). Instead you can add a conf file to the directory /etc/mosquitto/conf.d which overrides settings in the main one. So I add a file `/etc/mosquitto/conf.d/mossy.conf` containing

```auto
listener 1883
allow_anonymous true

```

---

<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:** [2 February 2022 11:22 UTC](https://discourse.nodered.org/t/moving-lan-mqtt-broker-to-new-machine-by-text-editing-flows-json/54702/5 "2022-02-02T11:22:35Z")

</div>

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