# Password-protected variant of the guide's lab broker config. # Same listener, but anonymous clients are refused and everyone # must log in with an account from the password file. # # Create the password file first (see Keeping It Private): # mosquitto_passwd -c /etc/mosquitto/passwd alice # mosquitto_passwd /etc/mosquitto/passwd bob # # On an installed system, drop this into # /etc/mosquitto/conf.d/local.conf and restart the service. # For a terminal run: mosquitto -c mosquitto-secure.conf -v # (adjust the password_file path to where your file lives). listener 1883 127.0.0.1 # No password, no connection. allow_anonymous false password_file /etc/mosquitto/passwd