Report this

What is the reason for this report?

I did a droplet with Nginx, Node-red, and Mosquitto because I want to send MQTT message from a RaspberryPi to the droplet. I adjusted the Nginx based on this page: https://iotassistant.io/home-assistant/install-mqtt-websockets-on-nginx/ I configured Mosquitto as the DO tutorial was supposed. Nevertheless, I cannot reach the Mosquitto from my RaspberryPi. What can I do in order to send messages from RaspberryPi to the droplet?

Thanks for your help!



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Heya,

Just came across this answer and decided to write some general guidelines for anyone who comes across this in the future despite the old question.

Here are a few steps you can take:

1. Check your Mosquitto configuration: Make sure that you have MQTT over WebSockets enabled and that Mosquitto is configured to use the right port.

2. Check your Nginx configuration: Your Nginx server should be properly configured to proxy requests to Mosquitto. Confirm that the proxy_pass directive is pointing to your Mosquitto server.

3. Check your firewall settings: Ensure the necessary ports are opened in your firewall settings. By default, MQTT uses port 1883 for unsecured communication and port 8883 for secured communication.

Remember, it’s hard to solve this kind of problem without knowing the exact configuration settings you’re using. If you continue to experience problems, please share copies of your configuration files as well as any error messages you’re seeing.

For more resources on MQTT and WebSockets with DigitalOcean, you may take a look at these links:

How to Manage Droplets How to Install and Secure the Mosquitto MQTT Messaging Broker

Hope that this helps!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.