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

# Databases

> Provision and connect the PostgreSQL database a settler agent depends on.

The settler agent stores settlement state in PostgreSQL 17. You provision, maintain, and back up your own database — Atum does not host databases for operators.

## Connection string

```
postgresql://username:password@hostname:port/database?options
```

Set this as `DATABASE_URL` in your `.env`.

## Production recommendations

| Setting            | Recommendation                             |
| ------------------ | ------------------------------------------ |
| PostgreSQL version | 17                                         |
| Instance type      | `db-perf-optimized-N-4` tier or equivalent |
| Storage            | 100 GB SSD minimum                         |
| Backup             | Automated daily backups                    |
| Monitoring         | Enable query performance insights          |

## Cloud database services

<Tabs>
  <Tab title="AWS RDS">
    ```bash theme={null}
    DATABASE_URL=postgresql://admin:password@your-db.abc123.us-east-1.rds.amazonaws.com:5432/settler_agent
    ```

    Recommended settings:

    * Instance: db.r6g.xlarge (4 vCPU, 32 GB RAM)
    * Storage: 100 GB gp3
    * Multi-AZ: enabled
  </Tab>

  <Tab title="GCP Cloud SQL">
    ```bash theme={null}
    DATABASE_URL=postgresql://user:password@10.0.0.2:5432/dbname?host=/cloudsql/project:region:instance
    ```

    Recommended settings:

    * Machine: db-custom-4-26624 (4 vCPU, 26 GB RAM)
    * Storage: 100 GB SSD
    * High availability: enabled
  </Tab>

  <Tab title="Azure Database">
    ```bash theme={null}
    DATABASE_URL=postgresql://user@server:password@server.postgres.database.azure.com:5432/dbname?sslmode=require
    ```

    Recommended settings:

    * Tier: General Purpose
    * Compute: 4 vCores
    * Storage: 128 GB
  </Tab>
</Tabs>
