# Keycloak initialization failed

**URL:** <https://community.auth0.com/t/keycloak-initialization-failed/185376>\
**Category:** JWT.io\
**Tags:** react\
**Created:** [April 11, 2025, 12:00pm UTC](https://community.auth0.com/t/keycloak-initialization-failed/185376 "2025-04-11T12:00:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![homayungit](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/homayungit/32/74219_2.png) [@homayungit](https://community.auth0.com/u/homayungit)\
**Post date:** [April 11, 2025, 12:00pm UTC](https://community.auth0.com/t/keycloak-initialization-failed/185376/1 "2025-04-11T12:00:10Z")

</div>

I’m using **Keycloak for SSO** , **YARP as the API Gateway** , **.NET 9 Web API** , and **React** for the frontend. I already have a deployed environment where everything works fine when hosted on **Windows Server with IIS**.

However, I recently migrated to a **Linux server (Ubuntu)**. Now:

- My **API server** is running fine.
- The **API Gateway** is working.
- The **frontend is deployed and loading**.

But I’m getting the error I mentioned earlier (related to CORS or Keycloak), and login via Keycloak doesn’t work properly.

**Interestingly** , when I run the React app locally using `npm run dev` and connect it to the **remote API Gateway and API** , it works perfectly — no issues at all.

So the issue seems to be with the production deployment on the **Linux server** , but I haven’t been able to pinpoint the exact cause.

Can you please help me identify what might be going wrong?

---

<div class="post-metadata">

**Author:** ![dawid.matuszczyk](https://sea1.discourse-cdn.com/auth0/user_avatar/community.auth0.com/dawid.matuszczyk/32/74550_2.png) [@dawid.matuszczyk](https://community.auth0.com/u/dawid.matuszczyk)\
**Post date:** [April 30, 2025, 8:51pm UTC](https://community.auth0.com/t/keycloak-initialization-failed/185376/2 "2025-04-30T20:51:32Z")

</div>

Hi There!

Welcome to the Auth0 Community!

This community is focused on Auth0 products and support. Since your question is about Keycloak, you’ll get the best help over on the official Keycloak issue tracker →

> **[keycloak/keycloak](https://github.com/keycloak/keycloak/issues)**
>
> Open Source Identity and Access Management For Modern Applications and Services - keycloak/keycloak

Thanks!  
Dawid

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/auth0/original/3X/b/5/b560f266932fcce5d57f09a6595bd50518cae3f3.jpeg) [@system](https://community.auth0.com/u/system)\
**Post date:** [May 14, 2025, 8:52pm UTC](https://community.auth0.com/t/keycloak-initialization-failed/185376/3 "2025-05-14T20:52:09Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
