Getting started with Yandex StoreDoc
To get started:
Getting started
-
Navigate to the management console
and log in to Yandex Cloud or sign up if you do not have an account yet. -
If you do not have a folder yet, create one:
-
In the management console
, in the top panel, click or 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:
- Length: between 3 and 63 characters.
- 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.

-
-
Assign the vpc.user role and the managed-mongodb.editor role (or higher) to your Yandex Cloud account. These roles provide the permissions needed to create a cluster.
Note
If you cannot manage roles, contact your cloud or organization administrator.
-
You can connect to database clusters both from within and outside Yandex Cloud:
-
To connect from within Yandex Cloud, create a Linux-based VM in the same cloud network as your database cluster.
-
To connect to your cluster from the internet, request public access to its hosts when creating it.
Note
The next step requires connecting to the cluster from a Linux-based VM.
-
-
Connect to your VM over SSH.
-
Install MongoDB Shell:
cd ~/ && \ wget https://repo.mongodb.org/apt/ubuntu/dists/focal/mongodb-org/4.4/multiverse/binary-amd64/mongodb-org-shell_4.4.1_amd64.deb && \ sudo dpkg -i mongodb-org-shell_4.4.1_amd64.deb
Create a cluster
- In the management console
, select the folder where you want to create your database cluster. - Navigate to the Yandex StoreDoc service.
- Click Create cluster.
- Specify the cluster settings and click Create cluster. For more information, see Creating a cluster.
- Wait until the cluster is ready: its status on the Yandex StoreDoc dashboard will change to Running, and its state to Alive. This may take a while.
Connect to the database
-
If using security groups for the cloud network, configure them to allow all required traffic between the cluster and your connection host.
-
Obtain an SSL certificate:
Linux (Bash)/macOS (Zsh)Windows (PowerShell)mkdir -p ~/.mongodb && \ wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" \ --output-document ~/.mongodb/root.crt && \ chmod 0644 ~/.mongodb/root.crtThe certificate will be saved to the
~/.mongodb/root.crtfile.mkdir $HOME\.mongodb; curl.exe -o $HOME\.mongodb\root.crt https://storage.yandexcloud.net/cloud-certs/CA.pemThe certificate will be saved to the
$HOME\.mongodb\root.crtfile.Corporate policies and antivirus software can block the download of certificates. For more information, see FAQ.
-
Connect to the cluster using the MongoDB CLI:
mongo --norc \ --ssl \ --sslCAFile ~/.mongodb/root.crt \ --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' \ --username <DB_username> \ --password <DB_user_password> \ <DB_name>To learn how to get a host’s FQDN, see this guide.
What's next
- Read about the service concepts.
- Learn more about creating a cluster and connecting to a database.
- Check out the questions and answers.