Setting up a Live/Prod and a Development System

If you add tripple backticks on separate lines before logs, code etc when posting it then it stops the forum from interpretting it as markdown which is why you have the strange effects in the node red startup log you posted.

The reason for that is that without the listener configuration you can't connect using an ip address, even if it is the ip of the same machine. It looks to mosquitto as if it is a remote connection so it blocks it.

On Linux, rather than adding the line to main config it is arguably better to put it in a separate conf file in /etc/mosquitto/conf.d. Conf files in there add to or override the main settings, but doing that has the advantage that an upgrade or re-install of mosquitto is not going to undo your changes. I add a file /etc/mosquitto/conf.d/mossy.conf containing

listener 1883
allow_anonymous true
log_timestamp true
log_timestamp_format %Y-%m-%d %H:%M:%S

Which allows remote access and also configures the mosquitto log to have human readable timestamps.
On systems where I have users/pwds then that setup goes in that file too.

1 Like