Upgrade Mosquitto.. how?

Hello!
I’ve seen the version of mosquitto that comes with DietPi is rather old… is there a way to upgrade it without breaking things?
Thanks :slight_smile:

Hi,

many thanks for your request. Mosquitto is installed from Debian package liste via apt. The currently available version is 1.5.7. And that’s the version that is being installed by DietPi.

root@DietPi3:~# apt list mosquitto
Listing... Done
mosquitto/stable,now 1.5.7-1+deb10u1 armhf [installed]
root@DietPi3:~#

https://packages.debian.org/search?keywords=mosquitto&searchon=names&suite=stable&section=all

well… not in my case at least: (output of dietpi-update follows)

[  OK  ] DietPi-Update | No update required, your DietPi installation is already up to date:
[ INFO ] DietPi-Update | Current version : v6.30.0
[ INFO ] DietPi-Update | Latest version  : v6.30.0
root@DietPi:~# apt list mosquitto
Listing... Done
mosquitto/oldstable,oldstable,now 1.4.10-3+deb9u4 amd64 [installed]
root@DietPi:~#

and doind an

apt update

followed by an

apt list --upgradable

does list serveral packages, but among them there is not Mosquitto…

You are running debian stretch?

well, yes

root@DietPi:~# cat /etc/issue
Debian GNU/Linux 9 \n \l

all that I did was installing Dietpi long ago and keeping upgrading it using dietpi-update, so I remained as Stretch since there seems to be no easy way of upgrading without breaking things.

so 1.4.10 seems to be the latest installable version under Stretch? (Apt upgrade mosquitto tells me I’m on latest)

Yes, if you continue running stretch that’s the latest version available.

I’ll leave this here for anyone having my same problem:
It is not mandatory to upgrade to Buster in order to use the latest Mosquitto (1.6.9 at the time of writing)

warning using the following procedure you will add an unofficial repo. I did it and everything seems to be fine but… you’re warned :slight_smile:

just follow instructions here: https://mosquitto.org/blog/2013/01/mosquitto-debian-repository/
and in the last step do an

apt upgrade mosquitto

followed by a

service mosquitto restart

I needed 1.6.x because it has WebSockets compiled in (as opposed to previous releases which needed a recompile).
But if you need Websockets too, there’s one last step:
add the following lines

listener 9001
protocol websockets

to

/etc/mosquitto/mosquitto.conf

then reastart the mosquitto service one more time… and you’re done! :wink:

Maybe you should have posted the disclaimer as well

It’s worth repeating that this is experimental - there are package changes that haven’t been vetted by a Debian developer so it’s possible something will break. I’ve tested myself and had no problems so far.

If I resorted to blindly posting just the commands needed to add the repo, then yes, I would agree with you.
But instead, I linked the page, where the warning is on the 4th row, before the actual commands.
That said, I updated my post 'cause… better to be safe than sorry :slight_smile:

Thanks :slight_smile:

ok I marked your comment as solved :sunglasses:

btw: I found this old GitHub request to switch to mosquitto repo. So might be something coming in future.

https://github.com/MichaIng/DietPi/issues/3042