# PostgreSQL Flexible Server

## Prerequisites

### Create a PostgreSQL Flexible Server subnet in the Infrastructure

1. Navigate to **Administrator** -> **Infrastructure** from the DuploCloud Portal.
2. From the **NAME** column, select the Infrastructure.
3. Select the **Subnets** tab, and click **Add**. The **Add Subnet** pane displays.

<div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2FbTz0hzzWcGXSOXTealQ0%2Ffinal%20sub.png?alt=media&#x26;token=099ba5bf-3e80-4ea6-9346-2d072326096d" alt=""><figcaption><p>The <strong>Add Subnet</strong> pane in the DuploCloud Portal</p></figcaption></figure></div>

4. Enter a name for the subnet in the **Name** field.
5. Enter the **Address Prefix** for the subnet.
6. From the **Type** list box, select **PostgreSQL Flexi Server**.
7. In the **Isolated Network** list box, select **Yes** or **No**.
8. Select the appropriate endpoints from the **Service Endpoints** list box.
9. Click **Add**. The subnet is added.

<div align="left"><figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F4iGhHrPZuT6FF7KT3n85%2Fsuccess.png?alt=media&#x26;token=cd57efd6-9e58-46c3-b3b1-e130592e34aa" alt=""><figcaption></figcaption></figure></div>

## Creating a PostgreSQL Flexible Server database

1. From the DuploCloud Portal, navigate to **Cloud Services** -> **Database** -> **PostgreSQL Flexible**.
2. Click **Add**. The **Create PostgreSQL Flexible Instance** page displays.<br>

   <figure><img src="https://2471407984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F68cb0s9ce5UIUKWPuYs8%2Fuploads%2F9KbJkvQDLCnhSCXDoqBX%2FScreenshot%20(704).png?alt=media&#x26;token=96b9dc4f-cdef-47f0-b367-731efa3ed0cd" alt=""><figcaption><p>The <strong>Create PostgreSQL Flexible Instance</strong> page</p></figcaption></figure>
3. Complete the required fields.
4. From the **Subnet** list box, select the **PostgreSQL Flexi Server** subnet previously created.
5. Click **Submit**. The PostgreSQL Flexible Server database is created.

## Viewing a PostgreSQL Flexible Server database

From the DuploCloud Portal, navigate to **Cloud Services** -> **Databases** -> **PostgreSQL Flexible**, and click on the PostgreSQL Flexible Server database in the **NAME** column. Use the **Overview** and **Details** tabs to view database info.
