---
title: How to Create Valkey Clusters
description: Create a Valkey database cluster from the DigitalOcean Control Panel.
product: Databases
url: https://docs.digitalocean.com/products/databases/valkey/how-to/create/
last_updated: "2026-11-05"
---

> **For AI agents:** The documentation index is at [https://docs.digitalocean.com/llms.txt](https://docs.digitalocean.com/llms.txt). Markdown versions of pages use the same URL with `index.html.md` in place of the HTML page (for example, append `index.html.md` to the directory path instead of opening the HTML document).

# How to Create Valkey Clusters

You can create a Valkey cluster using `doctl`, the API, or the Control Panel.

We support Valkey versions 8 and 9. New clusters use Valkey 9 by default, and clusters are provisioned with the latest supported minor release within a major version. To view available major versions for new clusters, use the [/v2/databases/options](https://docs.digitalocean.com/reference/api/reference/databases/index.html.md#databases_list_options) response.

## Create a Database Cluster Using Automation

You can create a database cluster using the DigitalOcean CLI (`doctl`) or the API.

### Create a Database Cluster via CLI

To create a database using `doctl`, you need to provide values for the `--engine`, `--region`, and `--size` flags. Use the [`doctl databases options engines`](https://docs.digitalocean.com/reference/doctl/reference/databases/options/engines/index.html.md), [`doctl databases options regions`](https://docs.digitalocean.com/reference/doctl/reference/databases/options/regions/index.html.md), and [`doctl databases options slugs`](https://docs.digitalocean.com/reference/doctl/reference/databases/options/slugs/index.html.md) commands, respectively, to get a list of available values.

## How to Create a Database Cluster Using the DigitalOcean CLI

1. [Install `doctl`](https://docs.digitalocean.com/reference/doctl/how-to/install/index.html.md), the official DigitalOcean CLI.
2. [Create a personal access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) and save it for use with `doctl`.
3. Use the token to grant `doctl` access to your DigitalOcean account.

   ```shell
   doctl auth init
   ```
4. Run [`doctl databases create`](https://docs.digitalocean.com/reference/doctl/reference/databases/create/index.html.md). Basic usage:

   ```shell
   doctl databases create <name> [flags]
   ```

   The following example creates a Valkey cluster named `example-database` in the `nyc1` region with a single 1 GB node:

   ```shell
   doctl databases create example-database --engine valkey --version 8 --region nyc1 --size db-s-1vcpu-1gb --num-nodes 1
   ```

### Create a Database Cluster via API

To create a database using the API, you need to provide values for the `engine`, `region`, and `size` fields, which specify the database’s engine, its datacenter, and its configuration (number of CPUs, amount of RAM, and disk capacity). Use the [`/v2/databases/options`](https://docs.digitalocean.com/reference/api/reference/databases/index.html.md#databases_list_options) endpoint to get a list of available values.

## How to Create a Database Cluster Using the DigitalOcean API

### cURL

Send a POST request to `https://api.digitalocean.com/v2/databases` using cURL:

```shell
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{
    "name": "example-database",
    "engine": "valkey",
    "version": "8",
    "region": "nyc1",
    "size": "db-s-1vcpu-1gb",
    "num_nodes": 1
  }' \
  "https://api.digitalocean.com/v2/databases"
```

### Go

Using [Godo](https://github.com/digitalocean/godo), the official DigitalOcean API client for Go:

```go
import (
    "context"
    "os"

    "github.com/digitalocean/godo"
)

func main() {
    token := os.Getenv("DIGITALOCEAN_TOKEN")

    client := godo.NewFromToken(token)
    ctx := context.TODO()

    createRequest := &godo.DatabaseCreateRequest{
        Name:       "example-database",
        EngineSlug: "valkey",
        Version:    "8",
        Region:     "nyc1",
        SizeSlug:   "db-s-1vcpu-1gb",
        NumNodes:   1,
    }

    cluster, _, err := client.Databases.Create(ctx, createRequest)
}
```

### Python

Using [PyDo](https://github.com/digitalocean/pydo), the official DigitalOcean API client for Python:

```python
import os
from pydo import Client

client = Client(token=os.environ.get("DIGITALOCEAN_TOKEN"))

create_req = {
  "name": "example-database",
  "engine": "valkey",
  "version": "8",
  "region": "nyc1",
  "size": "db-s-1vcpu-1gb",
  "num_nodes": 1
}

create_resp = client.databases.create_cluster(body=create_req)
```

## Create a Database Cluster Using the Control Panel

To create a Valkey database cluster, go to the [**Databases page**](https://cloud.digitalocean.com/databases) and click **Create Database**.

### Choose a Database Engine

On the **Create Database Cluster** page, in the **Choose a database engine** section, select **Valkey**, and then choose a version, if available. The database engine and version can’t be changed after creation.

![The database engine selection portion of the database create page](https://docs.digitalocean.com/screenshots/databases/choose-database-engine.db4d0f839466bc24bd29bfe412e5b7ec8ba8dd776b058c50e14fbc45e495b089.png)

### Choose a Database Configuration

In the **Choose a database configuration** section, select an option:

- **Basic - Shared CPU**: CPU processing power is shared among neighboring Droplets on the same host. Best for low-traffic, testing, or development workloads.
- **Memory-Optimized - Dedicated CPU**: Provides the full processing power of a single vCPU at all times. Best for memory-heavy workloads with large working sets and demanding read-heavy or analytics-style queries.

### Choose CPU Options

Under **CPU options**, select an option:

- **Regular (Disk: SSD)**: Use for standard workloads that don’t require NVMe-backed disk performance.
- **Premium AMD (Disk: NVMe)**: Use for workloads that benefit from faster local disk performance and higher network throughput. This option is only available for **Basic - Shared CPU** configurations.
- **Premium Intel (Disk: NVMe)**: Use for workloads that benefit from faster local disk performance, higher network throughput, and predictable CPU performance.
- **AMDv5 (Disk: NVMe)**: Use for workloads that benefit from higher per-core performance on 5th Generation AMD EPYC processors.

Changing the CPU option can change the available plan sizes, prices, and datacenter regions.

### Select a Plan

Under **Select a plan**, choose a plan size for the cluster. The plan determines the cluster’s vCPUs, RAM, and minimum storage. Each option shows its combined monthly cost and included resources.

After creation, you can [increase your cluster’s compute size](https://docs.digitalocean.com/products/databases/valkey/how-to/resize/index.html.md) (number or size of nodes) at any time.

### Configure High Availability

For cluster configurations that use standby nodes, you can add them in the **Maximize uptime for critical workloads** section. Standby nodes provide [high availability](https://docs.digitalocean.com/products/databases/index.html.md#high-availability) by replacing the primary node if it fails. Clusters with at least one standby node have a 99.95% monthly uptime SLA, while clusters without standby nodes have a 99.5% monthly uptime SLA. See the [Managed Databases SLA](https://www.digitalocean.com/sla/databases) for details.

You can add up to two standby nodes to all plans except the smallest 1 vCPU / 1 GiB RAM / 10 GiB **Basic - Shared CPU** plans.

![High availability section with two standby nodes selected.](https://docs.digitalocean.com/screenshots/databases/add-standby-nodes.9c97384879b1d8eb8deccdc1ad07409b2f6635583455dd391bbd82aacb473a85.png)

Choose an option:

- **No standby node**: Use for development, testing, and workloads that don’t require higher availability.
- **Add one standby node**: Use for production workloads that need higher availability.
- **Add two standby nodes**: Use for critical production workloads that need additional failover capacity.

Valkey has memory overhead requirements, so the usable memory per node is lower than the total memory. For a breakdown by plan, see [Valkey memory usage](https://docs.digitalocean.com/products/databases/valkey/details/memory-usage/index.html.md).

**Note**:

  Each CPU in a Valkey cluster can handle up to 200 new connections per second. Additional connection attempts within that second fail and must be retried.

  To avoid this limitation, we recommend using connection pooling, which reuses existing connections and improves performance. DigitalOcean Valkey clusters do not support connection pooling natively, but most Valkey clients do. Alternatively, you can [resize your database cluster](https://docs.digitalocean.com/products/databases/valkey/how-to/resize/index.html.md) to add more CPUs.

Adding standby nodes increases the cluster’s monthly cost.

### Choose a Datacenter Region

The **Choose a datacenter region** section shows the datacenters where you currently have the most resources, with the number of resources shown to the right as **X resources**. Hover over this text to see the specific resources in the datacenter.

For best performance, choose a datacenter close to the resources that connect to the cluster. Resources in the same datacenter share a [VPC](https://docs.digitalocean.com/products/networking/vpc/index.html.md) network, which reduces latency and keeps traffic off the public internet.

If an App Platform app connects to the cluster over a VPC network, choose the datacenter that the app’s region maps to. For example, apps in the `nyc` region can only connect to VPC networks in `nyc1`. For the full mapping, see [How to Enable App Platform VPC](https://docs.digitalocean.com/products/app-platform/how-to/enable-vpc/index.html.md).

![The datacenter selection portion of the databases create page](https://docs.digitalocean.com/screenshots/databases/choose-a-datacenter.83d4e016e854b43e910021dab949f1fc725855f15408f34f8d7dbf319f6f0d51.png)

Available regions depend on the CPU option and plan you select. For available regions, see [Regional Availability](https://docs.digitalocean.com/platform/regional-availability/index.html.md).

After creation, you can [relocate your cluster to another datacenter](https://docs.digitalocean.com/products/databases/valkey/how-to/relocate/index.html.md).

### Finalize and Create

In the **Finalize and Create** section, enter a unique name for the cluster and select a project to add it to. After creation, you can move the cluster to another project, but its name can’t be changed.

![The Finalize and Create section of the Create a database page](https://docs.digitalocean.com/screenshots/databases/finalize-and-create.227a0744d8c767512004e1f38e81dc2d197177fbe968553a3223cf57106a5c89.png)

Review the monthly and hourly cost for the cluster. When finished, click **Create Database Cluster**.

Clusters typically take five minutes or more to provision. You can complete important configuration tasks such as [restricting inbound connections](https://docs.digitalocean.com/products/databases/valkey/how-to/secure/index.html.md#firewalls) while you wait.