# EDOT otel collector not working on read-only filesystem

**URL:** <https://discuss.elastic.co/t/edot-otel-collector-not-working-on-read-only-filesystem/385897>\
**Category:** Elastic Agent\
**Created:** [April 15, 2026, 9:45am UTC](https://discuss.elastic.co/t/edot-otel-collector-not-working-on-read-only-filesystem/385897 "2026-04-15T09:45:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jaybee18](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@Jaybee18](https://discuss.elastic.co/u/Jaybee18)\
**Post date:** [April 15, 2026, 9:45am UTC](https://discuss.elastic.co/t/edot-otel-collector-not-working-on-read-only-filesystem/385897/1 "2026-04-15T09:45:41Z")

</div>

Hello,

we want to deploy the elastic agent (or rather the EDOT collector) in otel mode in our cluster but with a read-only root filesystem. It seems that this is currently not possible. We get the following error:

```auto
failed to start extensions: error creating listener: listen unix /usr/share/elastic-agent/edot-diagnostics-extension.sock: bind: read-only file system

```

Even when the STATE\_PATH variable is set, the program tries to write to /usr/share ([docs](https://www.elastic.co/docs/reference/fleet/elastic-agent-container#_step_4_run_the_elastic_agent_image))

(But if I remember my testing correctly, it was honored when the elastic agent was not run in otel mode)

This is the code to replicate the behaviour (copied from my comment on GitHub):

```auto
docker run --read-only --rm -e STATE_PATH=/state --mount type=tmpfs,destination=/state --entrypoint otelcol docker.elastic.co/elastic-agent/elastic-agent:9.4.0-SNAPSHOT

```

There was a similar bug before: [The elasticdiagnostics extension is not compatible with read only file systems · Issue #11572 · elastic/elastic-agent · GitHub](https://github.com/elastic/elastic-agent/issues/11572)

Can you confirm that this is a bug so that I can open an issue on GitHub?

---

<div class="post-metadata">

**Author:** ![Jaybee18](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@Jaybee18](https://discuss.elastic.co/u/Jaybee18)\
**Post date:** [May 5, 2026, 11:10am UTC](https://discuss.elastic.co/t/edot-otel-collector-not-working-on-read-only-filesystem/385897/2 "2026-05-05T11:10:54Z")

</div>

GitHub issue for this post: [https://github.com/elastic/elastic-agent/issues/13811](https://github.com/elastic/elastic-agent/issues/13811)
