---
title: Managed MongoDB® - Quickstart
description: This page shows you how to get started with Managed MongoDB®.
tags: document managed-database database mongodb
dates:
  validation: 2025-10-01
  posted: 2024-09-12
---
import Requirements from '@macros/iam/requirements.mdx'


Managed MongoDB® provides fully-managed document Database Instances, with  MongoDB® as a database engine.

MongoDB® databases enable users to store and retrieve data in a document format, such as `json`. Compared to traditional relational databases where data is stored in a table-like format, document-type storage supports storing multiple nested keys and values in each document key.

## Console overview
Discover the Managed MongoDB® interface in the Scaleway console.
<GuideFlow src="https://app.guideflow.com/embed/lpnm35zter"/>

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A [MongoDB®-compatible client](https://www.mongodb.com/try/download/shell) installed

## How to create a Database Instance

1. Click **MongoDB®** under **Databases** on the side menu, if you do not have a Database Instance already created, the creation page displays.
2. Click **Create a Database Instance**. The creation wizard displays.
3. Complete the following steps in the wizard:
    - Select **MongoDB®** as a database engine.
    - Choose a region. This is the geographical location where your database will be deployed.
    - Select a replica set configuration. You can choose between:
        - **Replica-set 1-node** - an instance of MongoDB® that runs as a single server and does not provide redundancy or high availability.
        - **Replica-set 3-nodes** - a group of 3 MongoDB® servers (1 primary and 2 standby nodes) that maintain the same data set. Replica sets provide redundancy and high availability and are the basis for all production deployments. If the main node fails for any reason, one of the remaining standby nodes is assigned and can take over requests, reducing downtime.
    - Select a node type.
    - Define the size of your Block Storage volume. You can increase your storage space without changing your node type, with no downtime. You can increase your volume up to 15 TB.
    - Add a name and set a password for your user.
    <Message type="important">
      Your username must adhere to specific criteria. It must:
          - Start with a letter.
          - Contain only alphanumeric characters (letters, numbers, hyphens, dollars, and underscores).
          - Have a minimum of 12 and up to 63 characters. With at least:
              - one uppercase character, and
              - one lowercase character, and
              - one special character, and
              - one number
    </Message>
    - Enter a name for your Database Instance.
4. Click **Create a Database Instance** to confirm your choices and launch creation.

    You are taken to the **Overview** tab for your Database Instance.

## How to connect via database client with mongosh

1. Click **MongoDB®** under **Databases** on the side menu. A list of your Database Instances displays.
2. Click the database name or <Icon name="more" /> > **More info** to access the Database Instance information page.
3. Click <Icon name="download" /> next to the **TLS certificate** to download it.
4. Transfer the file to where you will execute the connection command.
5. Return to the console and click **Connect** in the **Connect Database Instance** section.
6. Select a connection mode. The following modes are available: `mongosh`, `Python`, `Go`, `Node.js` and `Mongoose`. In this tutorial we use `mongosh`.
7. Replace the variables in the commands with your information.

### Connect to a public endpoint

1. Replace the following variables in the command as described:
    ```bash
    mongosh "mongodb+srv://{instance_id}.mgdb.{region}.scw.cloud" --tlsCAFile {your_certificate.pem} -u {username}
    ```

  - `{your-certificate.pem}` - the TLS certificate downloaded on **step 3**.
  - `{username}` -  the username you defined upon Database Instance creation.
  - `{db-instance-id}` - the UUID of your Database Instance.
  - `{region}` - the database name you entered upon Database Instance creation. The default is called `rdb`.

  ```
2. Run the command.
3. Enter your password when prompted.

If the connection is successful, you should see the following message display on your console, and be able to write queries:
  ```bash
  The server generated these startup warnings when booting
  Powered by MongoDB® v0.9.0 and PostgreSQL 14.6.
  ```

### Connect to a private endpoint

Follow the same procedure as above to connect to a private endpoint for one node, replacing `{privateNetorkName}` with the name of your Private Network:

  ```bash
  mongosh "mongodb://{instance_id}-0.{privateNetworkName}" -u {username}
  ```
### Connect to a private endpoint with multiple nodes

For multiple nodes, replace `{db-instance-id}` with the Database Instance UUID of each respective Instance, and `{privateNetworkName}` with the names of your Private Network:

  ```bash
  "mongodb://{instance_id}-0.{privateNetworkName},{instance_id}-1.{privateNetworkName},{instance_id}-2.{privateNetworkName}" -u {username}
  ```