# Database

> Connect Stackable Cockpit to its PostgreSQL database and configure TLS for the connection.

Cockpit stores its data in a PostgreSQL database. It creates and migrates its tables on startup.

```yaml
database:
  host: postgresql
  port: 5432
  name: cockpit
  user: cockpit
  password:
    secretKeyRef:
      name: cockpit
      key: database-password
  tls:
    mode: verify-full (1)
```

(1) `verify-full` (default), `require` (encrypt without verification) or `disable`.

For a PostgreSQL server with a private CA, see [CA certificates](https://docs.stackable.tech/home/stable/cockpit/installation/helm/index.md).
