Requirements
- A CA certificate registered with your organization, or one you are about to register. See Register a certificate authority.
- A product in the same organization for new devices to join.
- The Manage role or higher from NervesHub 2.5.3. Earlier versions need Admin in the web UI.
- Device certificates signed by that CA, with the device identifier as the common name. Self-signed device certificates never go through JITP.
- Setting a profile from the CLI or the API by product name needs NervesHub 2.5.0 or later. From 2.5.0 the profile’s tags and description are optional.
LocalCertKey, NervesKey or TPM.
Enable it
- Web UI, new CA
- Web UI, existing CA
- CLI
1
Start registering the CA
Open the organization’s Certificates page and click Add certificate authority. Follow the steps in Register a certificate authority.
2
Turn on the profile
Check Enable Just In Time Provisioning. Three fields appear:
- JITP Description. The description given to each new device. Optional.
- JITP Tags. The tags given to each new device, separated by commas. Deployment groups use tags to target devices. Optional.
- JITP Product. The product new devices are created in. Required.
3
Create it
Upload the CA certificate and the verification certificate, and click Create Certificate.
Check that it works
The Certificates page shows Adds new devices to followed by the product name beside a CA that has a profile. The CA’s own page shows Just In Time Provisioning as Enabled for the product.nh ca list has a JITP PRODUCT column. nh ca show prints the JITP product, tags and description, or JITP: off.
Then boot a device whose certificate the CA signed. It appears under Devices in the JITP product, with the profile’s tags and description. Its Settings tab lists the certificate in the Certificates card.
What happens when a device connects
A profile is only consulted for a certificate and public key NervesHub has not seen before. NervesHub then:- Reads the certificate’s common name. This becomes the device identifier. A certificate without one is refused.
- Finds the CA that signed the certificate among the registered certificate authorities. An unregistered signer is refused.
- Validates the certificate against the CA. An expired CA is accepted unless Check expiration is on for it.
- Looks for a device with that identifier in the CA’s organization.
- If there is none, creates the device in the profile’s product with the profile’s tags and description.
- Records the certificate for the device and lets it connect.
Limits
- An existing device is not moved or changed. NervesHub looks for the identifier in the whole organization. If a device with that identifier exists in any of the organization’s products, the certificate is recorded for that device, and the profile’s product, tags and description are not applied.
- A deleted device is not recreated. If a device with that identifier has been deleted, the connection is refused until you restore the device or delete it permanently.
- A device that already has a certificate cannot add a new key this way. A certificate with a different public key is refused.
- A deleted product stops provisioning. From NervesHub 2.5.2, a profile whose product has been deleted creates no devices.
- The product must be in the CA’s organization. NervesHub rejects a profile that names another organization’s product.
- Tags and description are copied once. Changing the profile does not change devices it already created.
- Product shared secrets are separate. A device that connects with a product key is created without a profile, with no tags. See Shared secret.

