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

# Elasticsearch

> Set up Elasticsearch for LangWatch Hybrid deployments to enable scalable search and analysis of traces and agent evaluations.

### Introduction

This guide walks you through the process of preparing your environment for LangWatch's hybrid deployment. It uses your own Elasticsearch cluster for search and indexing. The instructions cover setup on Elastic Cloud.

> A screen-sharing session with LangWatch is strongly recommended to ensure everything is working as expected.

***

### Step-by-Step Setup Instructions

#### Elasticsearch Setup (Required)

LangWatch relies on Elasticsearch (or OpenSearch) for core functionality such as log indexing, analytics, and querying.

#### Create an Elasticsearch Cluster

* Go to **Elastic Cloud** on GCP or your preferred Elasticsearch provider.
* Create a new deployment with the following specs:

  * **Version:** 8.x (recommended)
  * **Template:** Search optimized
  * **Storage:** 45GB
  * **Availability Zones:** 2

#### After the deployment completes:

* Save the **Elasticsearch Endpoint** (e.g., `https://your-elasticsearch-host:9200`)
* Near **API Keys**, click **(+ New)** to create a new API key:
  * Name it something like `langwatch-api-key`
  * Assign **full access permissions**
  * **Copy the encoded API key**

***

#### Required Values for Deployment:

* **Elasticsearch URL**
* **API Key** with full permissions

> Once you have these, add them to your account on the **LangWatch settings page**, as shown in the image below.

<img src="https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=fd8c2f3e357e5ac502801ee85f84484f" alt="Elasticsearch Setup" data-og-width="1800" width="1800" data-og-height="1286" height="1286" data-path="images/settings-hybrid.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=280&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=272195bfb08e8b55461b3f371533a0c7 280w, https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=560&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=3fdab57fce872fad1b27f0183f910ce2 560w, https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=840&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=81f2d63744004210bbc8b5a86c252851 840w, https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=1100&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=897d6d64a7d34b75819ce6bf1bdbb01f 1100w, https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=1650&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=c23d00ec76acbf2901faff804b783081 1650w, https://mintcdn.com/langwatch/UFU4yqeW-QWPi3A0/images/settings-hybrid.png?w=2500&fit=max&auto=format&n=UFU4yqeW-QWPi3A0&q=85&s=b4af958a1aaf8ac66e566629fb298db4 2500w" />

> If using OpenSearch instead of Elastic Cloud, the setup steps are similar—just ensure the endpoint and API key/token support write and search operations.
