# Enterprise search installation gives API key error

**URL:** <https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541>\
**Category:** Elastic Search\
**Tags:** elastic-app-search\
**Created:** [September 7, 2021, 1:51pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541 "2021-09-07T13:51:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [September 7, 2021, 1:51pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541/1 "2021-09-07T13:51:18Z")

</div>

Hi,

I'm trying to install Elastic Enterprise Search on my system.

I have added necessary settings in elasticsearch.yml, enterprise-search.yml and kibana.yml.

But when i run,

```auto
ENT_SEARCH_DEFAULT_PASSWORD=PASSWORD bin/enterprise-search

```

I get the below error:  
**Elasticsearch API key service must be enabled. It is enabled automatically when you configure Elasticsearch to use TLS on the HTTP interface.Alternatively, you can explicitly enable the setting within Elasticsearch by opening config/elasticsearch.yml and adding:xpack.security.authc.api\_key.enabled: true**

But I have added **xpack.security.authc.api\_key.enabled: true** to my elasticsearch.yml file.  
Have restarted all services  
Don't get why still I'm this is giving error.  
Any suggestions for this?

---

<div class="post-metadata">

**Author:** ![casey](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/casey/32/68371_2.png) [@casey](https://discuss.elastic.co/u/casey)\
**Post date:** [September 7, 2021, 1:57pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541/2 "2021-09-07T13:57:55Z")

</div>

Hi Sandeep, thanks for trying out Enterprise Search.

Since the Enterprise Search solution requires security to be enabled for Elasticsearch (including the Elasticsearch API key service), you'll also have to add `xpack.security.enabled: true` to your `elasticsearch.yml` if you haven't already.

---

<div class="post-metadata">

**Author:** ![Sandeep\_Raju](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@Sandeep\_Raju](https://discuss.elastic.co/u/Sandeep_Raju)\
**Post date:** [September 7, 2021, 2:04pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541/3 "2021-09-07T14:04:32Z")

</div>

Hi Casey,  
@casey

I have enabled `xpack.security.enabled: true` in my `elasticsearch.yml`.  
Still I'm getting the error.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 5, 2021, 2:05pm UTC](https://discuss.elastic.co/t/enterprise-search-installation-gives-api-key-error/283541/4 "2021-10-05T14:05:20Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
