[Yandex Cloud documentation](../../../index.md) > [Yandex IoT Core](../../index.md) > [Step-by-step guides](../index.md) > Managing certificates > Creating a certificate

# Creating a certificate

{% note warning %}

Yandex IoT Core is no longer available to new users. 

Current users can create resources until November 1, 2026. Afterwards, the service will go read-only and cease to operate on December 1, 2026. For more information on the timing and procedure, see [Service shutdown](../../sunset.md).

{% endnote %}

For devices to interact, you need X.509 certificates. If you do not have a certificate, you can create one, e.g., with [OpenSSL](https://www.openssl.org).

To create a certificate, install OpenSSL and run the following command from the command line:

```bash
openssl req -x509 \
  -newkey rsa:4096 \
  -keyout key.pem \
  -out cert.pem \
  -nodes \
  -days 365 \
  -subj '/CN=localhost'
```

Where:

* `-x509`: X.509 certificate.
* `newkey`: Encryption algorithm.
* `-keyout`: File to write the private key to.
* `-out`: File to save the certificate to.
* `-nodes`: This flag is set when no public key encryption is required.
* `-days`: Certificate validity period in days.
* `-subj`: Request object.