Getting started with Certificate Manager
By following this guide, you will add your first Let's Encrypt certificate to Certificate Manager and use it to set up HTTPS access to a static website hosted in Yandex Object Storage.
Getting started
To get started with Certificate Manager, you need:
-
Folder in Yandex Cloud. If there is no folder yet, create one:
-
In the management console
, in the top panel, click and select the cloud. -
To the right of the cloud name, click
. -
Select Create folder
.
-
Give your folder a name. The naming requirements are as follows:
- It must be from 2 to 63 characters long.
- It can only contain lowercase Latin letters, numbers, and hyphens.
- It must start with a letter and cannot end with a hyphen.
-
Optionally, specify the description for your folder.
-
Select Create a default network. This will create a network with subnets in each availability zone. Within this network, you will also have a default security group, within which all network traffic will be allowed.
-
Click Create.

-
-
Third-level (or higher) domain that the Let's Encrypt certificate is issued for.
Note
To pass the domain rights check, you must have the management access to the domain.
-
Public bucket in Object Storage with exactly the same name as the domain. If you do not have a bucket yet, create one:
- In the management console
, select the folder where you want to create a bucket. - Go to Object Storage.
- Click Create bucket.
- Enter exactly the same name for the bucket as the domain name.
- Select the
For allaccess type. - Select the default storage class.
- Click Create bucket to complete the operation.
- In the management console
-
Set up hosting in your bucket:
- In the management console
, select the folder with the bucket. - Go to Object Storage.
- On the Buckets tab, click the bucket with the same name as the domain.
- In the left-hand panel, select Settings.
- Open the Website tab.
- Select
Hostingand specify the website's homepage. - Click Save to complete the operation.
- In the management console
-
Set up an alias for the bucket through your DNS provider or on your own DNS server.
For instance, for the
www.example.comdomain, add the following record:www.example.com CNAME www.example.com.website.yandexcloud.net
Creating a request for a Let's Encrypt certificate
- Navigate to the management console
. - Go to Certificate Manager.
- Click Add certificate.
- In the menu that opens, select Let's Encrypt certificate.
- In the window that opens, enter a name for the certificate.
- (Optional) Add a description for the certificate.
- In the Domains field, specify the domains you want to issue the certificate for.
- Select the domain rights check type for
HTTP. - Click Create.
Passing the domain rights check
Creating a file for the check
- Navigate to the management console
. - Go to Certificate Manager.
- Select a certificate with the
Validatingstatus in the list and click it. - Under Check rights for domains:
- Copy the URL from the Link for hosting file field:
- The
http://example.com/.well-known/acme-challenge/part of the link is the file path. - The second part,
rG1Mm1bJ..., is the file name you should use.
- The
- Copy the Contents field to the file.
- Copy the URL from the Link for hosting file field:
Uploading the file and performing the check
-
Navigate to the management console
. -
Go to Object Storage.
-
On the Buckets tab, click the bucket with the same name as the domain.
-
At the top right, click Create folder and create a directory named
.well-known. -
Under
.well-known, create theacme-challengedirectory. -
In
acme-challenge, click Upload. -
In the window that opens, select the file with a record and click Open.
-
Click Upload.
-
Wait until the certificate's status changes to
Issued.For more information on the status, see the certificate page. To do this, click Viewing logs next to Validation.
-
Go to the
acme-challengedirectory. -
Click
to the right of the file and select Delete. -
Confirm the deletion.
-
Install and configure the AWS CLI by following this tutorial.
-
Upload your file to the bucket so that it resides in the
.well-known/acme-challengesubdirectory:aws --endpoint-url=https://storage.yandexcloud.net \ s3 cp <file_name> s3://<bucket_name>/.well-known/acme-challenge/<file_name> -
Wait until the certificate's status changes to
Issued. -
Delete the file you created from the bucket:
aws --endpoint-url=https://storage.yandexcloud.net \ s3 rm s3://<bucket_name>/.well-known/acme-challenge/<file_name>
Warning
To renew a certificate, you have to perform certain actions. Keep track of the lifecycle of your certificates to renew them on time. For more information, see Renew a certificate.
Setting up static website access over HTTPS
- Navigate to the management console
. - Go to Object Storage.
- On the Buckets tab, click the bucket with the same name as the domain.
- In the left-hand panel, select Security.
- Navigate to the HTTPS tab.
- Click Configure at the top right.
- In the Source field, select
Certificate Manager. - In the Certificate field, select the certificate from the list that opens.
- Click Save.