Newbie Issues with installing and configuring mosquitto in Docker, on centOS 8

Heya HA Community! I’m brand spankin’ new at all of this, and really just tinkering around to learn some new skills.

I’ve set up Home Assistant in Docker, on an old laptop that I threw CentOS 8 onto. HA is running smooth as can be and I’m loving it. I don’t have any dongles or whatnot. So, I’m wanting to use my Hubitat radios to interface with all of my Z-wave and Zigbee devices, and use Hubitat’s MQTT app to interface with HA, so that HA can manage those devices. So, I need to build a MQTT broker.

I don’t have hassio or supervisor, just stock HA. I did set up Virtualbox at one point and install the hassio image, but the VM was just too unstable for my likes. HA kept crashing. So, I’ve gone straight docker. As such, I’m trying to set up docker containers for what I have previously used in the supervisor add-on store. Like, mosquitto!

I’ve followed the instructions from https://github.com/eclipse/mosquitto as best as I can. The container is up and running, where I can see it in Portainer. However, when I check the logs there, I keep getting this one:

1592589645: Error: Unable to open config file /mosquitto/config/mosquitto.conf

Here is the file structure that I have going, along with existing permissions:

[mark@markslab custom_components]$ ls -l
total 8
drwxr-xr-x. 8 mark mark 4096 Jun 18 10:36 hacs
drwxrwxr-x. 5 1883 1883   43 Jun 18 19:18 mosquitto
drwxr-xr-x. 4 root root   29 Jun 19 13:34 mqtt
drwxr-xr-x. 2 root root   63 Jun 18 15:48 nwsradar
drwxr-xr-x. 5 root root 4096 Jun 18 13:45 shelly
drwxr-xr-x. 2 root root   63 Jun 18 15:52 weatheralerts
drwxr-xr-x. 4 root root  152 Jun 18 18:42 wyzeapi
[mark@markslab custom_components]$ ls -l mosquitto/
total 0
drwxrwxr-x. 2 1883 1883 28 Jun 19 12:57 config
drwxrwxr-x. 2 1883 1883  6 Jun 18 19:18 data
drwxrwxr-x. 2 1883 1883  6 Jun 18 19:18 log
[mark@markslab custom_components]$ ls -l mosquitto/config/
total 44
-rw-r--r--. 1 root root 44555 Jun 19 12:57 mosquitto.conf
[mark@markslab custom_components]$

In my ignorance, I realized that I do have some understanding on all of this to get better at. For example, is Mosquitto able to be my broker, or do I need to set up something else to actually be my mqtt broker?

I have not gone any farther in the installation and configuration than to set up the docker, and place the mosquitto.conf file into the config folder. I tend to execute a step and check logs to see what it does. That’s part of my learning process. So, I don’t know if there are additional steps that I need to take to allow that config file to open. Do I need to make it executable? I don’t see that in the follow on instructions. I do see the need for a user, but is that needed at this step, or later, as the instructions imply? I don’t see how a user, here at least, makes or breaks the opening of that mosquitto.conf. If that’s needed, maybe somebody can explain that to me. Again, I’m learning how it works.

Anyways, I really do appreciate any time or consideration you guys lend to my issue. Thanks in advance!

-Mark