Skip to content
Blog

Notes on running Keycloak in production

Upgrades, backups, realm migrations and configuration, from the team that runs RealmDeploy.

Keycloak releases

What changed in each recent Keycloak release, which CVEs it fixes, and who should upgrade.

Fixing Keycloak errors

Common Keycloak error messages: what causes them, how to find the cause, and how to fix it.

Keycloak "Token is not active": clock skew and expiry

Why Keycloak or your API says a token is not active: expiry, clocks out of sync, short lifespans and "not before" revocations. How to check each and fix it.

Read

Keycloak not sending emails: how to fix SMTP

Why Keycloak does not send verification or password reset emails: host, port, SSL or StartTLS, sign-in, sender address, firewalls, and where the error shows.

Read

Keycloak behind a proxy: fixing 502s and redirect loops

Why Keycloak behind nginx or a load balancer returns 502, 403 or loops between URLs, and how hostname, proxy headers, buffers and health checks fix it.

Read

Keycloak "Restart login cookie not found": how to fix it

Why Keycloak shows "Restart login cookie not found": blocked or dropped cookies, iframes, hostname changes, old tabs and bookmarks, and how to fix each.

Read

Keycloak PKCE and code_verifier errors: causes and fixes

What each Keycloak PKCE error means, from a missing code_challenge_method to "PKCE verification failed: Code mismatch", and how to find and fix the cause.

Read

Keycloak invalid token issuer: fixing an iss mismatch

Why apps reject Keycloak tokens with an invalid issuer error: internal and public URLs, hostname options, Frontend URL, the /auth path, and library settings.

Read

Keycloak "Invalid parameter: redirect_uri": how to fix it

Why Keycloak rejects a redirect_uri: exact and wildcard matching, http behind a proxy, post-logout URIs and the 26.7.3 rule on OIDC parameters, with fixes.

Read

Keycloak invalid_grant: causes and fixes

Why the Keycloak token endpoint answers invalid_grant: reused or expired codes, redirect_uri mismatches, ended sessions, stale refresh tokens and PKCE.

Read

Keycloak "HTTPS required": causes and safe fixes

What the Keycloak "HTTPS required" page means, how Require SSL decides, how to get back into a locked master realm, and why turning SSL off is the wrong fix.

Read

Keycloak CORS errors: causes and fixes

Why the browser blocks calls to Keycloak with a CORS error, how Web origins work, how to find the real status code behind it, and how to fix each cause.

Read