I am trying to set up an MQTT bridge between a Mosquitto broker installed on Home Assistant and a HiveMQ broker.
I created the configuration file \share\mosquitto\hivemq.conf, with the following content:
#Mosquitto to HiveMQ Cloud (MQTT over TLS)
connection hivemq
address ********************************.s1.eu.hivemq.cloud:8883
remote_username *****
remote_password *****
topic # both 0
I also relied on several examples and variants found on the web. However, the connection is rejected every time.
An AI also suggested several solutions, but none of them have worked so far.
Could someone help me identify the issue in my .conf file and explain what is wrong?
Regards
Otto
Welcome to the HiveMQ Community, and thank you for the detailed description of your setup. It is great to see you exploring MQTT, Home Assistant, and HiveMQ together.
From the configuration you shared, the main issue is that the bridge is currently not configured to use TLS, even though HiveMQ Cloud on port 8883 requires a TLS connection. To resolve this, please try the following steps.
1. Download the CA certificate
On the Home Assistant system where the Mosquitto broker runs:
Download the Let’s Encrypt ISRG Root X1 certificate from: https://letsencrypt.org/certs/isrgrootx1.pem
Save the file into the Mosquitto share, for example:
On the host: \share\mosquitto\isrgrootx1.pem
Inside the container: /share/mosquitto/isrgrootx1.pem
2. Adjust the Mosquitto bridge configuration
Update your \share\mosquitto\hivemq.conf to something along these lines (adapting the placeholders to your actual values):
bridge_cafile ensures that Mosquitto actually establishes a TLS connection and trusts the HiveMQ Cloud certificate chain.
The remote_username and remote_password must be your HiveMQ Cloud cluster MQTT credentials, not your HiveMQ Cloud account login.
3. Restart Mosquitto and verify in the logs
After saving the configuration:
Restart the Mosquitto broker add-on in Home Assistant.
Check the Mosquitto logs. A successful connection should look similar to:
Connecting bridge hivemq
Connected bridge hivemq
If the connection still fails and you suspect a certificate/CA issue, you can perform a temporary debug test by adding:
bridge_insecure true
to the same connection hivemq section. This disables server certificate verification for the bridge and helps to confirm whether the failure is strictly related to TLS validation. Important: This is only for short-term debugging. Once you have confirmed the root cause, please remove this line again or set:
bridge_insecure false
so that the certificate is properly verified in normal operation.
If the connection still does not succeed after these steps, the logs should show whether it is a TLS issue (certificate / handshake) or an authentication issue (username / password / hostname).
Kind regards,
Dasha HiveMQ Support Team
Hello Dasha,
Thanks for your help. I also learn a much with your example.
It seem to working now.
In log file I see no error :
2026-01-31 19:15:11: Connecting bridge hivemq (17f1c4fc4e5040e8b39cf25d9227eae0.s1.eu.hivemq.cloud:8883)
2026-01-31 19:15:11: mosquitto version 2.0.22 running
but I don’t see the message : Connected bridge hivemq
I also set the debug to : Bridge_insecure falseRegards
Best Regards
Otto
Thank you for the update and the logs. We can see that Mosquitto is attempting to connect the bridge (Connecting bridge hivemq), but since we do not see Connected bridge hivemq, The TLS/MQTT connection is still not completing successfully.
To help us pinpoint the issue, could you please:
Share the bridge section of your bridge configuration (you can mask credentials).
In particular, please verify that it contains entries similar to: