Yandex Cloud
Search
Contact UsTry it for free
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
  • Marketplace
    • Featured
    • Infrastructure & Network
    • Data Platform
    • AI for business
    • Security
    • DevOps tools
    • Serverless
    • Monitoring & Resources
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
    • Price calculator
    • Pricing plans
  • Customer Stories
  • Documentation
  • Blog
© 2026 Direct Cursus Technology L.L.C.
Yandex StoreDoc
  • Getting started
    • All guides
      • Pre-configuration
      • Connecting from applications
  • Access management
  • Pricing policy
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • Command line tools
  • Linux (Bash)
  • Windows (PowerShell)
  • Connecting from graphical IDEs
  • DataGrip
  • DBeaver
  • Before you connect from a Docker container
  1. Step-by-step guides
  2. Connection
  3. Connecting from applications

Connecting to a Yandex StoreDoc cluster from applications

Written by
Yandex Cloud
Updated at February 6, 2026
  • Command line tools
    • Linux (Bash)
    • Windows (PowerShell)
  • Connecting from graphical IDEs
    • DataGrip
    • DBeaver
  • Before you connect from a Docker container

You can connect to a Yandex StoreDoc cluster using command line tools, graphical IDEs, or Docker containers. For details on connecting from your application code, see Code examples.

In the following examples, we assume that the root.crt SSL certificate is located in one of these directories:

  • ~/.mongodb/ for Ubuntu
  • $HOME\.mongodb for Windows

After you successfully connect to the cluster and run a test query, you will see the name of the database you connected to.

Command line toolsCommand line tools

To see code examples with the host FQDN filled in, open the cluster page in the management console and click Connect.

The setup method depends on whether sharding is enabled in the cluster:

Linux (Bash)Linux (Bash)

Before connecting, install MongoDB Shell.

Connecting over SSL for Yandex StoreDoc version 4.2 and above
Connecting over SSL for Yandex StoreDoc version 4.0
Connecting without SSL

For a non-sharded cluster:

mongosh --norc \
        --tls \
        --tlsCAFile ~/.mongodb/root.crt \
        --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

For a sharded cluster:

mongosh --norc \
        --tls \
        --tlsCAFile ~/.mongodb/root.crt \
        --host '<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...,<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

For a non-sharded cluster:

mongosh --norc \
        --ssl \
        --sslCAFile ~/.mongodb/root.crt \
        --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

For a sharded cluster:

mongosh --norc \
        --ssl \
        --sslCAFile ~/.mongodb/root.crt \
        --host '<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...,<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

For a non-sharded cluster:

mongosh --norc \
        --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

For a sharded cluster:

mongosh --norc \
        --host '<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...,<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017' \
        --username <DB_user_name> \
        --password <DB_user_password> \
        <DB_name>

To learn how to get host FQDN, see this guide.

Once connected, run the db command.

Windows (PowerShell)Windows (PowerShell)

Before connecting, install MongoDB Shell.

Connecting over SSL for Yandex StoreDoc version 4.2 and above
Connecting without SSL

For a non-sharded cluster:

mongosh.exe --norc `
            --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' `
            --tls `
            --tlsCAFile $HOME\.mongodb\root.crt `
            --username <DB_user_name> `
            --password <DB_user_password> `
            <DB_name>

For a sharded cluster:

mongosh.exe --norc `
            --host '<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...,<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017' `
            --tls `
            --tlsCAFile $HOME\.mongodb\root.crt `
            --username <DB_user_name> `
            --password <DB_user_password> `
            <DB_name>

For a non-sharded cluster:

mongosh.exe --norc `
            --host '<Yandex_StoreDoc_host_1_FQDN>:27018,...,<Yandex_StoreDoc_host_N_FQDN>:27018' `
            --username <DB_user_name> `
            --password <DB_user_password> `
            <DB_name>

For a sharded cluster:

mongosh.exe --norc `
            --host '<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...,<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017' `
            --username <DB_user_name> `
            --password <DB_user_password> `
            <DB_name>

To learn how to get host FQDN, see this guide.

Once connected, run the db command.

Connecting from graphical IDEsConnecting from graphical IDEs

Connections were tested in the following environment:

  • MacOS Big Sur 11.3
  • JetBrains DataGrip: 2021.1
  • DBeaver Enterprise: 21.0

From graphical IDEs, you can only connect to public cluster hosts using an SSL certificate.

To avoid connection errors, save the certificate to a local folder that does not require administrator rights to access.

DataGripDataGrip

  1. Create a data source:
    1. Select File → New → Data Source → MongoDB.
    2. On the General tab:
      1. Configure the connection as follows:

        • User, Password: Database user name and password.

        • URL: Connection string.

          For a non-sharded cluster:

          mongodb://<Yandex_StoreDoc_host_1_FQDN>:27018,..,<Yandex_StoreDoc_host_N_FQDN>:27018/<DB_name>
          

          For a sharded cluster:

          mongodb://<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017/<DB_name>
          

          To learn how to get host FQDN, see this guide.

      2. Click Download to get the database driver.

    3. On the SSH/SSL tab:
      1. Enable Use SSL.
      2. In the CA file field, specify the path to the SSL certificate for your connection.
  2. Click Test Connection. If the connection is successful, you will see the connection status, DBMS information, and driver details.
  3. Click OK to save the data source.

DBeaverDBeaver

Connections to Yandex StoreDoc clusters are only available in DBeaver commercial editions.

To connect to your cluster:

  1. Create a new database connection:
    1. In the Database menu, select New connection.
    2. Select MongoDB from the database list.
    3. Click Next.
    4. On the Main tab, specify the connection settings:
      1. Under Address, change Type to URL and specify the connection string.

        For a non-sharded cluster:

        mongodb://<Yandex_StoreDoc_host_1_FQDN>:27018,..,<Yandex_StoreDoc_host_N_FQDN>:27018/<DB_name>
        

        For a sharded cluster:

        mongodb://<MONGOINFRA_or_MONGOS_host_1_FQDN>:27017,...<MONGOINFRA_or_MONGOS_host_N_FQDN>:27017/<DB_name>
        

        To learn how to get host FQDN, see this guide.

      2. In the Device list, select the SCRAM-SHA-256 password encryption type for the connection.

      3. Under Authentication, specify the database user name and password.

    5. On the SSL tab:
      1. Enable Use SSL.
      2. In the Root certificate field, specify the path to your saved SSL certificate file.
      3. Under Settings, check Skip hostname validation.
  2. Click Test connection .... If the connection is successful, you will see the connection status, DBMS information, and driver details.
  3. Click Ready to save the database connection settings.

Before you connect from a Docker containerBefore you connect from a Docker container

To connect to a Yandex StoreDoc cluster from a Docker container over SSL, add the following lines to your Dockerfile:

RUN apt-get update && \
    apt-get install wget --yes && \
    mkdir --parents ~/.mongodb && \
    wget "https://storage.yandexcloud.net/cloud-certs/CA.pem" \
         --output-document ~/.mongodb/root.crt && \
    chmod 0644 ~/.mongodb/root.crt

To connect without SSL, no additional Dockerfile configuration is required.

After starting the Docker container, access it and install mongosh, which you will need to connect to the cluster.

Was the article helpful?

Previous
Pre-configuration
Next
Overview
© 2026 Direct Cursus Technology L.L.C.