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

# Requirements

> Prerequisites for a self-hosted Oso for Agents deployment.

## System requirements

The minimum system requirements per stack are:

* CPU: 2 core
* Memory: 4GB RAM
* Disk: 10GB

## PostgreSQL

Bring two PostgreSQL databases; a single server hosting both is fine. Give each a standard `postgresql://user:pass@host[:port]/dbname` URL — the `dbname` in that URL is the database the stack uses, for example `control` and `agent_events`.

| Variable                    | What it holds                               |
| --------------------------- | ------------------------------------------- |
| `CONTROL_DATABASE_URL`      | Config, tenants, and authentication.        |
| `AGENT_EVENTS_DATABASE_URL` | Agent activity: events, alerts, detections. |

Both databases must exist before the first `docker compose up` — the stack does not create them. Create them with an administrative role:

```bash theme={null}
psql "postgresql://admin:pass@host/postgres" -c 'CREATE DATABASE control'
psql "postgresql://admin:pass@host/postgres" -c 'CREATE DATABASE agent_events'
```

The administrative role is only for this one-time creation. The role in the `.env` URLs needs no `CREATEDB`, just access to those two databases.

<Note>
  For the minimum privileges the stack's database user needs, see [Security → Database least privilege](/docs/oso-for-agents/self-hosting/security#database-least-privilege).
</Note>

## OIDC identity provider

You need an OIDC identity provider — Okta, Entra ID, Google Workspace, or similar — where you can register an OAuth client for Oso. You set the specific values during [installation](/docs/oso-for-agents/self-hosting/installation#authentication-oidc).
