> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/databases/mongodb/dcd-how-tos/set-up-mongodb-cluster.md).

# Set Up a MongoDB Cluster

You can add a MongoDB cluster on any of the following editions: **Playground**, **Business**, or **Enterprise**.

### Create a Cluster

{% hint style="info" %}
**Prerequisites:** Before setting up a database, make sure you are working within a provisioned [<mark style="color:blue;">VDC</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#vdc) that contains at least one virtual machine ([<mark style="color:blue;">VM</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#vm)) from which to access the database. The VM you create is counted against the quota allocated in your contract. For more information on databases quota, see [<mark style="color:blue;">Resource Allocation</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/databases/database-as-a-service.md#resource-allocation).
{% endhint %}

{% hint style="info" %}
**Note:** Database Manager is available for contract administrators, owners, and users with **Access and manage DBaaS** privileges only. You can set the privilege via the DCD group privileges.
{% endhint %}

{% tabs %}
{% tab title="MongoDB Playground" %}
1\. In the [<mark style="color:blue;">Data Center Designer</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/getting-started/basic-tutorials/log-in-dcd.md), click **Menu** > **Databases** > **Postgres & MongoDB**.

2\. In the **Databases** page, click **+ Add** in the **MongoDB Clusters** section.

3\. Provide an appropriate **Display Name**.

4\. From the drop-down list, choose a **Location** where your data for the database cluster can be stored. You can select an available data center within the cluster's data directory to create your cluster.

5\. Choose the **Edition** type as **Playground**. In this edition, you can create one playground instance for free and test MongoDB.

{% hint style="info" %}
**Note:** For every additional instance that you create apart from the first instance, the charges are applicable accordingly.
{% endhint %}

6\. Select the **Template** to use the resources for creating your MongoDB cluster. In the **Playground** edition, the following standard resources are available:

* **RAM Size (GB):** 2.
* **vCPU:** 1.
* **Storage Size:** 50 GB.

7\. Select the **Database Type** as the **Replica Set**. This database type maintains replicas of data sets and offers redundancy and high data availability.

{% hint style="info" %}
**Note:** The **Sharded Cluster** database type is not available for selection in the **Playground** edition.
{% endhint %}

8\. Select the **Instances** to host a logical database manager environment to catalog your databases. By default, one instance is offered for free in this edition.

{% hint style="info" %}
**Note:** The **Estimated price** will be displayed based on the input. The estimated cost is exclusive, where certain variables like traffic and backup are not considered.
{% endhint %}

![Set up MongoDB Playground template](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-1786dbc35de2779b9e4e97fe27ec1fc3fa6c12b9%2Fmongodb-cluster-playground-template.png?alt=media)

9\. In the **Cluster to Datacenter Connection** section, set up the following:

1. **Select a Data Center:** Select a data center from the available list. Use the search option to enter a data center that you want to select.
2. **LAN in the selected Datacenter:** Select a LAN for the chosen data center.

10\. In the **Private IP/Subnet**, perform the following actions:

1. **Private IP/Subnet:** Enter the private IP or subnet address in the correct format by using the available Private IPs.

{% hint style="info" %}
**Note:** To know your private IP address/Subnet, you need to:

* Create a single server connected to an empty private LAN and check the IP assigned to that NIC in that LAN. The DHCP in that LAN is always using a /24 subnet, so you have to reuse the first 3 octets to reach your database.
* To prevent a collision with the DHCP IP range, it is recommended to use IP addresses ending between x.x.x.3/24 and x.x.x.10/24 (which are never assigned by DHCP).
* If you have disabled DHCP on your private LAN, then you need to discover the IP address on your own.
  {% endhint %}

2. Click **Add** to save the private IP/Subnet address details.
3. Click **Add Connection** to connect the cluster to the data center.

![MongoDB cluster to data center connection](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-a980ce2ef6521a4a84f3d7522c7679272c7afbc8%2Fmongodb-cluster-playground-datacenter.png?alt=media)

11\. Select the appropriate **MongoDB Version**. The IONOS Database Manager supports 5.0 and 6.0 MongoDB versions.

12\. In the **Maintenance Window**, set the following:

* **Maintenance time:** Set the time (in UTC) for the maintenance of the MongoDB cluster. Use the pre-defined format (hh:mm:ss) or you can use the clock. The maintenance occurs in a 4-hour-long window, adjust the time accordingly.
* **Maintenance day:** From the dropdown menu, choose the preferred day on which the maintenance of the cluster must take place.

13\. Click **Save** to provision the creation of the MongoDB cluster.

![MongoDB cluster maintenance window](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-d50df5884c794d1bc35a37f558697ac0b1c0ef4c%2Fmongodb-cluster-playground-maintenance.png?alt=media)

{% hint style="success" %}
**Result:** The MongoDB cluster for the defined values is created in the **Playground** edition.
{% endhint %}
{% endtab %}

{% tab title="MongoDB Business" %}
1\. In the [<mark style="color:blue;">Data Center Designer</mark>](/cloud/~/revisions/AMiYziCllTKB2y2lmONY/getting-started/basic-tutorials/log-in-dcd.md), click **Menu** > **Databases** > **Postgres & MongoDB**.

2\. In the **Databases** window, click **+ Add** in the **MongoDB Clusters** section.

3\. Provide an appropriate **Display Name**.

4\. From the drop-down list, choose a **Location** where your data for the database cluster can be stored. You can select an available data center within the cluster's data directory to create your cluster.

5\. Choose the **Edition** type as **Business**.

6\. Select the **Template** to use the resources needed for creating your MongoDB cluster. In the **Business** edition, the resources varying from **MongoDB Business XS** to **MongoDB Business 4XL\_S** are made available. Each template differs based on the **RAM Size (GB)**, **vCPU**, and **Storage Size**.

{% hint style="info" %}
**Note:** Depending on the resource limit allocation as per your contract, some of the templates may not be available for selection.
{% endhint %}

7\. Select the **Database Type** as the **Replica Set**. This database type maintains replicas of data sets and offers redundancy and high availability of data.

{% hint style="info" %}
**Note:** The **Sharded Cluster** database type is not available for selection in the **Business** edition.
{% endhint %}

8\. Choose the **Instances** to host a logical database manager environment to catalog your databases. By default, one instance and three instances are possible in the **Business** edition.

{% hint style="info" %}
**Note:** The **Estimated price** will be displayed based on the input. The estimated cost is exclusive, where certain variables like traffic and backup are not considered.
{% endhint %}

![Set up MongoDB Business template](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-465c1b5e147d61cb746827def4c990ff7f1cf107%2Fmongodb-cluster-business-template.png?alt=media)

9\. In the **Cluster to Datacenter Connection** section, set up the following:

1. **Select a Data Center:** Select a data center from the available list. Use the search option to enter a data center that you want to select.
2. **LAN in the selected Datacenter:** Select a LAN for your data center.

10\. In the **Private IP/Subnet**, perform the following actions:

1. **Private IP/Subnet:** Enter the private IP or subnet address in the correct format by using the available Private IPs. Depending on the number of instances selected in step 8, you need to enter one private IP/Subnet address detail for every instance.

{% hint style="info" %}
**Note:** To know your private IP address/Subnet, you need to:

* Create a single server connected to an empty private LAN and check the IP assigned to that NIC in that LAN. The DHCP in that LAN is always using a /24 subnet, so you have to reuse the first 3 IP blocks to reach your database.
* To prevent a collision with the DHCP IP range, it is recommended to use IP addresses ending between x.x.x.3/24 and x.x.x.10/24 (which are never assigned by DHCP).
* If you have disabled DHCP on your private LAN, then you need to discover the IP address on your own.
  {% endhint %}

2. Click **Add** to save the private IP/Subnet address details.
3. Click **Add Connection** to connect the cluster to the data center.

![MongoDB cluster to data center connection](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-7a7ec2852c5c7d6444d0f3bc2923fe2ffda52023%2Fmongodb-cluster-business-datacenter.png?alt=media)

11\. Select the appropriate **MongoDB Version**. The IONOS Database Manager supports 5.0 and 6.0 MongoDB versions.

12\. In the **Maintenance Window**, set the following:

* **Maintenance time:** Set the time (in UTC) for the maintenance of the MongoDB cluster. Use the pre-defined format (hh:mm:ss) or you can use the clock. The maintenance occurs in a 4-hour-long window, adjust the time accordingly.
* **Maintenance day:** From the dropdown menu, choose the preferred day on which the maintenance of the cluster must take place.

13\. Click **Save** to provision the creation of the MongoDB cluster.

![MongoDB cluster maintenance window](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-d50df5884c794d1bc35a37f558697ac0b1c0ef4c%2Fmongodb-cluster-playground-maintenance.png?alt=media)

{% hint style="success" %}
**Result:** The MongoDB cluster for the defined values is created in the **Business** edition.
{% endhint %}
{% endtab %}

{% tab title="MongoDB Enterprise" %}
1\. In the DCD, click **Menu** > **Databases** > **Postgres & MongoDB**.

2\. In the **Databases** window, click **+ Add** in the **MongoDB Clusters** section.

3\. Provide an appropriate **Display Name**.

4\. From the drop-down list, choose a **Location** where your data for the database cluster can be stored. You can select an available data center within the cluster's data directory to create your cluster.

5\. Choose the **Edition** type as **Enterprise**.

6\. Choose the following resources for creating each node of your MongoDB cluster. The total billed resources will be these values multiplied by the number of instances and the number of shards (if applicable).

* **CPU Cores:** You can choose between 1 and 31 CPU cores using the slider or choose from the available shortcut values.
* **RAM Size (GB):** Values of up to 230 GB RAM sizes are possible. Select the RAM size using the slider or choose from the available shortcut values.
* **Storage Type:** The **Premium**, [<mark style="color:blue;">**SSD**</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#ssd) **Standard**, or [<mark style="color:blue;">**HDD**</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#hdd) storage options are available.
* **Storage Size:** Set the storage size value to at least 100 GB in case of SSD Standard and Premium storage types for optimal performance of the database cluster. You can configure the storage size to a maximum of 4 TB.

7\. Select the **Database Type** from the following:

* **Replica Set:** Maintains replicas of datasets; offers redundancy and high availability of data.
* **Sharded Cluster:** Maintains collection of datasets that are distributed across many shards (servers) and hence offers horizontal scalability. Define the **Amount of Shards** between two to a maximum of thirty-two shards.

{% hint style="info" %}
**Note:** For sharded clusters, an additional three **config server** instances are created with sizing of two cores, 4 GB of memory, and 40 GB of storage each. These instances are excluded from the billed resources.
{% endhint %}

8\. Choose the **Instances** to host a logical database manager environment to catalog your databases. By default, three instances are possible in the **Enterprise** edition.

{% hint style="info" %}
**Note:** The **Estimated price** will be displayed based on the input. The estimated cost is exclusive, where certain variables like traffic and backup are not considered.
{% endhint %}

![Set up MongoDB Enterprise Cluster](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-abcabef168b8c08cd95a0b0a1cdd432f66cd7da3%2Fmongodb-cluster-enterprise-template.png?alt=media)

9\. In the **Cluster to Datacenter Connection** section, set up the following:

1. **Select a Data Center:** Select a data center from the available list. Use the search option to enter a data center that you want to select.
2. **LAN in the selected Datacenter:** Select a LAN for your data center.

10\. In the **Private IP/Subnet**, perform the following actions:

1. **Private IP/Subnet:** Enter the private IP or subnet address in the correct format by using the available Private IPs. Depending on the number of instances selected in step 8, you need to enter one private IP/Subnet address detail for every instance.

{% hint style="info" %}
**Note:** To know your private IP address/Subnet, you need to:

* Create a single server connected to an empty private LAN and check the IP assigned to that NIC in that LAN. The DHCP in that LAN is always using a /24 subnet, so you have to reuse the first 3 IP blocks to reach your database.
* To prevent a collision with the DHCP IP range, it is recommended to use IP addresses ending between x.x.x.3/24 and x.x.x.10/24 (which are never assigned by DHCP).
* If you have disabled DHCP on your private LAN, then you need to discover the IP address on your own.
  {% endhint %}

2. Click **Add** to save the private IP/Subnet address details.
3. Click **Add Connection** to connect the cluster to the data center.

![MongoDB cluster to data center connection](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-1a844a85ad578df0186836914ac391522d465b33%2Fmongodb-cluster-enterprise-datacenter.png?alt=media)

11\. Select the appropriate **MongoDB Version**. The IONOS Database Manager supports 5.0 and 6.0 MongoDB versions.

12\. Choose a **Backup Location** that is explicitly the location of your backup (region). You can have off-site backups by using a region that is not included in your database region.

13\. Toggle on the **Enable BI Connector** to enable the MongoDB Connector for Business Intelligence (BI) to query a MongoDB database by using SQL commands to aid in the data analysis. If you do not want to use BI Connector, you can toggle off this setting.

![MongoDB cluster backup location and enable BI Connector](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-78984fa716452074c9d4f7fd5cb52fe5c9109921%2Fmongodb-cluster-enterprise-biconnector.png?alt=media)

14\. In the **Maintenance Window**, set the following:

* **Maintenance time:** Set the time (in UTC) for the maintenance of the MongoDB cluster. Use the pre-defined format (hh:mm:ss) or you can use the clock. The maintenance occurs in a 4-hour-long window, adjust the time accordingly.
* **Maintenance day:** From the dropdown menu, choose the preferred day on which the maintenance of the cluster must take place.

15\. Click **Save** to provision the creation of the MongoDB cluster.

![MongoDB cluster maintenance window](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-d50df5884c794d1bc35a37f558697ac0b1c0ef4c%2Fmongodb-cluster-playground-maintenance.png?alt=media)

{% hint style="success" %}
**Result:** The MongoDB cluster for the defined values is created in the **Enterprise** edition.
{% endhint %}
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ionos.com/cloud/~/revisions/AMiYziCllTKB2y2lmONY/databases/mongodb/dcd-how-tos/set-up-mongodb-cluster.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
