# How to set up ElasticSearch?

**URL:** <https://community.temporal.io/t/how-to-set-up-elasticsearch/53>\
**Category:** Community Support\
**Tags:** elasticsearch\
**Created:** [July 2, 2020, 8:42pm UTC](https://community.temporal.io/t/how-to-set-up-elasticsearch/53 "2020-07-02T20:42:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![samar](https://sea2.discourse-cdn.com/flex016/user_avatar/community.temporal.io/samar/32/12_2.png) [@samar](https://community.temporal.io/u/samar)\
**Post date:** [July 6, 2020, 2:00am UTC](https://community.temporal.io/t/how-to-set-up-elasticsearch/53/4 "2020-07-06T02:00:16Z")

</div>

Hey @skrul,

You can enable ElasticSearch integration with Temporal by providing the correct configuration in service config for Temporal Server. There are two main configs you need understand to be able to configure ElasticSearch as the visibility store.

1. **Persistence**  
Update the persistence section in config so Temporal server can connect to ElasticSearch store for visibility needs. First specify the key for your datastore under ‘advancedVisibilityStore’ key:  
`advancedVisibilityStore: es-visibility`  
Also specify ElasticSearch connection information under datastores with the key specified for advancedVisibilityStore:

```auto
datastores:
    ...
    es-visibility:
      elasticsearch:
        url:
          scheme: "http"
          host: "127.0.0.1:9200"
        indices:
          visibility: temporal-visibility-dev

```

1. **Kafka**  
Next configure the kafka topic which is going to be used for shipping visibility records for workflow executions to processor running on the worker role. ESProcessor on worker role consumes these messages from Kafka topic and writes them to ElasticSearch in a batched write.  
First specify `applications` key in the config with `visibility` section which contains the name for main and dlq Kafka topic:

```auto
kafka:
  ...
  applications:
    visibility:
      topic: temporal-visibility-dev
      dlq-topic: temporal-visibility-dev-dlq

```

Also specify the config section on with connection information to Kafka broker and mapping for each topic to Kafka broker.

```auto
kafka:
  ...
  clusters:
    test:
      brokers:
        - 127.0.0.1:9092
  topics:
    temporal-visibility-dev:
      cluster: test
    temporal-visibility-dev-dlq:
      cluster: test

```

Here is how the entire Kafka config should look like.

```auto
kafka:
  tls:
    enabled: false
  clusters:
    test:
      brokers:
        - 127.0.0.1:9092
  topics:
    temporal-visibility-dev:
      cluster: test
    temporal-visibility-dev-dlq:
      cluster: test
  applications:
    visibility:
      topic: temporal-visibility-dev
      dlq-topic: temporal-visibility-dev-dlq

```

And finally in case you want to use [Temporal helm chart](https://github.com/temporalio/temporal-helm-charts#cassandra-and-elasticsearch) which does all of that for you.

---

_[View the full topic](https://community.temporal.io/t/how-to-set-up-elasticsearch/53)._
