Skip to main content

Provisioning on Magistrala

The Bootstrap service in Magistrala (SuperMQ) provides remote provisioning for devices.

The main parts of the service are described below.


1. Core three-step process​

Bootstrap is the first service a device contacts when it comes online.

  1. Registration (admin): Use a user token to create a server record that links an external_id (such as a serial number) to a client_id (the entity UUID in the system).
  2. Request (device): On startup, the device sends GET /bootstrap/{external_id} with its secret external_key.
  3. Response (server): If the credentials match, the server returns the device's client_id, client_key, list of channels, and custom JSON configuration content.

Note: You must create bootstrap records for multiple external IDs, although they may share one external key. This differs from ThingsBoard, where one profile can provision multiple devices with individual client IDs and client secrets.


2. Required information in a Bootstrap record​

Provide the following fields when configuring Bootstrap:

FieldMeaning
External IDPhysical device identifier (MAC address, IMEI, or serial number); the primary key.
External KeyTemporary secret used to authenticate with Bootstrap.
Client IDID of the Client (Thing) represented by the device. It may be left blank for automatic creation.
Client KeyMQTT/HTTP credential returned by the server. It may be left blank for automatic creation.
ChannelsIDs of the channels the device may join.
ContentOptional custom data, such as {"sensor_type": "DHT22", "interval": 60}.