permit_join controls when new devices can join the Zigbee network managed by Zigbee2MQTT. Keep that window closed when you are not pairing, but understand what the timer does: it limits a joining operation’s duration, not every possible way a network member can communicate or rejoin.
Zigbee2MQTT 2.0 removed the permanent permit_join: true configuration setting and limited one permit-join operation to 254 seconds. That corrects older advice about leaving one config line open indefinitely. It does not stop an automation or MQTT client repeatedly reopening the window, and it does not make an untrusted device harmless after it has obtained network credentials. The useful controls are the join window, software device lists, network keys and supported install-code commissioning.
What permit_join actually controls
The frontend join button opens joining for 254 seconds and can close it early. The MQTT API uses zigbee2mqtt/bridge/request/permit_join with an explicit duration. It is a gate for new joining, not a replacement for Zigbee encryption, device authentication or security on the MQTT/frontend interfaces.
{"time": 60}
// Send as a separate JSON payload to close the window:
{"time": 0}
// Or enable joining via the coordinator for 60 seconds:
{"time": 60, "device": "coordinator"}
Each object above is a separate payload; omit the explanatory comments when sending JSON. The MQTT reference documents 254 as the maximum, zero to close, and a router friendly name or coordinator to select where joining is enabled. The device parameter names the existing joining parent, not an allowlist entry for the new device. Selecting a parent does not guarantee a device will remain routed through it long-term.
This guide describes current 2.x behavior, checked against Zigbee2MQTT 2.14.2 and its released dependencies. A 1.x installation can still have the legacy permanent-join configuration and should be assessed as that older system.
What changed in Zigbee2MQTT 2.0
The 2.0 breaking-changes list explicitly removed the permit_join setting and joining forever, with a maximum of 254 seconds. Configuration migration removes deprecated settings and records changes in the migration log. A copied permit_join: true line is therefore obsolete configuration, not a supported 2.x way to keep joining enabled.
The historical concern was real: on 1.x that setting could hold joining open across restarts. Issue #889 asked for a timeout, and later issue #25626 requested the permanent option’s return for problematic rejoining devices. The latter is closed, not an open promise to restore it.
The released controller rejects a positive duration above 254 and replaces its timer on a new request. Someone with access to the control API can therefore issue repeated requests. Audit automations and MQTT access as well as the button state; the per-operation ceiling is not a cumulative daily limit or protection against an authorized client reopening joining.
Review legacy files and migration logs if an old permit_join line remains. Then inspect which automation or service can publish to the bridge request topics. The current status and end time are available in zigbee2mqtt/bridge/info; a retained old dashboard value is not sufficient evidence of the radio’s current state.
What the 254-second window still exposes
A compatible nearby device actively trying to join may be admitted during ordinary open commissioning. It does not need your Wi-Fi password or a vendor account. That is a reason to pair deliberately, watch the device list and close the window when finished. It does not mean every nearby device automatically joins: the device must attempt a suitable join, and trust-center policy, install-code requirements and adapter behavior also matter.
Nor is the exchange literally free of cryptographic keys. Zigbee’s network key encrypts network traffic, while a trust-center link key protects network-key transport during joining. In a common compatibility flow, that link key can be the well-known ZigBeeAlliance09 value rather than a unique secret supplied by the owner. Silicon Labs’ security explanation distinguishes default, install-code-derived and negotiated link-key approaches. A random network key alone does not replace the commissioning link key with a unique one.
A normal device already joined to a neighbour’s network does not simply migrate because your permit-join timer is running. An uncommissioned, reset or otherwise joining device is the relevant case. Investigate unexpected entries and correlate join/interview events with the device you were adding; our ghost device troubleshooting guide helps separate an unexpected join from other device-list problems.
Closing joining does not revoke keys already held by a device, disconnect existing members or prevent every rejoin procedure. Zigbee2MQTT also notes that freshly joined devices can briefly permit joining themselves. The timer is useful exposure reduction, not a complete boundary around a compromised radio network.
Controlling membership instead of timing: the passlist
A passlist lists device IEEE addresses allowed by Zigbee2MQTT. The securing guide recommends it as the most restrictive software-list option. This is useful control over ordinary device acceptance, but an address list is not cryptographic proof of a device’s identity.
# Examples only. Include every existing device you intend to keep. passlist: - '0x00158d0001d8e1e2' - '0x00158d0002a4b3c1'
Zigbee2MQTT attempts to remove unlisted devices on startup and rejects their join attempts. Include all existing devices you intend to retain before enabling a nonempty passlist. Missing devices may stop working; check the logs rather than assuming removal is silent or guaranteed.
The enforcement limit matters for security: the securing guide says removal asks a device to leave, and a malicious device can ignore that request. IEEE addresses identify devices but are not security credentials and can sometimes be changed. A passlist therefore does not prove that an excluded or impersonating device cannot retain credentials or transmit. Use it alongside sound commissioning and key handling, not as a substitute.
Our MQTT broker security checklist covers the broker, frontend and host. Anyone who can control those interfaces may reopen joining or change policy, so their access controls are directly relevant to the join layer.
Two hardening steps worth doing at the same time
First, determine whether your network actually uses the old well-known default network key. The current configuration guide and generated new configuration use GENERATE for a new random key. The released settings code still has the historical fallback for configurations omitting it; age or version alone is not enough to identify what your running network uses. Inspect your own configuration securely and do not publish the key.
advanced: network_key: GENERATE
On startup Zigbee2MQTT generates and saves a random key in place of that marker. For an established network already using a random key, leave it intact unless you have a reason and a migration plan. Replacing an existing key requires re-pairing all devices according to the documentation; do not paste this example as a routine timer fix. Back up the current network and schedule any intended change around the devices and automations affected.
Second, use install-code commissioning where both device and adapter support it. The manufacturer-provided code, commonly printed or encoded as a QR code, derives a device-specific link key for initial network-key transport. Silicon Labs documents that distinction; it is separate from choosing a random network key and from listing an IEEE address.
The released zStack, Ember and deCONZ adapter implementations provide install-code addition. zStack explicitly excludes the old Z-Stack 1.2 adapter path; deCONZ support also depends on suitable firmware. Check your specific radio/firmware and the joining device’s code rather than inferring support from its brand. Codes can be added through the frontend or the documented install-code MQTT endpoint. Adding a code is not a demonstrated network-wide “install codes only” policy, so do not assume it disables ordinary compatibility joining for every other device.
Quick reference: what controls what
| Control | What it governs | Limit to remember |
|---|---|---|
| Join window | Duration/location of a new joining operation | 254 seconds maximum per operation on 2.x; clients can reopen it |
| Legacy permit_join: true | Permanent joining on 1.x | Setting removed in 2.0; use current controls |
| Passlist | Zigbee2MQTT’s acceptance/removal policy by IEEE address | Address-based and cooperative removal; not cryptographic identity |
| Install code | Device-specific link key for initial network-key transport | Requires compatible device, adapter and commissioning support |
| network_key: GENERATE | Generates a new random network encryption key | Changes an existing network; documented re-pairing cost |
A practical sequence is to secure MQTT/frontend access, open joining only while actively adding a device, verify its identity and close joining early. For a stable roster, consider a complete passlist with its enforcement limits understood. Review the network key separately; plan a replacement only if needed. For secondhand devices, follow the model’s reset procedure; our Touchlink reset guide applies to devices supporting that method, not every Zigbee device.
A host IoT VLAN can limit IP-side access and exposure. It does not authenticate a device joining over Zigbee radio, so treat that segmentation as another layer.
FAQ
Is it safe to leave permit_join on all the time? Keep joining closed outside deliberate pairing. Current 2.x removes the one-setting permanent mode and caps each request at 254 seconds, but repeated requests can keep reopening it. Review automations as well as the current timer.
How long does permit_join stay open? The frontend uses 254 seconds. MQTT specifies a duration, such as {"time":60}, up to 254; {"time":0} closes it. MQTT does not require every request to use the frontend’s full duration.
Does a passlist guarantee only my devices can communicate? No. It restricts software acceptance by address and asks unlisted devices to leave. It helps with ordinary membership management but does not authenticate hardware or revoke keys held by an uncooperative device.
Can a stranger’s device join without my Wi-Fi password? A compatible device attempting ordinary joining may be admitted during open commissioning. Wi-Fi credentials are unrelated. Install codes and trust-center policy change the key exchange; an open timer alone does not describe every security condition.
Should I generate a new network key? Use a random key for a new network and assess established networks for the historical default. Preserve an existing random key unless deliberately replacing it. A key change requires a planned re-pairing of devices; it does not replace install-code commissioning.
What this piece verified
The join durations, API examples, passlist behavior and key-change cost were checked against Zigbee2MQTT’s current documentation and released 2.14.2 code with zigbee-herdsman 10.10.0. The historical removal comes from the 2.0 breaking changes; the return request is recorded as closed. Silicon Labs’ primary security documentation establishes the distinction between network and commissioning link keys. No pairing or key change was run on physical hardware.
The exact security available on an installation depends on its radio firmware, devices and commissioning policy. The reliable habits remain deliberate short join windows, controlled API access, verified device identity and preserved network credentials.
