Step 1: Install Java JDK
- Keycloak requires Java (JDK 17 or newer).
- Download fromĀ Adoptium TemurinĀ orĀ Oracle.
- After install, set theĀ
JAVA_HOMEĀ environment variable.
Confirm by runningĀjava -versionĀ in 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.confĀ add: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) toĀC:\keycloak\providersĀ if 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 (
nssmĀ can help; see ), and use secure passwords. - Official guides:
Keycloak Docs
Step-by-step Windows



Leave a Reply