How do I setup mqtt?

Server config:
OS: UBUNUTU
Web server: nginx

How can I make config to use mqtt over internet.

4 Replies

First you'll want to install Mosquitto:

 $ sudo apt-add-repository ppa:mosquitto-dev/mosquitto-ppa
 $ sudo apt-get update
 $ sudo apt-get install mosquitto

If you need the clients install, you can use this command:

 $ sudo apt-get install mosquitto-clients

If the apt-add-repository command is not recognized, it can be installed using:

 $ sudo apt-get install python-software-properties

Once that is installed, you can then configure the service to your needs. Mosquitto offers some great documentation on their website which should help you out:

http://mosquitto.org/man/mosquitto-8.html
http://mosquitto.org/man/mosquitto-conf-5.html

So does this create a broker on the linode server. So that a webserver and iot device and publish and subscribe to the linode server? Can I use paho to communciate with this broker using python?

Can I use paho to communicate with this broker using python?

Your Linode is fully customizable and you can configure it any way you want to. In doing a quick Google search on this it looks like there are a number of guides and YouTube videos that cover various aspects of this, so I'd recommend diving into those and experimenting with it until you get it where you want it.

Here's one resource I came across that might be a helpful addition to what hmorris provided above:

Perfect, I am more or less brand new to linode and realized this. I got it set up and working. Thank you!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct