Current security model
DBHost separates the control plane from the data plane:- The control plane handles auth, dashboard actions, API keys, and metadata
- The data plane runs PostgreSQL, PgBouncer, backups, and the internal agent that performs database operations
Access and authentication
- Dashboard access uses Clerk authentication
- REST API access on Pro and Business uses DBHost API keys
- API keys are scoped either to the full account or to selected databases
- Selected-database keys cannot create databases or operate outside their assigned scope
- The internal agent is not a customer auth surface; it is called by the control plane with separate internal credentials
Guarded SQL exploration
The in-dashboard SQL Explorer is intentionally tighter than a normal database client:- owner-only
- read-only
- limited to the
publicschema - executed through a dedicated explorer role
- validated before queries run
Abuse resistance
DBHost now adds basic server-side abuse controls forcurl, scripts, bots, and direct HTTP clients:
- request-size limits on public API routes
- rate limiting on public API routes
- auth-failure and abuse logging at the edge
- host firewall rules around the data plane
Temporary blocks after repeated failed logins
If one IP address sends 30 or more failed logins to a database connection (port6432) within 10 minutes, DBHost blocks that address on port 6432
only. Nothing else is affected: the dashboard, the API and every other port
stay reachable from that address.
- The first block lasts 5 minutes and lifts by itself. A repeat block within a day lasts 15 minutes, which is the longest block there is.
- Common cause: you rotated a database password, and an app instance or retry loop still uses the old one. Update every client to the new password. Connections work again as soon as the block lifts.
- Addresses shared by many apps (serverless platforms such as Vercel) can be blocked by failures from another app on the same address. The block is short, and it clears without any action from you.
- Successful logins are never counted, and a block never removes data or changes your database.
CORS is not treated as a security boundary. Browser origin checks help with
browser behavior, but direct HTTP clients still need proper authentication and
server-side controls.
Operational safeguards
- every application connection goes through PgBouncer on port
6432with required TLS (connect withsslmode=verify-full); the only direct path is a short-lived, IP-restricted migration lease onmigrate.dbhost.app:5432 - per-database IP allowlists are enforced at the pool layer
- SQL roles and a per-database PgBouncer server cap limit access and pooled connections; shared CPU, memory, and disk are not hard-isolated per customer
- production databases always receive daily logical backups kept for 30 days; staging, development, other and preview databases follow their backup choice (details)
- on-demand backups can be triggered before risky changes
- tenant database passwords are encrypted at rest in the control plane
- destructive operations require a managed-registry binding, a matching operation ID and database ID/name binding, an explicit capability, and a target outside the permanent protected list
dbhost,postgres,template0,template1, and the agent auth/registry databases are permanently protected from drop, rename, restore, swap, and purge operations; there is no override
Honest limits
DBHost is a strong fit for:- small SaaS apps
- internal tools
- staging environments
- agencies managing several app databases
- point-in-time recovery (PITR)
- high availability, failover or read replicas
- a service level agreement (SLA)
- multi-region hosting
- restore of uploaded dumps; you import them yourself with
psqlorpg_restore - cloning of databases that have additional roles
- extensions other than
citext,pg_trgmandpgcrypto - a compliance certification
Next steps
- Read the public security overview
- Review API authentication
- Explore core concepts