Mosquitto MQTT - both authenticated and anonymous?

Hi. I am currently using the integrated Mosquitto server end configured it to accept anonymous connections from 10’s of devices. Now I want to move to more securtity and enable authentication. This means that I need to change the config on multiple devices to start using user/pass.

Now is it possible to configure Mosquitto to allow both authenticated (new situation) and unauhenticated/anonymous (old)? This way I can move device by device without interruption normal operation at home. :wink:

I don’t know about the add-on, but with normal Mosquitto you can have both a user/password and anonymous at the same time. So try it.

Possibly using an ACL file. From the addon Documentation:

Thank you all. I tried several options but it seems that at least for me I did not get it to work for both authenticated and unauthenticated clients. I decided to simply take the bitter pill and enable authentication and go over all my MQTT devices and configure username and password.

Reasons was that I had one MQTT client for watermonitoring that only worked with authentication. Screenshot 2021-11-03 at 06.51.19