Your first day
Sign in to the admin console, create a realm, add a test user and connect your first app over OpenID Connect.
Your tenant is standard Keycloak, so every step here is the same as in the Keycloak server administration guide. The examples use auth.example.com; use your own hostname.
Sign in to the admin console
Open https://auth.example.com/admin/ and sign in with the administrator account we handed over. It lives in the master realm, which exists only to manage Keycloak itself.
Then, in the account console (your name, top right, then Manage account):
- Change the password.
- Set up two-factor authentication with an authenticator app.
Give every administrator their own account rather than sharing one.
Create a realm for your apps
Keep your users and apps out of master: create a realm for them.
- Open the realm selector at the top of the left menu and choose Create realm.
- Enter a name, for example
example. It becomes part of every URL of the realm, so pick a short one without spaces. - Choose Create.
The realm's OpenID Connect discovery document is now at:
https://auth.example.com/realms/example/.well-known/openid-configurationIts issuer, which your apps check in every token, is https://auth.example.com/realms/example.
Add a test user
- In your new realm, open Users and choose Add user.
- Enter a username and choose Create.
- On the Credentials tab, choose Set password, turn Temporary off, and save.
The user can sign in at the realm's account console, https://auth.example.com/realms/example/account.
Connect an app
- Open Clients and choose Create client.
- Leave Client type on OpenID Connect, enter a Client ID (for example
my-app) and choose Next. - Set Client authentication:
- On for an app with a server side that can keep a secret. Keycloak creates a client secret, shown on the client's Credentials tab.
- Off for a single-page or mobile app. Use the authorization code flow with PKCE.
- Keep Standard flow on and choose Next.
- Enter your app's Valid redirect URIs (for example
https://app.example.com/callback) and, for a browser app, its Web origins (https://app.example.com). Choose Save.
Configure your app's OpenID Connect library with:
| Setting | Value |
|---|---|
| Issuer or discovery URL | https://auth.example.com/realms/example |
| Client ID | my-app |
| Client secret | From the Credentials tab, only when client authentication is on |
| Redirect URI | The one you entered in step 5 |
Sign in to your app with the test user. If the redirect fails, Keycloak shows the reason; it is almost always a redirect URI that does not match exactly.
Before you go live
Keycloak's outgoing connections are closed by default. Tell us before you rely on any of these, and we open the connection:
- Email. Keycloak sends verification and password-reset emails through the SMTP server you set under Realm settings → Email. Tell us its host and port.
- Outside OpenID Connect identity providers your users sign in with, such as Google or Microsoft Entra ID. Keycloak calls their token endpoint from your tenant. Tell us the provider.
- LDAP or Active Directory user federation. Tell us the server's address and port.