-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Feedback
Please improve the documentation with a chapter for MQTT client credentials. (No Anonymous!)
Proposal:
In Home Assistant's MQTT integration, you can either use the automatically generated username and password provided by the Mosquitto broker add-on or create a dedicated user for MQTT connections. The "homeassistant" user, which is the default, may not be suitable for all MQTT clients due to security concerns like potential remote access with a Nabu Casa subscription.
Here's a breakdown:
- Using the default "homeassistant" user (not recommended for all clients):
If you're using the Mosquitto broker add-on (the most common method), Home Assistant often handles the username and password automatically, using "homeassistant".
However, this user has login access to Home Assistant itself, which might not be desirable for all MQTT clients, especially if you're concerned about security or using Nabu Casa. - Creating a dedicated MQTT user (recommended for security):
In Home Assistant's frontend:
Go to Settings > People > Users and create a new user.
Important:
Ensure you enable the "Allow login" option for this user. Do not use "homeassistant" or "addons" as the username, as these are reserved.



Configure MQTT integration:
In your MQTT integration settings,

use the username and password you created for this dedicated user.


MQTT clients:
Use this username and password when configuring your MQTT clients (e.g., Tasmota devices, MQTT Explorer, etc.).
3. Finding the password (if you need to):
If you need to find the password for an existing MQTT user, you can locate it within the Home Assistant configuration files, specifically in a file like /mnt/data/supervisor/homeassistant/.storage/core.config_entries.
The relevant entry will contain the username and password (though they are stored in plain text, so be mindful of security).
Key points to remember:
The "system" accounts (like "homeassistant" and "addons") are reserved and not recommended for MQTT clients, especially for security-sensitive setups.
When using the Mosquitto broker add-on, you can configure it to use a dedicated user for MQTT.
Always use strong, unique passwords for your MQTT users.
URL
https://www.home-assistant.io/integrations/mqtt/
Version
2025.7.2
Additional information
Please improve the documentation with a chapter for MQTT client credentials. (No Anonymous!)