Two Zigbee2MQTT on external server

Hi,

I have trouble with my zigbee2mqtt-integrations. My setup is:

external server running docker compose with the following container:

  1. Host: zigbee2mqtt → CH 11, PAN ID 6754,
  2. Host zigbee2mqtt2 ->CH 25, PAN ID 6754

Mosquitto:
3. mosquitto mqtt-Server

Homeassitant is running on a different server.

My issue is, that I always loose devices from the zigbee2mqtt server in Homneassitant when I reboot the other zigbee2mqtt container. That means, that I alway have configured devices in HA from the last booted zigbee2mqtt container. Devices on both containers can be managed by the Web-Interface on the specific zigbee2mqtt-server.

To fix it in HA, I have to re-pair the devices from the missing container. Then both instances work smoothly until the next reboot of one of the zigbee2mqtt-servers

What is going wrong here? Do I need to change the PAN IDs to different IDs? And how can I change it? And what is the consequence if I change the id? Or can someone tell me how toI fix the issue?

here the configuration.yaml from both systems.

configuration1:

homeassistant:
  legacy_entity_attributes: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://mosquitto:8883
  ca: /app/data/ssl/ca.crt
  key: /app/data/ssl/zigbee2mqtt.key
  cert: /app/data/ssl/zigbee2mqtt.crt
  user: mqttService
  password: xxxxxxx
  serial: null
  port: tcp://172.16.50.5:20108
  keepalive: 60
  reject_unauthorized: false
  version: 4
serial:
  port: tcp://172.16.50.5:20108
frontend:
  port: 8099
advanced:
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
  timestamp_format: DD.MM.YYYY HH:mm:ss
  channel: 25
  homeassistant_legacy_entity_attributes: false
  legacy_api: true
  legacy_availability_payload: true
  log_level: info
  last_seen: ISO_8601_local
device_options:
  legacy: false

configuration 2:

homeassistant:
  legacy_entity_attributes: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://mosquitto:8883
  ca: /app/data/ssl/ca.crt
  key: /app/data/ssl/zigbee2mqtt.key
  cert: /app/data/ssl/zigbee2mqtt.crt
  user: mqttService
  password: xxxxxx
  keepalive: 60
  reject_unauthorized: false
  version: 4
serial:
  port: tcp://172.16.50.7:6638
  baudrate: 115200
frontend:
  port: 8099
advanced:
  log_syslog:
    app_name: Zigbee2MQTT2
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
  timestamp_format: DD.MM.YYYY HH:mm:ss
  channel: 11
  transmit_power: 20
  homeassistant_legacy_entity_attributes: false
  legacy_api: true
  legacy_availability_payload: true
  log_level: info
  last_seen: ISO_8601_local
device_options:
  legacy: false
devices: