# Openhabian: zigbee2mqtt doesn't update

**URL:** <https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315>\
**Category:** openHABian\
**Tags:** zigbee2mqtt\
**Created:** [September 3, 2026, 5:24pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315 "2026-09-03T17:24:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Larsen](https://community.openhab.org/user_avatar/community.openhab.org/larsen/32/95475_2.png) [@Larsen](https://community.openhab.org/u/Larsen)\
**Post date:** [September 3, 2026, 5:24pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315/1 "2026-09-03T17:24:48Z")

</div>

I noticed a problem when trying to update zigbee2mqtt via  
_openhabian-config_. The problem is that the onboarding server port is changed locally during installation to avoid a conflict with openhab. Git notices this local change and then refuses to update.

The quick fix is to do a

```auto
cd /opt/zigbee2mqtt
git restore lib/util/onboarding.ts

```

After that you should be able to update normally with _openhabian-config_.

Of course this should be fixed in openhabian too.  
@mstormi : Is it ok for you to restore the onboarding.js as stated above before updating? I don’t see a disadvantage.

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [September 3, 2026, 5:39pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315/2 "2026-09-03T17:39:35Z")

</div>

I don’t understand what’s going on there so cannot really comment.

---

<div class="post-metadata">

**Author:** ![Larsen](https://community.openhab.org/user_avatar/community.openhab.org/larsen/32/95475_2.png) [@Larsen](https://community.openhab.org/u/Larsen)\
**Post date:** [September 3, 2026, 6:15pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315/3 "2026-09-03T18:15:42Z")

</div>

I’ll try to explain:

Starting with v2 zigbee2mqtt has a so called onboarding service which creates the config during the first installation. I changed the z2m-installation to use this service because it brings advantages e.g. with the detection of the zigbee-adaper compared to the old template-method. Unfortunately this service is started at port 8080 just like openhab.

As there was no possibility to change this initial port easily (like wit env-variables) I decided to stream-edit the port directly after pulling the repo. This is done in line 228 in nodejs-apps.bash

```php
if ! cond_redirect sed -i -e "s|8080|8081|g" "/opt/zigbee2mqtt/lib/util/onboarding.ts"; then echo "FAILED (change z2m onboarding port)"; fi
}

```

This works fine for the installation. But when you do an update in openhabian-config (20 - 2A) the z2m-update-skript does a git pull which notices the difference in the file onboarding.js and doesn’t complete the pull.

So the easiest solution is to restore onboarding.js before the update. I think that’s cleaner anyway.

---

<div class="post-metadata">

**Author:** ![mstormi](https://community.openhab.org/user_avatar/community.openhab.org/mstormi/32/55857_2.png) [@mstormi](https://community.openhab.org/u/mstormi)\
**Post date:** [September 3, 2026, 7:05pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315/4 "2026-09-03T19:05:51Z")

</div>

isn’t it safer to redo the port replacement on every update?  
in the end, I don’t mind

---

<div class="post-metadata">

**Author:** ![Larsen](https://community.openhab.org/user_avatar/community.openhab.org/larsen/32/95475_2.png) [@Larsen](https://community.openhab.org/u/Larsen)\
**Post date:** [September 3, 2026, 7:35pm UTC](https://community.openhab.org/t/openhabian-zigbee2mqtt-doesnt-update/170315/5 "2026-09-03T19:35:28Z")

</div>

I’ll do the PR.
