# Guide: Local AND secure connection of VenusOS and Home Assistant via MQTT

**URL:** <https://community.victronenergy.com/t/guide-local-and-secure-connection-of-venusos-and-home-assistant-via-mqtt/46703>\
**Category:** Modifications\
**Tags:** expert, gx\_device, cerbo\_gx\
**Created:** [8 October 2025 11:50 UTC](https://community.victronenergy.com/t/guide-local-and-secure-connection-of-venusos-and-home-assistant-via-mqtt/46703 "2025-10-08T11:50:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jank](https://dub1.discourse-cdn.com/victron/user_avatar/community.victronenergy.com/jank/32/36969_2.png) [@Jank](https://community.victronenergy.com/u/Jank)\
**Post date:** [8 October 2025 11:50 UTC](https://community.victronenergy.com/t/guide-local-and-secure-connection-of-venusos-and-home-assistant-via-mqtt/46703/1 "2025-10-08T11:50:12Z")

</div>

For all who struggle to setup a secure and local connection via MQTT, here is a step by step guide hopefully. Some basic Linux knowledge may be required.

My setup:

- Supervise Home Assistant with MQTT broker
- VenusOS on a Raspi with another! broker
- A bridge in Home Assistant to link them over a TLS trusted connection

What makes it a bit difficult:

- Cerbos use self signed certificate
- Home Assistant uses mosquito MQTT broker which disallows unvalidated certifiacates
- untrusted certificates fail
- giving the Cerbo certificate to HA fails as the names do not match
- using the name of the certificate requests fails due to disables mDNS in VenusOS

What to do (assuming Home Assistant MQTT up and running):

- Enable Super User in VenusOS
- Test MQTT with MQTT Explorer on Venus OS
  - user: root, pw: YouknowIT, port: 8883, secure connection, validate cert off
  - do not proceed if this fails

- grab the certificate from Venus using a linux terminal:
  - 

```auto
echo | openssl s_client -connect IP_OF_CERBO:8883 -showcerts 2>/dev/null | openssl x509 -outform PEM > cerbo.crt

```

- copy the cert to /share/mosquitto/cerbo.crt on Home Assistant
- configure the bridge in /share/mosquitto/victron.conf
  - 

```auto
connection victron
address venus.local:8883 # MUST NOT USE IP Address!
remote_username root
remote_password YOURPW

# Topics
topic N/# in 0 victron/
topic W/# out 0 victron/
topic R/# out 0 victron/

# Verbindungseinstellungen
keepalive_interval 60
cleansession true

notifications false

# TLS Einstellungen
 bridge_cafile /share/mosquitto/cerbo.crt
bridge_tls_version tlsv1.2
bridge_insecure true

```

  - Adjust to your liking

- Allow lookup of venus.local to your Cerbo
  - This is different for each router. It must be done there, VenusOS is not capable of (turned off) to set the name
  - in the end “ping venus.local” must reply

- enable “customize” option in Homa Assistant Mosquitto config.
- restart broker in Home Assistant
  - if you see the logs of mosquitto
  - 

```auto
 2025-10-08 13:19:56: Connecting bridge victron (venus.local:8883)

```

  - 

```auto
2025-10-08 13:19:56: mosquitto version 2.0.22 running

```

  - means success

If I skipped a step, give me a hint, I might update instructions.

Keep your critical infrastructure local and secure.

Vote for MQTT client in VenusOS which would make life so much easier: [MQTT Client needed for Cerbo](https://community.victronenergy.com/t/mqtt-client-needed-for-cerbo/46701)
