# DBHost > Managed PostgreSQL hosting for developers: PgBouncer pooling, verify-full TLS, separate SQL roles, backups with 30-day retention, and API and CLI automation on paid plans. - [Introduction](https://docs.dbhost.app/introduction.md): DBHost is managed PostgreSQL hosting with PgBouncer pooling, daily backups, separate SQL roles, scoped API keys and a read-only SQL explorer. - [DBHost quickstart: your first PostgreSQL database](https://docs.dbhost.app/quickstart.md): Create a managed PostgreSQL database on DBHost in about two minutes, pick your SQL roles and connect with psql over verify-full TLS on port 6432. - [DBHost CLI reference](https://docs.dbhost.app/cli.md): Install the @dbhost-app/cli package and manage DBHost databases, backups, roles, extensions and access from the terminal on Pro and Business. - [DBHost core concepts: databases, pooling, backups, roles](https://docs.dbhost.app/concepts.md): How DBHost works: shared PostgreSQL host, PgBouncer pooling on port 6432, backups, API keys, team roles and customer webhooks explained. - [Limits and what DBHost does not offer](https://docs.dbhost.app/limits.md): Plan quotas, per-database connection and role limits, the shared host model, and features DBHost does not offer, such as PITR, replicas or an SLA. - [DBHost security model and honest limits](https://docs.dbhost.app/security.md): How DBHost protects your PostgreSQL data: verify-full TLS, scoped API keys, IP allowlists, encrypted credentials, backups and what it does not offer. - [Backups, retention and deletion](https://docs.dbhost.app/backups-and-retention.md): What DBHost backs up per environment, how long logical backups and snapshots are kept, and how deleted databases are recovered or purged. - [Connect to DBHost with verify-full TLS](https://docs.dbhost.app/guides/tls-connections.md): DBHost requires TLS; use sslmode=verify-full. Set up certificate verification for psql, node-postgres, Prisma, Drizzle and psycopg with a public CA. - [Next.js and PostgreSQL: Prisma, Drizzle or pg](https://docs.dbhost.app/guides/nextjs-postgres.md): Choose Prisma, Drizzle or node-postgres for a Next.js app on DBHost: pooled runtime queries on port 6432 and a direct connection for migrations. - [Next.js and Prisma with DBHost PostgreSQL](https://docs.dbhost.app/guides/nextjs-prisma.md): Connect Prisma Client to a pooled DBHost database from Next.js and run Prisma Migrate over the direct migration connection with the owner role. - [Next.js and Drizzle ORM with DBHost PostgreSQL](https://docs.dbhost.app/guides/nextjs-drizzle.md): Connect a Next.js app to DBHost with Drizzle ORM: pooled runtime queries on port 6432 and Drizzle Kit migrations over the direct connection. - [Next.js and node-postgres (pg) with DBHost](https://docs.dbhost.app/guides/nextjs-pg.md): Connect a Next.js app to DBHost with node-postgres: one shared pool on the pooled URL, verify-full TLS and a server-side query in a few steps. - [Run schema migrations over a direct connection](https://docs.dbhost.app/guides/direct-migrations.md): Run Prisma, Drizzle, Flyway, Rails or Django migrations over a short-lived direct TLS connection on migrate.dbhost.app:5432 while your app keeps PgBouncer. - [Database roles: owner, runtime and additional roles](https://docs.dbhost.app/guides/database-roles.md): Use DBHost managed SQL roles: owner for migrations, runtime for your app, read-only for reporting, plus up to ten additional roles per database. - [Connection limits and query timeouts](https://docs.dbhost.app/guides/connection-limits-and-timeouts.md): How DBHost's per-database PgBouncer server connection cap (plan default, adjustable up to the plan maximum) and the three fixed query timeout profiles work. - [Inactive databases](https://docs.dbhost.app/guides/inactive-databases.md): When DBHost pauses an inactive Free or development database, what happens to your data, and how to start it again. - [Supported PostgreSQL extensions: citext, pg_trgm, pgcrypto](https://docs.dbhost.app/guides/postgres-extensions.md): DBHost supports three PostgreSQL extensions: citext, pg_trgm and pgcrypto. Install or upgrade them from the dashboard, API or CLI. - [Restore a database from a DBHost backup](https://docs.dbhost.app/guides/restore-from-backup.md): Restore a DBHost database in place from one of its own verified backups, from the dashboard or the API, and what to expect during the cutover. - [Import your own SQL dump with psql or pg_restore](https://docs.dbhost.app/guides/restore-your-own-dump.md): DBHost does not accept uploaded dumps. Import .sql, .sql.gz or custom-format dumps yourself with psql or pg_restore using the owner role over TLS. - [Preview databases for CI and pull requests](https://docs.dbhost.app/guides/preview-databases.md): Create short-lived DBHost preview databases from CI with a 24-hour lease, renewals up to 72 hours, optional daily backup and 7-day recovery. - [Automate DBHost with the CLI and REST API](https://docs.dbhost.app/guides/cli-api-automation.md): Automate DBHost database tasks from scripts, CI and terminals on Pro and Business with scoped API keys, the dbhost CLI and JSON output. - [Self-Hosted Postgres vs DBHost for Small SaaS Teams](https://docs.dbhost.app/guides/self-hosted-postgres-vs-dbhost.md): Compare self-hosted PostgreSQL and DBHost on what small SaaS teams care about: pooling, backups, automation, limits and the time you spend on ops. - [Manage PostgreSQL databases in the DBHost dashboard](https://docs.dbhost.app/dashboard/databases.md): Create, connect, share, stop, delete and recover DBHost databases from the dashboard, and find each setting on the database detail page. - [Connection history and access audit](https://docs.dbhost.app/dashboard/connection-history.md): See verified PgBouncer connection events for 7 days, daily totals for 30 days and owner access changes for 90 days on each DBHost database. - [Account and database activity log](https://docs.dbhost.app/dashboard/activity.md): Review the activity log for your DBHost account and owned databases: who did what, when, and on which database, with search in the dashboard. - [Data Explorer: read-only SQL in the dashboard](https://docs.dbhost.app/dashboard/explorer.md): Browse public tables and run guarded read-only SELECT and EXPLAIN queries on your DBHost database from the dashboard, with saved queries. - [Database backups in the DBHost dashboard](https://docs.dbhost.app/dashboard/backups.md): Trigger, download, delete and restore DBHost database backups from the dashboard, and see which environments get a daily logical backup. - [Create and manage DBHost API keys](https://docs.dbhost.app/dashboard/api-keys.md): Create, scope, replace and revoke DBHost API keys on Pro and Business. Use selected-database keys for least privilege in CI and scripts. - [Account, billing and plan settings](https://docs.dbhost.app/dashboard/settings.md): Manage your DBHost account, compare Free, Pro and Business plan limits, upgrade or downgrade your plan and find your API key settings. - [DBHost REST API introduction](https://docs.dbhost.app/api-reference/introduction.md): Use the DBHost REST API on Pro and Business to create databases, run backups and restores, manage roles and automate CI with scoped API keys. - [DBHost API authentication with API keys](https://docs.dbhost.app/api-reference/authentication.md): Authenticate DBHost REST API and CLI requests with a Bearer API key. Choose selected-database or full-account scope on Pro and Business. - [Create a single-login database](https://docs.dbhost.app/api-reference/databases/create.md): Create a single-login DBHost PostgreSQL database through the API. For separate owner, runtime and read-only roles use managed-create. - [Create a database with managed SQL roles](https://docs.dbhost.app/api-reference/databases/managed-create.md): Create a DBHost database with separate owner, runtime and read-only roles through the API, with optional reservation before provisioning. - [List databases](https://docs.dbhost.app/api-reference/databases/list.md): List the DBHost databases visible to your API key, newest first. Selected-database keys only see the databases assigned to them. - [Get database](https://docs.dbhost.app/api-reference/databases/get.md): Get one DBHost database by ID through the API, including status, size, connection details and its effective scheduled backup policy. - [Start, stop or restart a database](https://docs.dbhost.app/api-reference/databases/lifecycle.md): Start, stop or restart a DBHost PostgreSQL database through the API. Stop blocks new connections and ends sessions; data is kept. - [Set database environment label](https://docs.dbhost.app/api-reference/databases/environment.md): Change a DBHost database's environment label to production, staging, development, other or none through the API. Backup schedule is unchanged. - [Delete database](https://docs.dbhost.app/api-reference/databases/delete.md): Delete a DBHost database through the API. DBHost verifies a deletion backup first, and the database can be recovered for seven days. - [Deleted databases: list, download, recover](https://docs.dbhost.app/api-reference/databases/deleted.md): List deleted DBHost databases, download their deletion backup and recover them within seven days through the API with a full-account key. - [Connection limits API: PgBouncer server cap](https://docs.dbhost.app/api-reference/databases/connection-limits.md): Read and change a DBHost database's PgBouncer server connection cap through the API. The default and maximum come from your plan. - [Query timeout defaults API](https://docs.dbhost.app/api-reference/databases/query-timeouts.md): Read and select a DBHost query timeout profile through the API: standard 60/10/30 s, balanced 30/3/15 s or short 15/1/5 s per session. - [IP allowlist API: list, add and remove CIDRs](https://docs.dbhost.app/api-reference/databases/network-allowlist.md): Manage which client networks can connect to a DBHost database through PgBouncer. An empty allowlist accepts connections from any IP. - [Extensions API: list, install and upgrade](https://docs.dbhost.app/api-reference/databases/extensions.md): Read the citext, pg_trgm and pgcrypto catalog for a DBHost database, then install or upgrade one extension as an idempotent operation. - [Direct migration connection API](https://docs.dbhost.app/api-reference/databases/migration-connection.md): Request, inspect and revoke short-lived direct access on migrate.dbhost.app:5432 for migration tools on a database with managed SQL roles. - [Connection events API: verified PgBouncer logins](https://docs.dbhost.app/api-reference/databases/connection-events.md): Page through 7 days of verified PgBouncer connection events and 30 days of daily totals for one DBHost database with a scoped API key. - [Access audit API: 90 days of access changes](https://docs.dbhost.app/api-reference/databases/access-audit.md): Read up to 100 owner-initiated role, credential, member and network changes from the last 90 days for one DBHost database through the API. - [Reset password](https://docs.dbhost.app/api-reference/databases/reset-password.md): Generate a new password for a single-login DBHost database through the API. The previous password stops working immediately. - [Managed roles API: list roles and reveal a credential](https://docs.dbhost.app/api-reference/databases/roles.md): List the owner, runtime and read-only logins of a DBHost database with managed SQL roles, and reveal one role's password through the API. - [Additional roles API for managed databases](https://docs.dbhost.app/api-reference/databases/custom-roles.md): Create, list, rename, reveal, rotate, revoke and delete up to ten additional PostgreSQL roles on a DBHost database with managed SQL roles. - [Rotate or revoke a managed database role](https://docs.dbhost.app/api-reference/databases/role-changes.md): API for rotating or revoking the owner, runtime or read-only login of a database with managed SQL roles without touching the other roles. - [Additional roles API for existing databases](https://docs.dbhost.app/api-reference/databases/additional-roles.md): API for opting an existing single-login DBHost database in to additional roles, then creating, rotating, revoking and restoring with them. - [Repair ownership](https://docs.dbhost.app/api-reference/databases/repair-ownership.md): Repair object ownership for supported legacy imports. Managed databases with protected roles use their grants manifest instead. - [Trigger backup](https://docs.dbhost.app/api-reference/backups/trigger.md): Start an on-demand pg_dump backup of a DBHost database through the API. The request returns an operation that you can poll until it finishes. - [List backups](https://docs.dbhost.app/api-reference/backups/list.md): List the available logical backups for one DBHost database, newest first, with filename, backup ID, size and creation time in the response. - [Download backup](https://docs.dbhost.app/api-reference/backups/download.md): Download one .sql.gz logical backup file of a DBHost database by filename through the API, for local storage or your own restore. - [Delete backup](https://docs.dbhost.app/api-reference/backups/delete.md): Delete one logical backup file of a DBHost database by filename through the API. Older S3 object versions expire under storage retention. - [Restore a single-login database from its backup](https://docs.dbhost.app/api-reference/backups/restore.md): Restore a single-login DBHost database in place from one of its own verified backups with a staged swap, a pre-restore backup and rollback. - [Restore a managed-roles database from its backup](https://docs.dbhost.app/api-reference/databases/managed-restores.md): Restore a DBHost database with managed SQL roles in place from one of its own verified backups, then advance the operation until it succeeds. - [Uploaded dump restore is not available](https://docs.dbhost.app/api-reference/backups/restore-upload.md): DBHost does not restore uploaded .sql, .sql.gz, .dump or .backup files. The routes return 409; import dumps yourself with psql or pg_restore. - [Database members API: add, change role, remove](https://docs.dbhost.app/api-reference/collaboration/members.md): List, add, update and remove DBHost database collaborators with a full-account API key. Roles are admin, developer and viewer. - [Database invitations API: list, resend, revoke](https://docs.dbhost.app/api-reference/collaboration/invitations.md): List, resend and revoke DBHost database invitations for people without an account. Needs a full-account API key; invitations last 7 days. - [Webhooks API: operation events and signatures](https://docs.dbhost.app/api-reference/webhooks.md): Register HTTPS endpoints for DBHost operation events, rotate signing secrets and verify the HMAC-SHA256 signature on each delivery. - [Preview CI lifecycle API](https://docs.dbhost.app/api-reference/previews/ci-lifecycle.md): Create, inspect, renew, change backup choice for and delete preview databases from CI with a namespace-bound dbhci_ key on Pro and Business. - [Get operation](https://docs.dbhost.app/api-reference/operations/get.md): Read the status of an asynchronous DBHost operation such as a backup, restore, delete or recover by its operation ID through the API. ## OpenAPI Specs - [role-changes.openapi](/api-reference/databases/role-changes.openapi.yaml) This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.