Port reference › Messaging

Port 1883 · MQTT

IoT messaging (unencrypted)

TCP Messaging Exposure risk: High

What is port 1883 used for?

Plaintext port for MQTT, the lightweight IoT messaging protocol used by Home Assistant and Mosquitto.

Registered port (1024-49151): the range used by ordinary applications.

Security notes

Many MQTT brokers sit on the internet with anonymous access. Enable auth and expose only 8883 (TLS).

Allow port 1883 through the firewall

This port is risky to expose, so the commands below allow only the IPs you specify.

# Replace 203.0.113.10/32 with the IP or network you want to allow
sudo ufw allow from 203.0.113.10/32 to any port 1883 proto tcp
sudo ufw status

Check whether port 1883 is open

sudo ss -tlpn | grep ':1883 '

Ports used together

Other messaging ports

9092 Kafka 5672 AMQP (RabbitMQ) 15672 RabbitMQ management UI