# .Opendistro\_Security Index Does Not Persist Container Restarts

**URL:** <https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809>\
**Category:** Security\
**Created:** [May 31, 2019, 4:29pm UTC](https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809 "2019-05-31T16:29:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![majster](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@majster](https://forum.opensearch.org/u/majster)\
**Post date:** [May 31, 2019, 4:29pm UTC](https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809/1 "2019-05-31T16:29:40Z")

</div>

After we initialize the index, if we restart our containers, the index is no longer initialized. Is this expected behavior? Shouldn’t it be stored persistently like any other index so that it survives new container deployments?

Mike

---

<div class="post-metadata">

**Author:** ![kv\_hrishikesh](https://avatars.discourse-cdn.com/v4/letter/k/e5b9ba/32.png) [@kv\_hrishikesh](https://forum.opensearch.org/u/kv_hrishikesh)\
**Post date:** [July 2, 2020, 6:30am UTC](https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809/2 "2020-07-02T06:30:54Z")

</div>

Just a comment here that even if the message is seen, it does not make me run securityadmin.sh again. I had run just once.

---

<div class="post-metadata">

**Author:** ![mfs](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@mfs](https://forum.opensearch.org/u/mfs)\
**Post date:** [July 2, 2020, 3:37pm UTC](https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809/3 "2020-07-02T15:37:43Z")

</div>

Having the exact same problem, anyone found a solution?

```
[2020-07-02T15:27:47,667][INFO][c.a.o.s.OpenDistroSecurityPlugin] [elasticsearch-master-0] Node started

7/2/2020 5:27:47 PM [2020-07-02T15:27:47,667][INFO][c.a.o.s.c.ConfigurationRepository] [elasticsearch-master-0] Check if .opendistro_security index exists ...

7/2/2020 5:27:47 PM [2020-07-02T15:27:47,667][INFO][c.a.o.s.c.ConfigurationRepository] [elasticsearch-master-0] .opendistro_security index does not exist yet, so we create a default config

```

---

<div class="post-metadata">

**Author:** ![Anthony](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/anthony/32/9939_2.png) [@Anthony](https://forum.opensearch.org/u/Anthony)\
**Post date:** [March 16, 2021, 9:06am UTC](https://forum.opensearch.org/t/opendistro-security-index-does-not-persist-container-restarts/809/4 "2021-03-16T09:06:35Z")

</div>

Hi All, The containers need to be mapped to a persistent volume to save the security index together with other data, if during restart of containers the volume is wiped clean then the security index is re-created again. How are you running the containers? Is it using helm? Also which odfe version are you using?
