Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k 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

Generating Self-Signed Certificates

These instructions show how to generate self-signed ECC certificates using OpenSSL. Suitable for local development and testing — not recommended for production.

You can either create a self-signed server certificate or a CA-signed server certificate. Both produce a valid server certificate. The CA-signed approach provides better trust control for internal deployments where you need to manage multiple certificates.


The server generates and signs its own certificate. Suitable for basic testing or small setups that do not require a Certificate Authority (CA).

  1. Generate the server private key:

    Terminal window
    openssl ecparam -out server_key.pem -name secp256r1 -genkey
  2. Generate the self-signed certificate (valid 365 days):

    Terminal window
    openssl req -new -key server_key.pem -x509 -nodes -days 365 -out server.pem

    Add -subj '/CN=localhost' to suppress interactive prompts (replace localhost with your domain):

    Terminal window
    openssl req -new -key server_key.pem -x509 -nodes -days 365 -out server.pem -subj '/CN=localhost'

This approach creates a local Certificate Authority to sign the server certificate. Recommended when you manage multiple certificates or need a dedicated CA for an internal deployment.

  1. Generate the CA private key:

    Terminal window
    openssl ecparam -out ca_key.pem -name secp256r1 -genkey
  2. Create the self-signed CA certificate (valid 365 days):

    Terminal window
    openssl req -new -x509 -key ca_key.pem -days 365 -out ca.pem
  3. Generate the server private key:

    Terminal window
    openssl ecparam -out server_key.pem -name secp256r1 -genkey
  4. Create a Certificate Signing Request (CSR) for the server:

    Terminal window
    openssl req -new -key server_key.pem -out server.csr
  5. Sign the server certificate with your CA:

    Terminal window
    openssl x509 -req -in server.csr -CA ca.pem -CAkey ca_key.pem -CAcreateserial -out server.pem -days 365

    The -CAcreateserial flag creates a ca.srl file to track certificate serial numbers. Replace it with -set_serial <number> to specify the serial manually.

After completing these steps, use server.pem and server_key.pem in your ThingsBoard transport configuration. Import ca.pem into the trust store of any client that needs to verify the server certificate.


Certificate files must be accessible to the ThingsBoard process. Place them in the appropriate directory for your deployment platform:

Place the certificate files in /etc/thingsboard/conf/ with the same file permissions as thingsboard.conf. Use relative paths in the configuration variables:

Terminal window
export SSL_PEM_CERT=server.pem
export SSL_PEM_KEY=server_key.pem