Multiple realms questions

Hello everyone,

I’ve recently started working with Keycloak and I am exploring the best way to handle multiple realms for different applications.

A few points I am curious about:

  1. Is it recommended to create separate realms for every application, or is it better to group multiple apps under a single realm with different clients?

  2. How does managing users across multiple realms affect performance and scalability?

  3. What are the common pitfalls or mistakes developers face when setting up multiple realms?

  4. Are there any official best practices or community guidelines around this?

I would love to hear from experienced Keycloak users or admins about how they handle this in production.

Thanks in advance! :folded_hands:

  1. one realm, client per application, otherwise the “sso” part won’t work
  2. don’t do that. put them in the same realm.
  3. if you must manage multiple realms, use a config-as-code system like the Keycloak Terraform Provider or the keycloak-config-cli tool to manage the realm configuration from files in git
  4. no, but this is a good place to ask questions.