# How to set password for built-in user kibana\_system through environment variable for docker container

**URL:** <https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200>\
**Category:** Kibana\
**Tags:** docker\
**Created:** [August 1, 2024, 11:09am UTC](https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200 "2024-08-01T11:09:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ACoder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/acoder/32/113449_2.png) [@ACoder](https://discuss.elastic.co/u/ACoder)\
**Post date:** [August 1, 2024, 11:09am UTC](https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200/1 "2024-08-01T11:09:43Z")

</div>

I have no problem set password for `elastic` user through `ELASTIC_PASSWORD`. I hope I can also set password for built-in users like `kibana_system`. I tried `KIBANA_SYSTEM_PASSWORD` but it doesn't work. I have not found useful info online yet.

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 1, 2024, 12:47pm UTC](https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200/2 "2024-08-01T12:47:02Z")

</div>

Hi @ACoder ,

Check here please: [Set up minimal security for Elasticsearch | Elasticsearch Guide [8.14] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-minimal-setup.html)

---

<div class="post-metadata">

**Author:** ![ACoder](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/acoder/32/113449_2.png) [@ACoder](https://discuss.elastic.co/u/ACoder)\
**Post date:** [August 1, 2024, 12:51pm UTC](https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200/3 "2024-08-01T12:51:28Z")

</div>

Thank you. It only teaches you how to set it up through a utility command. Will environment variables for all built-in users be supported in the future? especially `KIBANA_SYSTEM_PASSWORD` since it's used pretty often in container environment.

---

<div class="post-metadata">

**Author:** ![Alex\_Salgado-Elastic](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alex_salgado-elastic/32/103081_2.png) [@Alex\_Salgado-Elastic](https://discuss.elastic.co/u/Alex_Salgado-Elastic)\
**Post date:** [August 1, 2024, 1:10pm UTC](https://discuss.elastic.co/t/how-to-set-password-for-built-in-user-kibana-system-through-environment-variable-for-docker-container/364200/4 "2024-08-01T13:10:39Z")

</div>

I don't know about future updates, but what if you create a script that sets the password for the `kibana_system` user using the Elasticsearch API and the environment variable `KIBANA_SYSTEM_PASSWORD`, and then update the `docker-compose.yml` file to include the custom initialization script?
