Skip to content
← All solutions
Keycloak logo

Developer Tools solution

Run Keycloak Locally with FlyEnv

Keycloak uses Java and a database, with a local proxy when testing browser-based authentication. FlyEnv manages those local identity service dependencies.

Local project stack

Services FlyEnv can manage around Keycloak

About Keycloak

Keycloak is an identity and access management server for single sign-on, OAuth 2.0, OpenID Connect, SAML, and identity brokering. Its core concepts are realms, clients, users, roles, groups, scopes, and authentication flows, which applications consume through standards-based protocols.

Local Keycloak development is primarily about a stable issuer URL and realistic redirect URIs. The development server can use a development database, while PostgreSQL is typical for persistent local realms; external user federation, SMTP, and reverse-proxy HTTPS should only be introduced when those flows are being tested.

Core capabilities

  • Realms and clients
  • OAuth 2.0 and OpenID Connect
  • SAML
  • Authentication flows
  • Identity brokering
  • User federation

Common use cases

  • Single sign-on for applications
  • OAuth/OIDC integration testing
  • Central role management
  • Identity provider federation

Keycloak testing depends on issuer and redirect URLs

The auth server and a persistent realm store are the essentials; other services derive from the authentication scenario.

Keycloak server and realm import
Runs the identity provider and can load repeatable test clients, roles, and users.
PostgreSQL for persistent realms
Common for durable local identity data; development mode may use another supported option for quick experiments.
HTTPS domain and redirect URIs
Lets browser clients, cookies, CORS, and callback validation behave like an integrated environment.
Optional SMTP or external IdP
Needed only for email verification, password recovery, or brokered login flows.

Project resources

For installation commands, supported versions, and project-specific configuration, refer to the official Keycloak documentation.

Typical local stack

The exact services depend on the project, its release, and its local configuration. This is a common local setup, not a fixed requirement.

ComponentTypical role
JavaRuns the Keycloak server.
PostgreSQLMySQLStores realm and identity data.
NginxCaddyMay proxy a local identity domain.

How FlyEnv helps

  • Choose the supported JDK

    Use the Java runtime supported by Keycloak.

  • Keep identity data local

    Run a database for local realms and users.

  • Use HTTPS for auth flows

    Test redirect URIs and secure cookies locally.

Set up the local environment

Project installation stays with the upstream documentation. FlyEnv manages the runtimes, databases, web servers, and supporting services around it.

  1. 1Install Keycloak following its official documentation.
  2. 2Select the required Java runtime.
  3. 3Start the configured database.
  4. 4Configure a local HTTPS domain for browser authentication testing.

Ready to run Keycloak locally?

Use FlyEnv to manage the runtimes, databases, web servers, and services around your local Keycloak environment.

Download FlyEnv

Have questions using FlyEnv?