> For the complete documentation index, see [llms.txt](https://docs.glesys.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.glesys.com/products/database/how-tos/create-a-database-instance.md).

# Create a database instance

***

{% hint style="success" %}
This page describes how to create a new database instance. If you already have a database instance and want to create a new database in it, see [Manage databases and users](/products/database/how-tos/manage-databases-and-users.md) instead.
{% endhint %}

## Creating a database instance using the control panel

You find the database service under **Storage → Databases** in the left-hand menu.

To create your first database instance, ensure that you are in the correct [project](/platform/control-panel/projects.md). Then, click on **Databases** under **Storage**. Then, click **Create**.

<figure><img src="/files/rNQxSCBAcrpReNMCtRO9" alt=""><figcaption></figcaption></figure>

You now need to choose the type of database that you want to create. You can choose between *MySQL* and *PostgreSQL*. In this example, we’ve chosen PostgreSQL version 18. The version can be selected from the dropdown menu below the database type.

<figure><img src="/files/ODqSzYinUBrt95qDnt1S" alt=""><figcaption></figcaption></figure>

A bit further down the page, select a plan for your database. The available plans vary in size, affecting the number of CPU cores, memory, and storage. The storage size can be selected independently of the CPU and memory configuration using the dropdown menu below each plan.

Note that as you select different plans and storage sizes, the price is automatically updated in the lower-right corner.

In this example, we’ve chosen a plan with 1 CPU core, 4 GiB of memory, and 50 GiB of storage.

<figure><img src="/files/jrHl7rEIt9ADbUhqJ63q" alt=""><figcaption></figcaption></figure>

Choose the data center where you want the database to be located. In this example, we'll select the Falkenberg data center.

<figure><img src="/files/lhCMnOx7afJjS8zykvo8" alt=""><figcaption></figcaption></figure>

In the *Firewall* section, you need to add the IP addresses or networks that are allowed to access the database. By default, all access is blocked. Separate the networks and IP addresses with commas.

<figure><img src="/files/EzozUvblosu3mploMc9E" alt=""><figcaption></figcaption></figure>

You also need to give the database a name. In this example, we’ve named the database *my-test-db*.

Once all selections are made, click **Create** in the lower-right corner.

<figure><img src="/files/ze4KaODLBcwtun4FmEsu" alt=""><figcaption></figcaption></figure>

Next, you're taken to an overview of your new database.&#x20;

It takes a few minutes to create the database. Until it’s ready to use, its status will be *Creating...* in the upper-right corner. This will change to *Online* once the database is ready.

Next to the status of the database, you also see its type and the data center where it’s located. In the example below, it’s *PostgreSQL 16*, placed in *Falkenberg*. You also see the database’s maintenance window, which in this example is *Wednesday at 07:00*.

During the maintenance window, the database may experience a short period of downtime. This typically occurs only when the database has been upgraded and needs to be restarted.

On the overview page, you see all the details you need to connect to it—your username, password, default database name, connection string, and so on. To view the password, click the eye icon. To copy the password to your clipboard, click the copy icon. The same goes for the connection string.

<figure><img src="/files/uT9xobaF1H5J43zLusZz" alt=""><figcaption></figcaption></figure>

## Creating a database instance using the API

To create a database using the [API](/platform/control-panel/api.md), use the [database/create](https://github.com/GleSYS/API-docs/wiki/API-Documentation#databasecreate) endpoint.
