default mosquitto.conf

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

default mosquitto.conf

Post by jkimmel »

I upgraded Buster on my Raspi and obviously missed something when asked about the mosquitto.conf.
Result there is no more mosquitto.conf.
Please someone provides me with a essential mosquitto.conf
Last edited by jkimmel on Wednesday 26 May 2021 22:49, edited 1 time in total.
Rfxcom
Raspi 4
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: default mosquitto.con

Post by FireWizard »

Hi,

Wat version of Mosquitto did you install?

There are differences between the mosquitto.conf file between version 1.* and version 2.*
Did you secure your Mosquitto broker with a username/password.

Regards
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

Re: default mosquitto.conf

Post by jkimmel »

My version is 2.*

yes, I had pwd protection.
Rfxcom
Raspi 4
Ivo1986
Posts: 16
Joined: Tuesday 07 January 2020 10:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 2020.2
Location: Urmond - Netherlands
Contact:

Re: default mosquitto.conf

Post by Ivo1986 »

I downgraded mosquitto to 1.6.12 because the V2 problems.

https://rouwette.com/downgrade-mosquitto/

apt install mosquitto=1.6.12-0mosquitto1~buster1
apt-mark hold mosquitto
djreesing
Posts: 16
Joined: Friday 16 December 2016 15:25
Target OS: Raspberry Pi / ODroid
Domoticz version: stable
Contact:

Re: default mosquitto.conf

Post by djreesing »

v2.0.x doesn't have problems, only external access is disabled by default. You can easily change this in the mosquitto.conf, see also https://www.domoticz.com/wiki/MQTT#Installing_Mosquitto

Regarding the original question, maybe this will help https://github.com/eclipse/mosquitto/bl ... uitto.conf
User avatar
FireWizard
Posts: 1863
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: default mosquitto.conf

Post by FireWizard »

@jkimmel.

As I run the Mosquitto broker of my production system in a TrueNas jail (FreeBSD) the configuration of my system may not match with the conf file on a Raspberry Pi.

The version I run, is 2.0.8.

My mosquitto.conf looks as follows:

Code: Select all

# This mosquitto.conf file is provided with the FreeNAS Community Plugin for Mosquitto.
#
# See mosquitto.conf(5) for more information:
# https://mosquitto.org/man/mosquitto-conf-5.html

# Write process id to a file.
pid_file /var/run/mosquitto.pid

# When run as root, drop privileges to this user and its primary group.
# Set to root to stay as root, but this is not recommended.
user mosquitto

# Port to use for the default listener.
listener 1883

# At least one of cafile or capath must be defined.
cafile /usr/local/share/certs/ca-root-nss.crt
#cafile /usr/local/etc/mosquitto/ca.crt
#keyfile /usr/local/etc/mosquitto/server.key
#certfile /usr/local/etc/mosquitto/server.crt

# Save persistent message data to disk (true/false).
# This saves information about all messages, including subscriptions,
# currently in-flight messages and retained messages.
persistence true

# The filename to use for the persistent database, not including the path.
persistence_file mosquitto.db

# Location for persistent database. Must include trailing /
persistence_location /var/db/mosquitto/

# Control access to the broker using a password file.
# This file should be generated using the mosquitto_passwd utility.
# -- mosquitto_passwd -c /usr/local/etc/mosquitto/pwfile USER_NAME
# See also: https://mosquitto.org/man/mosquitto_passwd-1.html
password_file /usr/local/etc/mosquitto/pwfile

# allow_anonymous [ true | false ] determines whether clients that connect
# without providing a username are allowed to connect
allow_anonymous false
I hope this is in some respect somewhat helpful, but I recommend to read the links provided by @djreesing

Regards
jkimmel
Posts: 129
Joined: Monday 25 November 2013 17:51
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Mallorca
Contact:

Re: default mosquitto.conf

Post by jkimmel »

@FireWizard

Thank you for your efforts. I misplaced the mosquitto.conf. So problem solved.
Rfxcom
Raspi 4
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest