> ## Documentation Index
> Fetch the complete documentation index at: https://www.aptible.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# aptible db:create

This command creates a new [Database](/docs/core-concepts/managed-databases/overview) using the General Purpose (M) container profile by default. The container profile can only be modified in the Aptible dashboard.

# Synopsis

```
Usage:
  aptible db:create HANDLE [flags]

Flags:
      --container-profile string   Container profile (e.g. m, c, r)
      --container-size int32       Container size in MB
      --disk-size int32            Disk size in GB (default 10)
  -e, --env string                 Environment handle (alias)
      --environment string         Environment handle (required)
      --iops int32                 Provisioned IOPS
      --key-arn string             KMS key ARN for encryption
      --type string                Database type
      --version string             Database version
```

# Examples

#### Create a new Database using a specific type

You can specify the type using the `--type` option. This parameter defaults to `postgresql`, but you can use any of Aptible's [Supported Databases](/docs/core-concepts/managed-databases/supported-databases/overview).

For example, to create a [Redis](/docs/core-concepts/managed-databases/supported-databases/redis) database:

```shell theme={null}
aptible db:create --type redis
```

#### Create a new Database using a specific version

Use the `--version` flag in combination with `--type` to use a specific version:

```shell theme={null}
aptible db:create --type postgresql --version 9.6
```

> 📘 Use the [`aptible db:versions`](/docs/reference/aptible-cli/cli-commands/cli-db-versions) command to identify available versions.

#### Create a new Database with a custom Disk Size

```shell theme={null}
aptible db:create --disk-size 20 "$DB_HANDLE"
```

#### Create a new Database with a custom Container Size

```shell theme={null}
aptible db:create --container-size 2048 "$DB_HANDLE"
```

#### Container Sizes (MB)

**General Purpose(M)**: 512, 1024, 2048, 4096, 7168, 15360, 30720, 61440, 153600, 245760

#### Profiles

`m`: General Purpose (M) container \
`c`: CPU-Optimized (C) container \
`r`: Memory Optimized (R) container
