Public MQTT sandbox
A free public MQTT broker for client testing
Validate a client, teach publish and subscribe, or reproduce a protocol issue without provisioning infrastructure. The shared endpoint has no SLA and must never carry secrets or production telemetry.
Connect to the shared endpoint
Use a unique client ID and keep the shared username and password in environment variables so rotation does not require code changes.
public.runmqtt.com18838883ajbkvbp/demoOCDWjjOSlSexcWRGrunmqtt-test-<unique-id>Shared access details rotate. Copy the current username and password into MQTT_USERNAME and MQTT_PASSWORD before running the examples.
# Load the current credentials shown on this page
export MQTT_USERNAME="ajbkvbp/demo"
export MQTT_PASSWORD="OCDWjjOSlSexcWRG"
# Subscribe
mosquitto_sub \
-h public.runmqtt.com -p 8883 \
-u "$MQTT_USERNAME" -P "$MQTT_PASSWORD" \
-i "runmqtt-sub-$(date +%s)" \
-t "sandbox/$USER/telemetry" -q 1
# Publish from another terminal
mosquitto_pub \
-h public.runmqtt.com -p 8883 \
-u "$MQTT_USERNAME" -P "$MQTT_PASSWORD" \
-i "runmqtt-pub-$(date +%s)" \
-t "sandbox/$USER/telemetry" -q 1 \
-m '{"temperature":22.4,"unit":"C"}'Design the test around shared-broker limits
A public broker is useful precisely because it is disposable. Treat every session, retained message, and credential as temporary.
Ephemeral state
Rotating access
No sensitive data
Use the sandbox to learn; use a managed cloud broker to operate
| Broker capability | Public sandbox | Managed broker |
|---|---|---|
| Identity | Shared, rotating credentials | Scoped device credentials |
| Topic access | Shared namespace for disposable tests | Reusable publish and subscribe policies |
| Operations | Best effort with no lifecycle guarantees | Owned runtime, health, and billing state |
| Data | Synthetic payloads only | Private application workloads |
Public MQTT broker FAQ
Can I send production traffic through the public broker?
No. The endpoint is shared, best effort, and may reset sessions or rotate access details. Use it for client validation, workshops, and short-lived demos only.
Should I use port 1883 or 8883?
Prefer 8883 with certificate validation. Port 1883 is useful only for isolated troubleshooting because payloads and credentials are not encrypted in transit.
Why can shared credentials change?
Rotation limits abuse and clears stale workshop access. Keep credentials in environment variables and check this page before a scheduled test.
Why does my client disconnect as soon as another client connects?
MQTT brokers allow one active session per client ID. Generate a unique client ID for every browser tab, process, device, and workshop participant.
Take the next step
Learn the protocol, harden the connection, then choose the operating model that fits your workload.