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

# Databases

> One managed Postgres database per project, credentials shown once, rotatable on demand.

Every project can provision exactly one managed Postgres database. It lives
at the branded endpoint `db.korve.app`; you never see (or manage) the
machinery behind it.

## Provision

```bash theme={null}
korve database provision
```

```text theme={null}
postgres://u_4f2a...:••••@db.korve.app:5432/p_storefront
```

The full connection string — **including the password — is shown exactly
once** and is never retrievable later. Store it immediately, typically as a
project [environment variable](/primitives/environment-variables):

```bash theme={null}
korve env set DATABASE_URL='postgres://...'
```

API: `POST /v1/orgs/{orgId}/projects/{projectId}/database` (`admin` role,
active billing). MCP: `await korve.database.provision({ orgId, projectId })`.
See the [Database API](/api-reference/database).

## Inspect

```bash theme={null}
korve database show
```

Returns status (`provisioning | ready | failed`), host, port, database
name, and user — never the password.

## Rotate

```bash theme={null}
korve database rotate
```

Issues a new password and prints the new connection string once. **The old
password stops working immediately** — update `DATABASE_URL` and redeploy
in the same breath.

## Delete

```bash theme={null}
korve database delete    # prompts; owner role required
```

Deletes the database and all of its data. This cannot be undone.

## Connecting

Connect with any standard Postgres client using the connection string.

* Connections work from anywhere — external runtimes, `always-on` apps,
  and code inside `scale-to-zero` apps alike. TLS verifies fully against
  `db.korve.app`.

## Billing

The project database meters `database.compute` (per month) and
`database.storage` (per GB-month) — exact prices on the
[rate card](/primitives/budgets-and-usage#the-rate-card).
