# Elasticsearch keystore file regenerate

**URL:** <https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [December 8, 2021, 6:24am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185 "2021-12-08T06:24:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![suvro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/suvro/32/98532_2.png) [@suvro](https://discuss.elastic.co/u/suvro)\
**Post date:** [December 8, 2021, 6:24am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185/1 "2021-12-08T06:24:18Z")

</div>

is there any way to regenerate Elasticsearch.keystore file? I have deleted it by mistake.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [December 8, 2021, 6:25am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185/2 "2021-12-08T06:25:27Z")

</div>

Welcome to our community! 😃

Can you copy it from another node?

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [December 8, 2021, 6:44am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185/3 "2021-12-08T06:44:55Z")

</div>

You can create a new keystore with `elasticsearch-keystore create`  
But if you want to populate it with the settings that were previously in it, then you'll need to get your hands on a backup copy (e.g. from another node as @warkolm suggests).

---

<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:** [January 5, 2022, 6:45am UTC](https://discuss.elastic.co/t/elasticsearch-keystore-file-regenerate/291185/4 "2022-01-05T06:45:08Z")

</div>

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