# Token Exchange production mode

**URL:** <https://forum.keycloak.org/t/token-exchange-production-mode/27910>\
**Category:** Miscellanaeous\
**Created:** [September 17, 2024, 9:10pm UTC](https://forum.keycloak.org/t/token-exchange-production-mode/27910 "2024-09-17T21:10:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr.McGibblets](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Mr.McGibblets](https://forum.keycloak.org/u/Mr.McGibblets)\
**Post date:** [September 17, 2024, 9:10pm UTC](https://forum.keycloak.org/t/token-exchange-production-mode/27910/1 "2024-09-17T21:10:00Z")

</div>

Hello, our app currently runs on version 18.0.2 on production mode. I noticed Token Exchange can only run on dev mode. Is there any version that allows the Token Exchange feature to run production mode?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [September 17, 2024, 9:41pm UTC](https://forum.keycloak.org/t/token-exchange-production-mode/27910/2 "2024-09-17T21:41:45Z")

</div>

Where is mentioned that Token Exchange only runs on dev mode?  
It‘s a „preview feature“, you can enable preview features also when running in prod mode. There‘s nothing against it.

---

<div class="post-metadata">

**Author:** ![Mr.McGibblets](https://avatars.discourse-cdn.com/v4/letter/m/df705f/32.png) [@Mr.McGibblets](https://forum.keycloak.org/u/Mr.McGibblets)\
**Post date:** [September 17, 2024, 10:28pm UTC](https://forum.keycloak.org/t/token-exchange-production-mode/27910/3 "2024-09-17T22:28:14Z")

</div>

Okay thank you, also really enjoy your videos online 🙂

Additionally, if I am running version 18.0.2, can I enable Token Exchange feature through my Dockerfile. I am currently doing this in my Dockerfile:

`ENV KC_FEATURES=token-exchange`

Lastlly, what is a way to verify you have installed Token Exchange successfully?

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [September 18, 2024, 4:42am UTC](https://forum.keycloak.org/t/token-exchange-production-mode/27910/4 "2024-09-18T04:42:57Z")

</div>

It‘s all mentioned [here](https://www.keycloak.org/docs/latest/securing_apps/index.html#_token-exchange) what you have to enable and how it currently works. If you use env vars, cli args or conf file, it‘s up to you how you want to configure your environment.

Hopefully you know that you use a more than outdated version of Keycloak (approx. 2,5 - 3 years). It‘s insecure and receives no updates… Upgrade to the most recent version.
