ct-Open-Source / ct-Smart-Home

A ready-to-use Node-RED setup for home automation
https://ct.de/smarthome
GNU General Public License v2.0
166 stars 40 forks source link

Use mosquitto.conf (and pass.txt, acl.txt) #14

Closed KarstenDE closed 4 years ago

KarstenDE commented 5 years ago

I try to use the mosquitto.conf and pass.txt & acl.txt inspired by the corresponding article in c‘t. But it does not work. I can not login with username/password.

mosquitto.conf already existed but was empty. So I just added the reference to /mosquitto/data/pass.txt.

In the docker Hub documentation it‘s described that the mosquitto.conf need to be mapped as a volume. But if I open a shell in the container, I can see the file at this path already.
https://hub.docker.com/_/eclipse-mosquitto

How did you do the configuration?

KarstenDE commented 5 years ago

I found out, that the whole container does not start with the mosquitto.conf. With an empty one everything is working fine.

I will check the file content ...

merlinschumacher commented 4 years ago

I modified the config file and added the following lines:

allow_anonymous false
password_file /mosquitto/config/passwd

the passwd file is in http-basic-auth style.

What does docker-compose logs mqtt show for a failing container instance?

KarstenDE commented 4 years ago

Okay. I configured the files to /mosquitto/data/...

In /mosquitto/config/... everything works