Skip to content
© 2026 The ThingsBoard Authors
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Device connectivity

Devices connect directly to ThingsBoard Edge, not to the cloud server. Edge exposes the same transport protocols as the ThingsBoard server — MQTT, HTTP, CoAP, LwM2M, and SNMP — on the local network. Devices communicate with Edge even when the internet connection is unavailable.

Protocol Default port TLS/DTLS port
MQTT 1883 8883
HTTP 8080 443
CoAP 5683 (UDP) 5684 (DTLS)
LwM2M 5685 (UDP), 5687 (UDP, Bootstrap) 5686 (DTLS), 5688 (DTLS, Bootstrap)
SNMP 161 (UDP) —

Use the hostname or IP address of your Edge instance in place of $EDGE_HOST in all examples below.

Each device authenticates with an access token or an X.509 certificate. Access tokens are the simplest option and work with all three protocols.

  1. Log in to your Edge instance and go to Entities → Devices.

  2. Open the device and click Copy access token on the Device details page.

Store the token as an environment variable for convenience:

Terminal window
export ACCESS_TOKEN=your_device_token
export EDGE_HOST=your_edge_host_or_ip

Use the protocol your device supports to send a test telemetry message.

Terminal window
mosquitto_pub -d \
-h $EDGE_HOST \
-t "v1/devices/me/telemetry" \
-u "$ACCESS_TOKEN" \
-m '{"temperature": 25}'

After sending, go to Entities → Devices, open the device, and select the Latest telemetry tab. The temperature key appears with the value you sent.

Devices that need to receive RPC commands or shared attribute updates must subscribe to the appropriate topics or long-poll the HTTP endpoint. For the full API reference, see:

For production deployments where access tokens are not acceptable, ThingsBoard supports X.509 certificate-based authentication. Provision the device certificate via Device credentials on the Device details page.

For the full certificate provisioning reference, see Mutual TLS for MQTT.