How to Reconfigure Valkey Database Clusters

Validated on 24 Apr 2025 • Last edited on 24 Apr 2025

Valkey is a high-performance, open-source database that stores key-value data in memory, and is designed for caching, message queues, and primary database use. Fully compatible with Redis, Valkey serves as a drop-in replacement.

You can update your database engine’s parameters with the API, such as redis_maxmemory_policy and redis_pubsub_client_output_buffer_limit. For a full list of the parameters you can edit, see our API reference. Under the REQUEST BODY SCHEMA section, click config, and then click the redis option.

To ensure database stability, you can only edit the parameters listed in our API reference. To change other Valkey parameters, contact support.

Update a Database’s Configuration Using the CLI

How to Update a Database’s Configuration Using the DigitalOcean CLI
  1. Install doctl, the official DigitalOcean CLI.
  2. Create a personal access token and save it for use with doctl.
  3. Use the token to grant doctl access to your DigitalOcean account.
    doctl auth init
  4. Finally, run doctl databases configuration update. Basic usage looks like this, but you can read the usage docs for more details:
    doctl databases configuration update <db-id> [flags]
    The following command updates a MySQL database’s time zone:
    doctl databases configuration update f81d4fae-7dec-11d0-a765-00a0c91e6bf6 --engine mysql --config-json '{"default_time_zone":"Africa/Maputo"}'

Update a Database’s Configuration Using the API

How to Update a Database’s Configuration Using the DigitalOcean API
  1. Create a personal access token and save it for use with the API.
  2. Send a PATCH request to https://api.digitalocean.com/v2/databases/{database_cluster_uuid}/config.

cURL

Using cURL:

curl -X PATCH \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DIGITALOCEAN_TOKEN" \
  -d '{"config": {"sql_mode": "ANSI,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,STRICT_ALL_TABLES","sql_require_primary_key": true}}' \
  "https://api.digitalocean.com/v2/databases/9cc10173-e9ea-4176-9dbc-a4cee4c4ff30/config"

Python

Using PyDo, the official DigitalOcean API client for Python:

import os
from pydo import Client

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

resp = client.databases.patch_config(database_cluster_uuid="a7aba9d")

We can't find any results for your search.

Try using different keywords or simplifying your search terms.