Step 1: Install Java JDK
- Keycloak requires Java (JDK 17 or newer).
- Download from Adoptium Temurin or Oracle.
- After install, set the
JAVA_HOMEenvironment variable.
Confirm by runningjava -versionin Command Prompt.
Step 2: Download and Extract Keycloak
- Get the Quarkus (.zip) distribution from the Keycloak release page.
- Extract it to a folder, e.g.,
C:\keycloak\
Step 3: Start XAMPP and MySQL
- Open XAMPP and Start Apache and MySQL.
- Create a database for Keycloak (example:
keycloak_db) using phpMyAdmin.
Step 4: Configure Keycloak to Use XAMPP Database (optional but recommended)
- In
C:\keycloak\conf\keycloak.confadd:textdb=mariadb db-url=jdbc:mariadb://localhost:3306/keycloak_db db-username=root db-password=YOUR_PASSWORDIf using XAMPP’s MariaDB with socket, see for unix_socket setup. - Copy the MariaDB JDBC driver (
mariadb-java-client-*.jar) toC:\keycloak\providersif not included.
Step 5: Start Keycloak
- Open Command Prompt.
- Go to
C:\keycloak\bin - For first run, set admin username and password:text
set KEYCLOAK_ADMIN=admin set KEYCLOAK_ADMIN_PASSWORD=admin123 kc.bat start-dev - Wait for “Keycloak started” message.
Step 6: Access Keycloak Console
- Open browser to:
http://localhost:8080/ - Login with admin/admin123 (or your set credentials).
Notes
- XAMPP is only needed for MySQL/MariaDB.
Keycloak runs as its own server and does not “install inside” XAMPP. - For production, run Keycloak as a Windows service (
nssmcan help; see ), and use secure passwords. - Official guides:
Keycloak Docs
Step-by-step Windows

Leave a Reply
You must be logged in to post a comment.