Skip to content

MQTT Credential - IoT Messaging Broker

An MQTT credential allows your workflows to connect to an MQTT broker to publish and subscribe to real-time messages. MQTT is the standard protocol for Internet of Things (IoT) communication.


FieldDescriptionExample
Broker URLMQTT broker connection URLmqtt://broker.example.com:1883
UsernameUsername (optional)my_user
PasswordPassword (optional)my_password

  1. Install Mosquitto on your server
  2. The default URL is mqtt://localhost:1883
  3. To enable authentication, edit mosquitto.conf:
    • Set allow_anonymous false
    • Configure a password file with mosquitto_passwd
  4. For secure connections, configure TLS and use port 8883
  1. Go to hivemq.com/cloud and create an account
  2. Create a free cluster
  3. In the cluster credentials, create a username and password
  4. The URL will be mqtts://your-cluster.hivemq.cloud:8883
  1. Go to emqx.com/cloud and create an account
  2. Create a deployment
  3. In Authentication, create a username and password
  4. Copy the deployment connection URL

ProtocolPortDescription
mqtt://1883MQTT without encryption
mqtts://8883MQTT with TLS/SSL
ws://8083MQTT over WebSocket
wss://8084MQTT over WebSocket with TLS

  • Verify the broker URL is correct including protocol and port
  • Confirm the broker is running and accessible from the network
  • Check that the firewall allows connections to the broker port
  • Verify the username and password credentials
  • If the broker allows anonymous connections, leave the fields empty
  • Verify the topic subscription is correct
  • Check the configured QoS levels
  • Confirm another client is publishing to the same topic

  • Always use TLS/SSL (mqtts://) for production connections
  • Configure authentication with username and password
  • Implement Access Control Lists (ACL) on the broker
  • Use hierarchical topic structures for granular permission control
  • Do not expose the MQTT broker to the Internet without authentication
  • Monitor active connections from the broker panel
  • Limit publish and subscribe permissions per user