# Elastic Agent - State persistence in Docker

**URL:** <https://discuss.elastic.co/t/elastic-agent-state-persistence-in-docker/294352>\
**Category:** Beats\
**Tags:** docker, elastic-agent\
**Created:** [January 14, 2022, 3:03am UTC](https://discuss.elastic.co/t/elastic-agent-state-persistence-in-docker/294352 "2022-01-14T03:03:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![nemhods](https://avatars.discourse-cdn.com/v4/letter/n/48db29/32.png) [@nemhods](https://discuss.elastic.co/u/nemhods)\
**Post date:** [January 14, 2022, 9:02pm UTC](https://discuss.elastic.co/t/elastic-agent-state-persistence-in-docker/294352/2 "2022-01-14T21:02:47Z")

</div>

A while ago I asked this, and the answer was:

> For the persistence: Both ways should work. There is one issue we are currently working on for the fresh enrollment each time: The list of Elastic Agent in Fleet keeps getting longer and is not automatically cleaned up. The concept we have in mind to solve this is ephemeral agents which is agent which automatically are unenrolled after some time of inactivity.

> [@Fleet Server installation options](https://discuss.elastic.co/t/fleet-server-installation-options/274261/5):
>
> Thanks for sharing all the details also for others here! @blaker Could you take a look at the CA issues? For the persistence: Both ways should work. There is one issue we are currently working on for the fresh enrollment each time: The list of Elastic Agent in Fleet keeps getting longer and is not automatically cleaned up. The concept we have in mind to solve this is ephemeral agents which is agent which automatically are unenrolled after some time of inactivity.

Not sure if anything has changed since.

---

_[View the full topic](https://discuss.elastic.co/t/elastic-agent-state-persistence-in-docker/294352)._
