# Can't connect from Mosquitto to HiveMQ Cloud

**URL:** <https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202>\
**Category:** HiveMQ Cloud\
**Created:** [September 9, 2024, 12:58pm UTC](https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202 "2024-09-09T12:58:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![edonicardi](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@edonicardi](https://community.hivemq.com/u/edonicardi)\
**Post date:** [September 9, 2024, 12:58pm UTC](https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202/1 "2024-09-09T12:58:55Z")

</div>

I want to use Mosquitto as bridge so when I publish my data from my app, to send them locally to my homeautomation in my raspberry but also I want to push my data to my HiveMQ cloud.

I setup Mosquitto on my raspberry as Docker Image

This is my mosquitto.conf file:

```auto
# mosquitto.conf
listener 1883
allow_anonymous true

# Bridge configuration to cloud MQTT broker
connection hivemq
address somenumbers.s1.eu.hivemq.cloud:8884
topic my_topic1 both 0 
topic my_topic2 both 0  
remote_username username
remote_password password
bridge_protocol_version mqttv311
bridge_insecure true

```

This is the error I’m getting:

```auto
1725886666: Connecting bridge hivemq (somenumbers.s1.eu.hivemq.cloud:8884)
1725886666: Client local.name.hivemq closed its connection.
1725886629: Connecting bridge hivemq (somenumbers.s1.eu.hivemq.cloud:8884)
1725886629: Client local.name.hivemq closed its connection.
1725886611: Connecting bridge hivemq (somenumbers.s1.eu.hivemq.cloud:8884)
1725886611: Client local.name.hivemq closed its connection.
1725886491: Connecting bridge hivemq (somenumbers.s1.eu.hivemq.cloud:8884)
1725886491: Client local.name.hivemq closed its connection.

```

more detailed logs:

```auto
1725890893: Bridge local.name.hivemq doing local SUBSCRIBE on topic #
1725890893: Connecting bridge hivemq (somenumbers.s1.eu.hivemq.cloud:8884)
1725890893: Bridge name.hivemq sending CONNECT
1725890903: Client local.name.hivemq closed its connection.

```

---

<div class="post-metadata">

**Author:** ![Diego](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@Diego](https://community.hivemq.com/u/Diego)\
**Post date:** [September 10, 2024, 1:08pm UTC](https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202/2 "2024-09-10T13:08:05Z")

</div>

Hello @edonicardi

Welcome to the HiveMQ Community! Please give it a try by changing the port number here

```auto
address somenumbers.s1.eu.hivemq.cloud:8883

```

Kind regards,  
Diego from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![edonicardi](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@edonicardi](https://community.hivemq.com/u/edonicardi)\
**Post date:** [September 10, 2024, 2:33pm UTC](https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202/3 "2024-09-10T14:33:08Z")

</div>

Hi Diego, thanks for reaching out.

I have the same problem with port 8333

---

<div class="post-metadata">

**Author:** ![Diego](https://avatars.discourse-cdn.com/v4/letter/d/f04885/32.png) [@Diego](https://community.hivemq.com/u/Diego)\
**Post date:** [September 10, 2024, 2:47pm UTC](https://community.hivemq.com/t/cant-connect-from-mosquitto-to-hivemq-cloud/3202/4 "2024-09-10T14:47:07Z")

</div>

Hello @edonicardi

We have some users who succeeded by using the Mosquito Bridge configuration of the post below.

> [@Bridge Mosquitto to HiveMQ Cloud](https://community.hivemq.com/t/bridge-mosquitto-to-hivemq-cloud/534/10):
>
> Hi rstankie, I’ve figured it out due to this post [MQTT Broker Bridge to HiveMQ Cloud - #5 by naitsimp - Configuration - Home Assistant Community](https://community.home-assistant.io/t/mqtt-broker-bridge-to-hivemq-cloud/343023/5) I may be misunderstanding but it seems Hivemq has an expired certificate that fails validation. I noticed this connecting with MQTT-Explorer, I had to disable certificate validation for it to work. The solution: download the root certificate used to sign HiveMQs certificate here [https://letsencrypt.org/certs/isrgrootx1.pem](https://letsencrypt.org/certs/isrgrootx1.pem) In the bridge config set …

Kind regards,  
Diego from HiveMQ Team
