Chapter 3

Setting up Mosquitto

The official Mosquitto broker add-on is the MQTT broker in your home. We set it up so that it can fetch the CampMatic readings in the next chapter. The order of these steps matters more than it looks.

8 minutes Last verified: 22.09.2026 DE EN
Already running Mosquitto?
Then just check that customize is switched on under Configuration and that the folder /share/mosquitto exists. We need both in a moment. Otherwise skip straight to the next chapter.

Install Mosquitto

Open Settings → Apps and click Install app at the bottom right. Search for Mosquitto broker and install it. Do not start it yet.

It is called "Apps" now, not "add-ons"
Home Assistant renamed the section. Older guides talk about add-ons and an Add-on Store — same thing. The program's own info page even spells it out: "this app, formerly known as add-on". This guide uses both words, because you will meet both out there.
Figure 3.1Settings → Apps. After installing, Mosquitto broker is listed here and shows "Running". The button at the bottom right reads "Install app". Screenshot from the German edition.
Figure 3.2The Mosquitto broker info page. Control panel on the right with start and restart, below it the hostname core-mosquitto. The text spells out the rename: "this app, formerly known as add-on". Screenshot from the German edition.

Create the folder — before you go on

Mosquitto is about to read an extra configuration file. The folder for it must exist beforehand, otherwise the add-on will refuse to start. Create /share/mosquitto — using the File editor or Terminal & SSH add-on, for example.

In the Terminal add-on bash
mkdir -p /share/mosquitto
This is where most people come unstuck
Switch on customize while the folder is still missing, and the add-on starts and immediately quits again. The interface just says stopped, with no explanation. The reason appears only in the add-on log:

Error: Unable to open include_dir '/share/mosquitto'
mosquitto version 2.1.2 terminating
/share is not /config
These are two different places. Your configuration.yaml lives in /config — which the Terminal add-on also shows as /homeassistant, the very same folder. /share sits beside it and starts out empty. The bridge file belongs in /share, not with your configuration.

Allow your own configuration

Only now: Settings → Apps → Mosquitto broker → Configuration. Scroll down to the collapsed Customize section and open it. Switch active on and set folder to mosquitto — it is usually filled in already. Then hit Save.

Figure 3.3The expanded Customize section. Just two settings: the active switch and the folder field. Screenshot from the German edition.
This is a form, not YAML
Some guides show a YAML block here. Home Assistant now presents these settings as a form — a switch and a text field. It amounts to the same thing.

Together these two settings make Mosquitto read every .conf file in /share/mosquitto/ when it starts.

Now start the program — the button sits on the info page under Control. The Log tab should then show that Mosquitto is running:

Add-on › Log text
mosquitto version 2.1.2 running
Successfully send discovery information to Home Assistant.
This line is harmless
The log will permanently contain something like:

New connection from ::1 on port 1883
Protocol error from ::1: First packet not CONNECT (0A)

That is the watchdog checking whether the broker responds. Not an error, nothing to do.

Add the MQTT integration

The add-on announces itself to Home Assistant. Under Settings → Devices & Services a suggestion for MQTT appears. A single click on Submit is enough — Home Assistant fills in broker, port and credentials itself.

Nothing to type in
If other guides tell you to enter core-mosquitto and port 1883 by hand: that is only needed when the suggestion does not appear.
Before you move on
  • The Mosquitto broker add-on is running — state started
  • The folder /share/mosquitto exists
  • The add-on configuration says customize: active: true
  • The MQTT integration is set up under Devices & Services