# Required components (/self-hosting/architecture/required-components)

| Component | Used for |
| --- | --- |
| Kubernetes, with an ingress controller or the Gateway API | Runs the [Helm chart](./helm-chart.mdx) |
| PostgreSQL 16 or 17, with the `pgvector` and `pgcrypto` extensions | The main database |
| Redis | Queues and caches |
| An S3-compatible bucket | Files, such as those of custom fronts |
| An SMTP server | Invitations, password resets and email verification |
| An LLM endpoint | The assistant |
| An embeddings endpoint | Searching your data model |
| DNS names and TLS certificates | See [Network requirements](../authentication-and-networking/network-requirements.mdx) |

## PostgreSQL [#postgresql]

Toucan AI connects with two users of the same database:

- **An admin user**, used only by the migrations. They create the extensions and some roles, so this
  user needs the rights to: a superuser, or your provider's equivalent.
- **An app user**, for everything else. Row-level security keeps each organization's data apart on
  this user's queries, so it must be neither a superuser nor `BYPASSRLS`. Create it with a password;
  the migrations grant it its privileges.

## LLM and embeddings [#llm-and-embeddings]

The assistant runs on one of these providers, which `AI_DEFAULT_PROVIDER` selects in
`backend.config`:

| Provider | `AI_DEFAULT_PROVIDER` | In the secret | In `backend.config` |
| --- | --- | --- | --- |
| Anthropic | `anthropic` | `ANTHROPIC_API_SECRET` | `ANTHROPIC_API_URL`, optional |
| Mistral | `mistral` | `MISTRAL_API_SECRET` | `MISTRAL_API_URL`, optional |
| OpenAI | `openai` | `OPENAI_API_SECRET` | |
| Scaleway | `scaleway` | `SCALEWAY_API_SECRET` | `SCALEWAY_PROJECT_ID` |
| An OpenAI-compatible endpoint, such as vLLM, Ollama or LiteLLM | `openai-compatible` | `OPENAI_COMPATIBLE_API_SECRET` | `OPENAI_COMPATIBLE_API_URL`, `OPENAI_COMPATIBLE_MODEL` |

With an OpenAI-compatible endpoint, the model must support tool calling. When you configure several
providers, each organization can choose its own in its settings.

Embeddings come from an OpenAI-compatible endpoint, configured on their own. The model must return
1024-dimension vectors, as `bge-m3`, `multilingual-e5-large` and `mistral-embed` do.

## What the chart can run itself [#what-the-chart-can-run-itself]

For an evaluation, the chart runs PostgreSQL, Redis and an S3 bucket ([Garage](https://garagehq.deuxfleurs.fr/))
next to Toucan AI: `postgresql.enabled`, `redis.enabled` and `objectStorage.enabled`, all on by default.

:::warning
Not for production: the bundled PostgreSQL encrypts the credentials of your data sources with a key
written in the chart, and its default passwords are in the chart too. It also comes from Bitnami's
PostgreSQL chart, which is deprecated, so it will not be upgraded.
:::

The chart can also run ClickHouse (`clickhouse.enabled`, off by default), which records how custom
fronts are used.
