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

# Enable SmithDB on self-hosted LangSmith

> Run SmithDB alongside ClickHouse on a self-hosted LangSmith Kubernetes installation.

> [!NOTE]
>
> SmithDB is an opt-in datastore for self-hosted LangSmith. ClickHouse is required on LangSmith 0.16 and remains the default on 0.17. Do not disable ClickHouse on any version below 0.17. The minimum LangSmith version depends on your cloud. See [Cloud support](#cloud-support).

SmithDB is a columnar datastore built for agent trace data: deeply nested spans, multi-modal content, and spans that stay open for hours. It keeps durable data in object storage with a per-pod disk cache, and serves LangSmith trace ingestion and queries alongside the existing ClickHouse datastore.

Some LangSmith features, such as the Trajectory view, trajectory evaluators, and the filter query syntax, require SmithDB. See [SmithDB feature availability](https://docs.langchain.com/langsmith/self-host-smithdb-features.md).

> [card] [Feature availability](https://docs.langchain.com/langsmith/self-host-smithdb-features.md)
>
> See which features need SmithDB and what keeps working on ClickHouse.

> [card] [Install SmithDB](https://docs.langchain.com/langsmith/self-host-smithdb-install)
>
> Stage infrastructure, deploy SmithDB services, enable dual ingestion, and switch queries after validation.

> [card] [Prepare supporting infrastructure](https://docs.langchain.com/langsmith/self-host-smithdb-infrastructure.md)
>
> Provide a dedicated PostgreSQL metastore, object storage, and cache storage.

> [card] [Configure for scale](https://docs.langchain.com/langsmith/self-host-smithdb-scale.md)
>
> Choose a tested resource tier and size SmithDB workloads.

> [card] [Configure observability](https://docs.langchain.com/langsmith/self-host-smithdb-observability.md)
>
> Scrape SmithDB metrics and export logs and traces to your stack.

> [card] [Migrate historical data](https://docs.langchain.com/langsmith/self-host-smithdb-migrate.md)
>
> Backfill ClickHouse history into SmithDB before query cutover.

> [card] [Essential SmithDB metrics](https://docs.langchain.com/langsmith/self-host-smithdb-metrics.md)
>
> Metrics to watch on each SmithDB component and how to read them.

> [card] [Troubleshoot SmithDB](https://docs.langchain.com/langsmith/self-host-smithdb-troubleshooting.md)
>
> Gather context, disable SmithDB, or reset a deployment safely.

## Cloud support

You can enable SmithDB on any supported LangSmith Kubernetes installation, whether it is brand new or already serving traffic. [Self-host LangSmith on Kubernetes](https://docs.langchain.com/langsmith/kubernetes.md) covers the base installation; the guides above cover everything SmithDB adds on top of it.

Examples in these guides cover managed Kubernetes on AWS, GCP, and Azure. They do not cover self-managed clusters.

| Cloud | Minimum version |
| - | - |
| AWS (EKS) | LangSmith 0.16, Helm chart `0.16.14` or later |
| GCP (GKE) | LangSmith 0.16, Helm chart `0.16.14` or later |
| Azure (AKS) | LangSmith 0.17 |

## Components

Enabling SmithDB in the default cluster mode adds the following workloads to your cluster. Three services cache trace data on disk, on a network-attached volume or local SSD; the other two services are small and run on general compute. See [Cache storage](https://docs.langchain.com/langsmith/self-host-smithdb-infrastructure.md#cache-storage). To run SmithDB as one pod instead, see [Choose a deployment mode](https://docs.langchain.com/langsmith/self-host-smithdb-scale.md#choose-a-deployment-mode). For what each component does and how it works with LangSmith, see [SmithDB architecture](https://docs.langchain.com/langsmith/self-host-smithdb-architecture.md).

| Component | Type | Disk cache | Scaling |
| - | - | - | - |
| Ingestion | Service | Yes | Horizontal |
| Query | Service | Yes | Horizontal |
| Compaction worker | Service | Yes | Horizontal |
| Compaction | Service | No | Single instance |
| Cluster manager | Service | No | Single instance |
| Metastore migration | Job | No | Runs once |
| Migration | Job, only if you [migrate historical data](https://docs.langchain.com/langsmith/self-host-smithdb-migrate.md) | No | Parallelism |

SmithDB keeps all data in object storage and the metastore. Its pods hold only copies of data and work in progress, so Kubernetes can replace any pod without data loss, and each component recovers automatically when it starts again. LangSmith keeps writes in Redis until SmithDB confirms them, and sends them again if they fail. If the metastore, object storage, or Redis is unavailable, writes wait until it recovers. A long outage can exceed the retry limit.

## Storage requirements

A self-hosted LangSmith installation uses PostgreSQL for operational data, Redis or Valkey for queuing and caching, and optional blob storage. Traces and feedback live in ClickHouse, in SmithDB, or in both while an installation runs dual ingestion. SmithDB adds its own metastore, object store, and cache storage.

On 0.17, a new installation can run SmithDB without ClickHouse; see [Install without ClickHouse](https://docs.langchain.com/langsmith/self-host-smithdb-install#install-without-clickhouse). Retiring ClickHouse from an existing installation is a separate procedure; contact LangChain through the [Support Portal](https://support.langchain.com/) before considering it.

For SDK method changes that work with both ClickHouse and SmithDB, see [Migrate to SmithDB-backed APIs](https://docs.langchain.com/langsmith/smithdb-sdk-migration.md).

***

[Connect these docs](https://docs.langchain.com/use-these-docs.md) to your agent of choice via MCP for real-time answers.

[Edit this page on GitHub](https://github.com/langchain-ai/docs/edit/main/src/langsmith/self-host-smithdb.mdx) or [file an issue](https://github.com/langchain-ai/docs/issues/new/choose).
