> 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/1AlFSZBNMIBgs7fiOwFD/managed-services/database-as-a-service/postgresql/dcd-howtos/setup-a-cluster-in-the-dcd.md).

# Set Up a Cluster

{% hint style="info" %}
**Prerequisites:** Prior to setting up a database, please make sure you are working within a provisioned [<mark style="color:blue;">VDC</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#vdc) that contains at least one [<mark style="color:blue;">virtual machine</mark>](https://docs.ionos.com/support/general-information/glossary-of-terms#virtual-machine-vm) from which to access the database. The VM you create is counted against the quota allocated in your contract.
{% endhint %}

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

### Creating a Cluster

1\. To create a Postgres cluster, go to **Menu** > **Databases**.

2\. In the **Databases** tab, click **+ Add** in the **Postgres Clusters** section to create a new Postgres Cluster.

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

4\. To create a Postgres Cluster from the available backups directly, you can go to the **Create from Backup** section and follow these steps:

* Select a **Backup** from the list of cluster backups in the dropdown.
* Select the **Recovery Target Time** field. A modal will open up.
  * Select the **recovery date** from the calendar.
  * Then, select the **recovery time** using the clock.

5\. Choose a **Location** where your data for the database cluster will be stored. You can select an available datacenter within the cluster's data directory to create your cluster.

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

![The Database Manager lets you complete the Postgres Cluster setup from the DCD](/files/9W7BFe0xDFY2doWz08r0)

7\. In the **Cluster to Datacenter Connection** section, provide the following information:

* **Data Center:** Select a datacenter from the available list.
* **LAN:** Select a LAN for your datacenter.
* **Private IP/Subnet:** Enter the private IP or subnet using the available [<mark style="color:blue;">Private IPs</mark>](https://www.ionos.com/help/server-cloud-infrastructure/private-network/private-ip-address-ranges/).
* Once done, click the **Add Connection** option to establish your cluster to datacenter connection.

{% 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 always uses a **/24 subnet**, so you must 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, you must discover the IP address on your own.
  {% endhint %}

8\. Select the appropriate **Postgres Version**. IONOS Database Manager supports versions 11, 12, 13, 14, and 15.

{% hint style="info" %}
**Deprecation Notice:** Support for version 11 will soon be removed and should not be used for new clusters.
{% endhint %}

9\. Enter the number of **Postgres Instances** in the cluster. One Postgres instance always manages the data of exactly one database cluster.

{% hint style="info" %}
**Note:** Here, you will have a **primary** node and one or more standby nodes that run a copy of the active database, so you have **n-1 standby** instances in the cluster.
{% endhint %}

10\. Select the mode of replication in the **Synchronization Mode** field; asynchronous mode is selected by default. The following are the available replication modes:

* **Asynchronous mode:** In asynchronous mode, the primary PostgreSQL instance does not wait for a replica to indicate that it wrote the data. The cluster can lose some committed transactions to ensure availability.
* **Synchronous mode:** Synchronous replication allows the primary node to be run standalone. The primary PostgreSQL instance will wait for any or all replicas. So, no transactions are lost during failover.
* **Strictly Synchronous:** It is similar to the synchronous mode but requires two operating nodes.

![Enter the values for creating the Postgres Cluster](/files/0HC3E8vVPQg5EJwfQZWm)

11\. Provide the initial values for the following:

* **CPU Cores**: Select the number of CPU cores using the slider or choose from the available shortcut values.
* **RAM Size**: Select the RAM size using the slider or choose from the available shortcut values.
* **Storage Type**: [<mark style="color:blue;">SSD Premium</mark>](https://app.gitbook.com/s/-Mj91LQrRzfHvr2Jl2Rv/general-information/glossary-of-terms#ssd) is set by default.
* **Storage Size**: Enter the size value in Gigabytes.

  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.

![Enter the values for creating the Postgres Cluster](/files/75M9pC5VzAPkyyOxkD2f)

12\. Provide the **Database User Credentials**, such as a suitable username and an associated password.

{% hint style="info" %}
**Note:** The credentials will be overwritten if the user already exists in the backup.
{% endhint %}

13\. In the **Maintenance Window** section, you can set a **Maintenance time** using the pre-defined format (hh:mm:ss) or the clock. Select a **Maintenance day** from the dropdown list. The maintenance occurs in a **4-hour-long window**. So, adjust the time accordingly.

14\. Click **Save** to create the Postgres Cluster.

![Enter and save the values for creating the Postgres Cluster](/files/mSPOyoCsRtfjXzBG4W8W)

Your Postgres Cluster is now created.


---

# 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/1AlFSZBNMIBgs7fiOwFD/managed-services/database-as-a-service/postgresql/dcd-howtos/setup-a-cluster-in-the-dcd.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.
