# Keycloak 16.1.1 add env variable without restarting

**URL:** <https://forum.keycloak.org/t/keycloak-16-1-1-add-env-variable-without-restarting/23686>\
**Category:** Getting advice\
**Tags:** authentication\
**Created:** [December 12, 2023, 10:31am UTC](https://forum.keycloak.org/t/keycloak-16-1-1-add-env-variable-without-restarting/23686 "2023-12-12T10:31:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaushi5054](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/kaushi5054/32/7069_2.png) [@kaushi5054](https://forum.keycloak.org/u/kaushi5054)\
**Post date:** [December 12, 2023, 10:31am UTC](https://forum.keycloak.org/t/keycloak-16-1-1-add-env-variable-without-restarting/23686/1 "2023-12-12T10:31:22Z")

</div>

Dear All,

I’m using keycloak **16.1.1** in dockers. we have two separate servers and we hare facing token invalid once server restart. After doing research we found the solution for that. Since we have **100k** user base we like to apply those env variables without restarting both keycloak due to users logout.

Those are the env variables we need to add our production env

_CACHE\_OWNERS\_COUNT=2_  
_CACHE\_OWNERS\_AUTH\_SESSIONS\_COUNT=2_  
_JGROUPS\_DISCOVERY\_PROTOCOL=JDBC\_PING_  
_JGROUPS\_DISCOVERY\_PROPERTIES="datasource\_jndi\_name=java:jboss/datasources/KeycloakDS_

I’m looking for advice, how to do it using CMD or cil.

Thank you.
