PythonAnywhere Forums

Need Mosquitto or any equivalent MQTT broker

Hi Team,

Is there any provision available to get Mosquitto or any other mqtt broker server installed in pythonanywhere for our use? I just now installed the paho-mqtt client for my user but then it clicked to me that i need a private broker server in cloud(so that i don't expose my data to the bad guys).

Besides it'll be a cool thing to implement as a pythonanywhere IOT ready feature .

-Thanks.

We don't currently support apps that use custom protocols -- it's all HTTP(S) only at the moment, and python-wsgi versions of that too, so an MQTT server currently wouldn't work.

We're working on letting people run more arbitrary services, but it's a ways off.

That sums it up ... Thanks Harry

hahahaha we will definitely look into it.

I personally don't really know much about mosquitto- would this be something where each user spins up a mosquitto broker server or would it be possible to say have one single server which everyone uses? (somehow doing some sort of auth?)

and is the main blocking point right now that pythonanywhere only opens the ports for http/https type protocols for webapps and thus the mosquitto broker won't work?

Hi Conrad,

Well a single installation of mosquitto does allow multiple instances based on username/pwd. we can set it up that way / bind it with their login user password, or like any typical s/w distributions we can wait for the users to specifically ask for it and allow them to install it.

This thing runs on the port 1883 by default but the server puts no restriction on configuring it, so we can either leave that upto the user or restrict it to a specific port as a point of entry to the pythonanywhere server.

Btw I think asking you folks to do it for free would be totally unfair so I looked into the different pricing models(azure & Aws) and realized if you look into it, you can earn a good chunk of money just by letting these devices talk using your server...

(Well this info above serves no real purpose, i'm just trying to bait you folks ... here kitty kitty..or something like that).

But frankly thanks for re-posting, showing interest, giving hope ... etc etc. :)

Take care.

+1 for Mosquitto support please.

Jim

upvoted!

Thanks!

I see that AWS allows access to MQTT via WebSockets (e.g. http://docs.aws.amazon.com/iot/latest/developerguide/protocols.html ) - is there any likelihood of PA supporting WebSockets in the next 12 months please?

Thanks,

Jim

I don't know much about MQTT, but if what they're saying is that you can run a server on their infrastructure and use WebSockets to connect to it, then that would work right now. On PythonAnywhere we don't support WebSocket servers, but code that uses a WebSocket client should work just fine.

Ah, thanks for the clarification Giles. It is indeed accessing an MQTT server on the AWS infrastructure, via WebSockets rather than the MQTT protocol - easier for small 'devices', e.g. 8 bit embedded, and for environments not allowing MQTT itself.

I'll try it and report back.