Node-RED: Authenticating MQTT users in Node-RED

This documentation is part of the MQTT Server guide. You can view the complete guide here: How to connect Node-RED to the Mosquitto MQTT server.

Welcome to the Stackhero documentation

Stackhero offers a fully managed Node-RED cloud environment designed to help you build workflows quickly:

  • Integrated MQTT server (Mosquitto) for seamless IoT integration.
  • Full access to the Node-RED admin interface for managing your flows and settings.
  • Node-RED Dashboard included for real-time visualization.
  • Dedicated SMTP email server included, with no sending limits.
  • Effortless one-click updates to easily keep your instance up to date.
  • Custom domain names with automatic HTTPS: for example, https://node-red.your-company.com.
  • High performance and enhanced security thanks to private, dedicated infrastructure.

You can have a secure, production-ready Node-RED cloud hosting instance up and running in about 5 minutes. Stackhero takes care of installation, updates, and infrastructure so you can focus on building your automations.

Managing MQTT user authentication is simple with a dedicated flow in Node-RED. You can find the "MQTT Authentication" flow directly from the Node-RED admin panel.

MQTT authentication flowMQTT authentication flow

Within this authentication flow, look for the Users template node. This node contains an array where you can define credentials for each user. You can add as many users as your project requires.

Note: The node-red user is required for Node-RED to connect to the MQTT server. Be sure not to remove this user from your configuration.

MQTT users nodeMQTT users node