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

> ## Agent Instructions
> These are the docs for Sevalla, a platform for deploying applications, databases, static sites, object storage and load balancers. The dashboard is at https://app.sevalla.com.
> Bold text in steps is an exact dashboard label.
> To act on a Sevalla account, prefer the Sevalla MCP server (https://mcp.sevalla.com/mcp, see https://docs.sevalla.com/ai-agents/overview.md), then the Sevalla CLI (https://docs.sevalla.com/developer-tools/cli.md), then the REST API (https://api-docs.sevalla.com, OpenAPI spec at https://api.sevalla.com/v3/openapi.json).
> Every page index is at https://docs.sevalla.com/llms.txt.

# Databases

> Managed PostgreSQL, MySQL, MariaDB, Redis and Valkey on Sevalla: supported versions, sizes and storage, how connections and backups work, statuses and limits.

A database on Sevalla is a managed PostgreSQL, MySQL, MariaDB, Redis or Valkey server that runs in one location, with a fixed size (CPU, memory and storage), one database and one user. Sevalla runs the server, backs it up and keeps its connection details; you connect your applications over the private network and anything else over the internet.

## What you can do

> [card] [Create a database](https://docs.sevalla.com/databases/create.md)
>
> Pick the engine, version, location and size.

> [card] [Connect to a database](https://docs.sevalla.com/databases/connect.md)
>
> Internal connections for applications, external connections for everything else.

> [card] [Backups](https://docs.sevalla.com/databases/backups.md)
>
> Automatic and manual backups, backup targets and restores.

> [card] [Database studio](https://docs.sevalla.com/databases/studio.md)
>
> Browse and update data and run queries in the dashboard.

> [card] [Import and export](https://docs.sevalla.com/databases/import-export/postgresql.md)
>
> Move data in and out with each engine's own tools.

> [card] [Analytics](https://docs.sevalla.com/databases/analytics.md)
>
> Storage, memory and CPU over time.

> [card] [Database settings](https://docs.sevalla.com/databases/settings.md)
>
> Rename, resize, restart, suspend or delete.

> [card] [Troubleshoot databases](https://docs.sevalla.com/databases/troubleshooting.md)
>
> Connection errors and failed operations.

## Engines and versions

The versions you can choose depend on the cloud your company runs on: Google Cloud, or Oracle Cloud Infrastructure (OCI) for new companies and for companies that have moved there (see [OCI migration](https://docs.sevalla.com/platform/oci-migration.md)). The create form shows only the versions available in the location you pick. The first version in each list is the default.

| Engine | Google Cloud locations | OCI locations |
| - | - | - |
| PostgreSQL | 17, 16 | 18, 17, 16 |
| MySQL | 9.0, 8.0 | 8.0 |
| MariaDB | 11.1, 11.0, 10.11, 10.6, 10.5, 10.4 | 11.8, 11.4, 10.11 |
| Redis | 8.x, 7.x, 6.x, 5.0 | 8.6, 8.2, 7.2 |
| Valkey | 7.2 | 9.0, 8.1, 7.2 |

On Google Cloud, Redis `8.x` runs Redis 8.2, `7.x` runs 7.2 and `6.x` runs 6.2. Databases created on a version that's no longer offered (for example PostgreSQL 15 or older) keep running, but you can't create new ones on it. You can't change a database's version after you create it: to upgrade, create a database on the new version and move the data with the engine's dump tools (see [Import and export](https://docs.sevalla.com/databases/import-export/postgresql.md)).

PostgreSQL databases can have the pgvector and PostGIS extensions turned on when you create them. See [Create a database](https://docs.sevalla.com/databases/create.md#database).

To run an engine Sevalla doesn't offer, deploy it as an [application from a Dockerfile](https://docs.sevalla.com/applications/builds/dockerfile.md) with a [persistent disk](https://docs.sevalla.com/applications/disks.md).

## Sizes

A database's size sets its CPU, memory and storage together. Prices are per month (730 hours), before tax; Sevalla bills by the second while the database runs. See [Pricing](https://docs.sevalla.com/billing/pricing.md).

| Size | CPU | Memory | Storage | Price per month |
| - | - | - | - | - |
| DB1 | 0.25 CPU | 0.25 GB | 1 GB | \$5 |
| DB2 | 0.5 CPU | 2 GB | 5 GB | \$34 |
| DB3 | 1 CPU | 4 GB | 10 GB | \$65 |
| DB4 | 2 CPU | 8 GB | 20 GB | \$145 |
| DB5 | 4 CPU | 16 GB | 40 GB | \$310 |
| DB6 | 8 CPU | 32 GB | 60 GB | \$800 |
| DB7 | 14.5 CPU | 58 GB | 80 GB | \$1,200 |
| DB8 | 28.5 CPU | 108.5 GB | 90 GB | \$1,850 |
| DB9 | 58.5 CPU | 229 GB | 100 GB | \$3,250 |

* Creating or resizing a database needs a valid payment method on the company.
* MySQL and MariaDB on DB1 can run out of memory under production load. Use DB2 or larger for production.
* You can move a database to a larger size at any time from its **Settings** tab. Moving to DB7 or larger needs our support team. See [Database settings](https://docs.sevalla.com/databases/settings.md#update-the-name-or-size).

## Storage

Storage comes with the size: there's no separate storage to add. To get more storage, update the database to a larger size. Storage can grow but never shrink, so the dashboard doesn't offer sizes with less storage (or less memory) than the database has now. To move to a smaller size, create a smaller database and [restore a backup](https://docs.sevalla.com/databases/backups.md#restore-a-backup) into it or [import a dump](https://docs.sevalla.com/databases/import-export/postgresql.md).

The storage a database uses includes the engine's own files (indexes, logs, metadata), so it's always larger than the data you put in. Backups don't count toward it. Watch it on the **Overview** tab or in [Analytics](https://docs.sevalla.com/databases/analytics.md).

## How databases work

![A database runs with a persistent volume in a Kubernetes cluster in your location, where applications reach it over an internal connection by its private hostname. Clients elsewhere connect through a TCP proxy at \<db>.ext.sevalla.app, behind an IP allowlist, and Sevalla backs it up daily, keeping the backups or sending them to your own S3 bucket.](https://assets.sevalla.com/brand/diagrams/docs/database-hosting-light.svg)

Each database runs as its own container on Sevalla's Kubernetes cluster in the location you choose, with its data on a persistent volume. See [Infrastructure](https://docs.sevalla.com/platform/infrastructure.md).

* **Internal connection.** Applications in the same location reach the database over the private network on its internal hostname and the engine's default port. An application needs an internal connection to the database first; the connection can also add the credentials to the application's environment variables. See [Connect an application](https://docs.sevalla.com/databases/connect.md#connect-an-application).
* **External connection.** Off by default. When you turn it on, the database gets a public hostname and port that any client on the internet can use with the database's user and password. You can limit it to IP addresses you choose. See [Enable the external connection](https://docs.sevalla.com/databases/connect.md#enable-the-external-connection).
* **TLS.** Databases accept TLS connections, verified with a CA certificate of their own. New databases have TLS on; older ones get it with one click, and it can't be turned off. See [Encrypt connections with TLS](https://docs.sevalla.com/databases/connect.md#encrypt-connections-with-tls).
* **Database studio.** The **SQL studio** (or **Redis studio**) tab connects from inside Sevalla, so it works without the external connection. See [Database studio](https://docs.sevalla.com/databases/studio.md).
* **One database, one user.** Each database server has the one database and the one user you set when you create it. The user isn't a superuser, so you can't create more databases or users on the same server: create another database instead. Redis and Valkey have a password and no user.
* **Backups.** Databases in Google Cloud locations get a snapshot every day, plus up to 5 manual ones. Databases in OCI locations back up as dumps to S3-compatible backup targets you add, such as a Sevalla bucket. See [Backups](https://docs.sevalla.com/databases/backups.md).

## Statuses

The dashboard shows a database's status on its page and in the list. The API returns the value in the second column.

| Status | API value | What it means |
| - | - | - |
| **Creating** | `creating` | Sevalla is starting the database. It takes a few minutes. |
| **Ready** | `ready` | The database is running and accepts connections. |
| **Updating** | `updating` | A resize or restart is running. |
| **Updating external connection** | `updatingExternalConnection` | The external connection is being turned on or off. |
| **Changing password** | `passwordChange` | The new password is being applied. The database is unavailable for a few minutes. |
| **Password change failed** | `passwordChangeFailed` | The password wasn't changed. Try again. |
| **Restoring backup** | `restoring` | A backup is being restored into the database. |
| **Restore failed** | `restoringFailed` | The last restore didn't finish. See the [restore history](https://docs.sevalla.com/databases/backups.md#restore-history). |
| **Error** | `error` | The database isn't healthy. Try a [restart](https://docs.sevalla.com/databases/settings.md#restart-the-database). |
| **Deleting** | `deleting` | The database is being deleted. |
| **Deletion failed** | `dbDeletionFailed` | Sevalla couldn't delete the database. Contact support. |
| **Suspended** | `isSuspended: true` | The database is stopped. See [Suspend a database](https://docs.sevalla.com/databases/settings.md#suspend-a-database). |

Most actions wait while a change is running: while the status is **Creating**, **Updating**, **Updating external connection**, **Changing password**, **Restoring backup** or **Deleting**, the dashboard disables them and says why.

## Limits

| Limit | Value |
| - | - |
| Databases per company | No limit |
| Databases and users per database server | 1 database, 1 user |
| Manual snapshot backups (Google Cloud) | 5 per database, kept 14 days |
| Automatic snapshot backups (Google Cloud) | 1 per day, kept 7 days |
| Backup targets (OCI) | 5 per database |
| Manual dump backups (OCI) | 5 per backup target |
| Internal connections | Only between services in the same location |
| Size changes | Up only; DB7 and larger through support |
| Metrics history | 60 days |

## API and CLI

| Task | API | CLI |
| - | - | - |
| List databases | [List databases](https://api-docs.sevalla.com/v3/databases/list-databases) | `sevalla databases list` |
| Get a database | [Get database](https://api-docs.sevalla.com/v3/databases/get-database) | `sevalla databases get <id>` |
| List sizes | [List database resource types](https://api-docs.sevalla.com/v3/resources/list-database-resource-types) | `sevalla resources db-types` |
| List locations | [List clusters](https://api-docs.sevalla.com/v3/resources/list-clusters) | `sevalla resources clusters` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.