# Keycloak.X database configuration with Environment variables not work

**URL:** <https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662>\
**Category:** Configuring the server\
**Tags:** database\
**Created:** [March 1, 2021, 5:28pm UTC](https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662 "2021-03-01T17:28:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lachuza](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@lachuza](https://forum.keycloak.org/u/lachuza)\
**Post date:** [March 1, 2021, 5:28pm UTC](https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662/1 "2021-03-01T17:28:41Z")

</div>

Hi, i trying to configure the database in keycloak.x with enviroment variables but is not working, always use the internal DB. we try with several configuration but nothing works.  
Thanks

---

<div class="post-metadata">

**Author:** ![zak](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/zak/32/315_2.png) [@zak](https://forum.keycloak.org/u/zak)\
**Post date:** [September 6, 2022, 9:38am UTC](https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662/2 "2022-09-06T09:38:26Z")

</div>

I am facing the same issue, did you find out why ?

---

<div class="post-metadata">

**Author:** ![xgp](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/xgp/32/2589_2.png) [@xgp](https://forum.keycloak.org/u/xgp)\
**Post date:** [September 6, 2022, 11:57am UTC](https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662/3 "2022-09-06T11:57:40Z")

</div>

Can you share your full configuration, so that we can help you debug?

---

<div class="post-metadata">

**Author:** ![zak](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/zak/32/315_2.png) [@zak](https://forum.keycloak.org/u/zak)\
**Post date:** [September 6, 2022, 12:13pm UTC](https://forum.keycloak.org/t/keycloak-x-database-configuration-with-environment-variables-not-work/7662/4 "2022-09-06T12:13:45Z")

</div>

I think you have already replied on my new post. Thanks. I was able to debug properly using `./opt/keycloak/bin/kc.sh show-config`, problem resolved as of now.
