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

# Manage PostgreSQL databases in the DBHost dashboard

> Create, connect, share, stop, delete and recover DBHost databases from the dashboard, and find each setting on the database detail page.

## Creating a database

1. Click **New database** from the dashboard
2. Enter a **Name**. DBHost generates the internal PostgreSQL identifier
3. Choose an **Environment** and, where offered, **Backups** (daily or off).
   Production always keeps daily backups; see
   [Backups and retention](https://docs.dbhost.app/backups-and-retention.md)
4. Under **Database logins**, keep **Separate logins** (owner, runtime and
   read-only) or choose **One owner login**
5. Check the summary on the right and click **Create database**

DBHost then opens the database page with readiness state, the connection
string and examples for `psql`, Node.js, Python, Prisma and Drizzle.

## SQL roles

Managed SQL roles are available on every plan for a new database. The owner
login makes schema changes; runtime and read-only have narrower privileges.
The owner can reveal or rotate each credential and add up to ten additional
roles with a **Read only**, **Read & write** or **Custom** profile.

Existing single-login databases keep their current login and can opt in to
additional roles from the detail page. After opt-in, DBHost-produced backups
of the same database can be restored in place. Cloning a database that has
additional roles is rejected with `409 LEGACY_OVERLAY_REQUIRES_V4`.

See [Database roles](https://docs.dbhost.app/guides/database-roles.md) for profiles, grants and the
rotate, revoke and remove actions.

## Dashboard list

The main dashboard shows every database you can access, as **Cards** or a
**List**. Your choice is remembered for your account.

* Owned databases appear normally
* Shared databases stay in the same list and include your effective access role
* Search and status filters help when the list grows
* **Active** and **Recently deleted** views separate live databases from
  deleted ones that can still be recovered
* Environment filters use one optional value: `production`, `staging`,
  `development`, or `other`

## Database detail page

Click any database to open its page. The header shows the name, status and
internal name, **Open SQL Explorer**, and a **Manage** menu with backups,
activity, lifecycle, password reset and owner-only deletion.

The page is split into tabs, each with its own link (`?tab=`):

| Tab | What it shows |
| - | - |
| **Overview** | Alerts, the connection string, storage and connections at a glance, recent changes |
| **Connect** | Every connection field with Copy, examples for `psql`, Node.js, Python, Prisma and Drizzle, TLS and the direct migration connection |
| **Roles** | Logins and extra roles, or additional roles on an existing single-login database; only where role management is available |
| **Backups** | Schedule, last backup, **Back up now**, recent backups and the preview lease; only for roles that can see backups |
| **Performance** | Usage, connection limit, query timeouts and extensions |
| **Access** | Team, allowed IPs and access changes |
| **Activity** | Connections, sampled live clients and changes |

Technical details such as the requested and loaded connection limit or
platform limits sit behind **Show details**. Errors and pending changes are
always shown.

DBHost stores tenant database passwords encrypted at rest. When you reveal or
reset a password, DBHost decrypts or replaces it for the authorized session.

Connections require TLS; use `sslmode=verify-full`, see
[TLS connections](https://docs.dbhost.app/guides/tls-connections.md).

## Connection limit and query timeouts

On the **Performance** tab, the owner can change the **Connection limit** (the
server connection cap: plan default, adjustable up to the plan maximum, shared
by all roles; the dashboard offers 2 up to your plan maximum) and the **Query timeouts** profile (Standard, Balanced or Short). Neither is a CPU, memory or disk quota.

For owners, **New-session timeout defaults by role** shows the PostgreSQL
catalog value each managed login inherits for query, lock and idle timeouts,
including role-specific overrides. It does not measure sessions already open
or settings an application changes with `SET`. A missing catalog value is shown
as an unread server default. PostgreSQL applies [role and database defaults](https://www.postgresql.org/docs/16/sql-alterrole.html)
at login; choosing a DBHost profile does not remove role overrides.
See [Connection limits and timeouts](https://docs.dbhost.app/guides/connection-limits-and-timeouts.md).

## Extensions

The **Performance** tab shows **Extensions** for the owner of an active
database. On databases with managed SQL roles, the owner can also install or
upgrade `citext`, `pg_trgm` and `pgcrypto`. Each one is marked **Supported**, **Testing** or **Not yet supported**. See
[PostgreSQL extensions](https://docs.dbhost.app/guides/postgres-extensions.md).

## Direct migration connection

For a database with managed SQL roles, the owner can request short-lived
direct access on `migrate.dbhost.app:5432` for migration tools under
**Schema migrations** on the **Connect** tab. See
[Direct database migrations](https://docs.dbhost.app/guides/direct-migrations.md).

## Preview lease

A preview database shows a short notice on **Overview** and a **Preview**
panel on the **Backups** tab with its expiry, backup choice and, after
deletion, its recovery deadline. See
[Preview databases](https://docs.dbhost.app/guides/preview-databases.md).

## Team access

The **Access** tab has a **Team** section. Owners and database admins can
**Invite** by email and assign one of these roles:

| Database role | Access |
| - | - |
| **admin** | Manage collaborators, lifecycle, credentials, backups, connection activity, and IP allowlist |
| **developer** | View credentials and view/download backups; cannot trigger, restore, or delete backups |
| **viewer** | View the detail page and connection activity, but cannot use the explorer, credentials, or write actions |

An existing DBHost user receives membership directly. An unknown email gets a
pending invitation with a seven-day expiry; resending replaces the previous
invitation. Acceptance during first sign-in is idempotent.

The owner is always shown separately and cannot be removed or downgraded
through the member flow. Team access controls the dashboard, not PostgreSQL
privileges; for those, see [Database roles](https://docs.dbhost.app/guides/database-roles.md).
Removing or lowering a member's role changes their DBHost dashboard access.
It does not invalidate a shared SQL password they may have copied. To stop
direct SQL access, the database owner must plan a password rotation and update
apps or other people that use that credential.

## Allowed IPs

The **Allowed IPs** section on the **Access** tab controls which client
networks can connect through PgBouncer.

* Add an **IP range** such as `203.0.113.0/24`, with an optional label
* If the list is empty, the database accepts connections from any IP
* As soon as you add one or more rules, only matching networks can connect
* **Remove** asks for confirmation and warns when it is the last rule

These rules affect database connections through port `6432`. They do not
change dashboard sign-in behavior.

## Start, stop, and restart

The **Manage** menu on the detail page includes lifecycle controls when your role allows it.

* **Start** re-enables a stopped database and waits until pooled client connections are usable again
* **Stop** asks for confirmation, then blocks new connections, ends active sessions, and moves the database into the `stopped` state
* **Restart** refreshes the pooled runtime without deleting the database

Stopping a database is operational, not destructive. Data remains on disk.

## Activity

The **Activity** tab shows **Connections** (verified events for 7 days, with
daily totals behind a disclosure), **Sampled live clients** (a sample of
PgBouncer clients with username, client IP, application name and time) and
**Changes** with a link to the full history. See
[Connection history](https://docs.dbhost.app/dashboard/connection-history.md).

## SQL Explorer

Each database has an **Open SQL Explorer** button in its header. The owner can browse `public`
tables and run one read-only `SELECT` or `EXPLAIN SELECT` statement at a time.
See [Data Explorer](https://docs.dbhost.app/dashboard/explorer.md) for the editor, saved queries and
guardrails.

## Resetting a password

If you need a new password:

1. Go to the database detail page and open **Manage**
2. Click **Reset password** and confirm
3. A new password is generated and the old one stops working immediately

On a database with managed SQL roles, rotate the specific role instead; see
[Database roles](https://docs.dbhost.app/guides/database-roles.md).

> [!WARNING]
>
> All active connections using the old password will be disconnected. Update
> your application's connection string before resetting.

## Deleting a database

Owners can select **Delete database** from the database's **Manage** menu. Database admins, developers and viewers cannot delete a database.

The confirmation dialog requires the exact internal database name. DBHost then
creates and verifies a deletion backup, disconnects the database and moves it
to **Recently deleted**.

> [!CAUTION]
>
> Deletion immediately disconnects the database. Confirm the exact internal
> name and make sure dependent applications are prepared before continuing.

## Deleted database recovery

For seven days after deletion, the **Recently deleted** card shows the
deletion time, the permanent-deletion deadline and the verified deletion
backup. The owner can:

* download the deletion backup, regardless of quota
* recover the database when an active database slot is available

Deleted databases do not count toward active quota but keep their name
reserved. Recovery restores the previous team memberships, IP allowlist and
still-existing selected-database API-key bindings. Missing users or keys are
skipped with a warning; pending invitations are not restored. A recovered
preview starts a new 24-hour lease.

After seven days, DBHost permanently deletes the database and its deletion
backup automatically. See [Backups and retention](https://docs.dbhost.app/backups-and-retention.md).

## Database statuses

| Status | Meaning |
| - | - |
| **active** | Running and accepting connections |
| **creating** | Being provisioned (usually seconds) |
| **stopped** | Provisioned but not accepting new pooled connections |
| **deleting** | Being removed |
| **error** | Something went wrong during provisioning |


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