Why custom Keycloak themes and providers need their own upgrade plan
Custom login themes, admin console overrides and SPI providers are the part of a Keycloak upgrade most likely to break, so they need their own inventory, rebuild and test plan rather than being folded into the server upgrade. Standard realm configuration is exported and re-imported, but code and templates that run inside the server depend on internal interfaces, template structure and the Java and Quarkus runtime that each release may change. Start by listing every file and artifact that is not stock Keycloak: theme directories, template overrides, .jar files in the providers directory, custom authenticators, event listeners, user storage providers and mappers, along with the Keycloak version each was built against.
Decide when to upgrade with the release calendar in mind. The current release is 26.8.1, published October 13, 2026, and the project plans four minor releases a year and a major release every two to three years. Since Keycloak 26.0, breaking changes in a minor release are opt-in, which narrows what each minor upgrade can change, but it does not remove the need to rebuild providers or re-check overrides. Read the Keycloak upgrading guide for every release between your current version and the target, because the notes for skipped versions still apply to your customizations.
Treat the customization inventory as an input to the upgrade decision. Confirm with your own team whether each theme or provider is still needed, whether the upstream feature it works around now exists, and who owns the code after the original developer has left. Record the owner, source location, build tooling and test cases for each item. A customization without a named owner and a passing test is the one most likely to be discovered broken in production, so the inventory should show which items have automated checks and which rely on manual login testing.
Which Keycloak changes break custom themes and providers
This table compares the Keycloak changes most likely to break custom login themes, admin themes and SPI providers, showing the impact on custom code and the action to take before each upgrade. Read each row as a checkpoint: if your deployment carries the customization listed, plan the work for that change before you move to a new release.
| Change | Impact on custom code | Action needed |
|---|---|---|
| Template overrides in login and account themes | Copied templates do not receive upstream fixes or markup changes, so each new release can silently diverge from your overrides | Inventory every overridden template, extend existing themes where possible, and diff overrides against the upstream templates of each target release |
| New React admin console on PatternFly | Custom admin themes built for the old console most likely need re-implementation rather than a small patch | Re-implement admin theme changes by extending keycloak.v2 and retest every customized admin screen |
| login:v1 deprecated, login:v2 enabled by default | Custom login themes that depend on the v1 login feature face removal in a future release | Confirm the theme type works on login:v2, migrate templates, and check the features guide before the removal version |
| admin-fine-grained-authz:v1 deprecation | Providers or scripts that rely on the v1 fine-grained authorization admin feature may stop working when it is removed | Identify custom authorization code or admin integrations using v1 and move them to the supported version |
| Java EE to Jakarta EE and Quarkus 3 in Keycloak 22 | Custom providers written against earlier APIs need package and code changes, then a rebuild before deployment | Update imports to Jakarta namespaces, rebuild each provider JAR against the target release, and test startup and provider loading |
| 26.8 SMTP StartTLS enforcement | Custom email providers or SMTP code paths that relied on plaintext fallback fail to send | Confirm the mail server supports StartTLS and test custom email senders against the 26.8 configuration |
| 26.8 mandatory logout token signature validation | Custom backchannel logout handling or identity provider integrations may reject tokens that were previously accepted | Verify that external providers sign logout tokens and test backchannel logout flows in a staging realm |
Login theme and admin console generations to plan for
Login themes control the sign-in, registration, password reset and consent pages that users see. The key upgrade question is which login generation your theme targets. Keycloak's features guide describes login:v1 as deprecated and scheduled for removal, while login:v2 is supported and enabled by default. A theme built on the older generation carries the highest risk, because its templates may not exist or behave the same way in a later release.
- Generation check: Confirm which login feature your theme depends on, and whether your target release still allows it. Verify this in the features guide for your exact release.
- Override versus extension: Templates you copy in full will drift from the shipped versions with every release. Extending an existing theme and overriding only the templates you must change leaves fewer points to reconcile.
- Template diffs: Compare each overridden template with the new release's version and review changed form fields, message keys and HTML structure.
- Authentication flows: Re-test username and password, OTP, passkey, and recovery pages, since custom templates often break on new required fields.
- Localization and messages: Check that custom message bundles still cover every key the new release uses.
Before you approve an upgrade, run every login page in a staging realm with your production theme and a test user for each credential type.
Admin console customization is the highest-risk area in this topic. The newer React-based admin console uses a newer PatternFly, and the upgrading guide indicates that custom themes written for the old admin console most likely have to be re-implemented from scratch by extending keycloak.v2. Treat a legacy admin console theme as a rewrite project rather than a patch.
- Legacy console: Themes that changed the old admin console markup or styles cannot be carried over as they are. Inventory every admin theme file before planning.
- React console extension: The new console is customized by extending keycloak.v2, so the work is a new build that uses the current component and style structure.
- Admin fine-grained authorization: If you depend on admin-fine-grained-authz:v1, check its deprecation status in the features guide and plan the move to the current model.
- Browser test matrix: Test each admin workflow you customized, such as client creation, realm settings and user management, in the browsers your administrators use.
- Design sign-off: Have the security or governance owner confirm that any change to admin pages does not hide or alter security-relevant settings.
Ask your implementation partner or internal team to estimate the rewrite scope from a full inventory, not from the number of theme folders.
Email templates and account console pages are customized separately from login pages, and they are easy to overlook during an upgrade. Email templates are typically overridden by copying files, while the account console is a frontend that users reach after sign-in. Both can break silently: a changed message key may send an incomplete email, and a changed account page may fail only for certain users.
- Email template inventory: List every custom email template, including password reset, verification and event notification messages, and map each to its new release version.
- Delivery path: Confirm that outbound email still works after upgrade. Keycloak 26.8 enforces StartTLS for SMTP without plaintext fallback, so test your SMTP relay against that setting before go-live.
- Account pages: Test profile editing, password change, linked accounts and session management with users who hold different credential types.
- Localized content: Send test emails in each language you support and check placeholders and links.
- Account console generation: Confirm which account console version your theme targets and whether it matches the release you are moving to.
Review the Keycloak themes guide for the template and override rules that apply to your release.
Preparing an inventory, backups and a test environment before upgrading
Custom themes and providers fail in predictable places, and most of those failures are found by comparing what you run today with what the target release expects. The cards below cover the groundwork that makes that comparison possible: knowing what you have, being able to restore it, testing on the target release, and recording who signs off.
Inventory every custom artifact
List every login, account and email theme file, each template override, every SPI provider, each JAR, custom authenticator and event listener, and any script or build file that produces them. For each item, record its source repository, the Keycloak version it was built against and the owner who maintains it. Overridden templates are the first place to look, because the themes guide warns that they may need updating for each new release. Anything you cannot trace to a source is the highest upgrade risk.
Keycloak themes guideBack up the database and artifacts
Take a restorable database backup before any schema change, and keep the exact theme and provider artifacts that run in production, including the deployed JAR checksums and container image tags. Automatic schema migration runs at startup, so a rollback often means restoring the database, not only redeploying the old binary. Confirm that you can restore both the database and the matching artifacts together, because a provider built for one release will not load reliably on another.
Test on the target release
Build a test environment on the exact target release with a recent copy of production realms, client configuration and user federation settings. Use anonymized user data where your policy requires it. Run the full login, logout, password reset, email and admin flows against your custom pages and providers. A test that runs on the current release only tells you the code still builds, not that it runs on the release you are moving to.
Pin source and toolchain versions
Record the Keycloak version, Java version, Maven or Gradle version, and the libraries your providers compile against, and pin each one in the build. Store the provider source in version control with a tagged commit for each production build. Without pinning, a rebuild during the upgrade may pull in a different dependency set than the one that passed earlier tests, and the difference can be hard to trace after go-live.
Record enabled features
Export the list of enabled and disabled Keycloak features, including any feature flags set in the startup configuration. Some themes depend on login or admin features that are deprecated and scheduled for removal, so note which theme generation each realm uses. Compare this list against the features guide for the target release before you start, and decide in advance which deprecated features you will keep, replace or retire.
Keycloak features guideAssign owners for sign-off
Name one owner for the theme code, one for each provider, one for the database backup and restore, and one who approves the production change. Each owner should sign off on a written test result for their item before the change window opens. Agree in advance who can stop the upgrade and roll back, and who must be reachable during the window. Unassigned custom code is the most common reason a working provider is still broken weeks after an upgrade.
How custom code moves through an upgrade
The path starts with an inventory of every theme template, provider and extension the deployment runs. Each item is classified as an extension of an existing theme, an override of a template, or an SPI provider, because each class breaks in a different way. Custom code is then rebuilt against the target release and deployed to a test realm, where the per-release test plan runs. Only after those checks pass does the change get promoted, and a failed run rolls back to the current release.
Custom theme and provider code passes through classification, rebuild and testing before promotion.
Rebuilding providers and themes in the right order
This sequence moves custom themes and SPI providers from the current Keycloak release to the target release in a fixed order, so each change is tested before the next one depends on it. It ends with a staging sign-off and a promotion plan that names the rollback point before production changes.
Read the upgrade notes for every release
The engineer who owns the Keycloak configuration reads the upgrading guide for each release between the current version and the target, not only the final one. Breaking changes in minor releases are opt-in, so each note should be checked for settings that must be enabled or changed before the custom code is touched. Record every item that affects a theme, a provider or a feature you use, with the release it came from. The output is a written change list that the rest of the sequence works through. Confirm the list with the team that owns the login pages before moving on.
Inventory themes, providers and overrides
List every custom login, account and email theme, every template override, every SPI provider and every extension jar, along with the Keycloak version each was built against. Mark which overrides copy whole templates and which extend an existing theme, because copied templates are the most likely to break. Identify any use of the old admin console theme and any dependency on deprecated features such as login:v1 or admin-fine-grained-authz:v1. The check is a complete inventory that matches what is deployed in each environment, including the image and the mounted theme directories.
Rewrite theme templates to extend the new base
The theme developer updates each template so it extends the base theme of the target release instead of replacing it, and removes copied templates that no longer need to exist. Templates for the new React-based admin console are re-implemented by extending keycloak.v2, because the newer PatternFly styling means the old admin theme cannot be carried over by copying. Switch any login pages that depend on login:v1 to login:v2, which is supported and enabled by default. The output is a theme that builds and renders each page with no missing template errors in a local run.
Port SPI providers to Jakarta EE and Quarkus 3
Providers written against releases before Keycloak 22 need code changes, because that release moved from Java EE to Jakarta EE and Quarkus 3. The developer replaces javax imports with jakarta equivalents, updates any Hibernate ORM 6 usage, and removes calls to APIs that were removed or changed in the target release. Compile each provider against the target Keycloak dependencies so that API mismatches fail at build time rather than at login. The check is a clean build with no deprecation or removal errors in the provider code and its tests.
Rebuild and package the providers and themes
The build engineer produces new provider jars and theme archives from the ported source, using a pinned build of the target release, and records the version and checksum of each artifact. Packaging happens in the same pipeline that builds the Keycloak image, so the custom content and the server version cannot drift apart. Confirm that the image starts with the providers registered and that each theme appears in the realm theme selector. The output is a versioned image and artifact set that can be redeployed without rebuilding.
Deploy to staging and run the flow tests
Deploy the new image to a staging Keycloak that uses a restored copy of the production database, so schema migration and realm data are tested against real configuration. Run the login, admin console and account console flows for each client and identity provider, including password reset, MFA enrollment, the custom provider logic and email rendering from the email theme. Check the server logs for provider load errors and template warnings during the run. Sign-off requires every test case in the per-release test plan to pass and every failure to be either fixed or accepted in writing.
Promote with a stated rollback point
Before production changes, the operations owner takes a database backup that can be restored, and records the identifier of the previous Keycloak image and the previous theme and provider artifacts. The change is then promoted in a rolling update or maintenance window agreed with the business owners. Once running, the team checks the login, admin and account flows again on production, watches error rates and logs, and confirms the metrics endpoint still reports as expected if it is enabled. Rollback means redeploying the recorded image and restoring the backup only if the database migration has already run and cannot be reversed by the older release.
A test plan to run for each Keycloak release
Run the same regression plan against every Keycloak release you stage, and treat a green run as the gate for promoting the new image to production. The plan should start from an inventory of what your team actually customized: which realms and clients use custom login themes, which SPI providers are deployed, which custom mappers add claims and which email templates are in use. Each of those becomes a test with a named owner and an expected result. Confirm the list with the team that owns each customization, because a test plan missing a component will pass while that component breaks.
Cover login for every realm and client type you run, including confidential web clients, public single-page clients and any service accounts. For the login theme, check the pages users actually reach: the sign-in form, the one-time password and passkey steps, the required action pages, and the error and recovery screens such as expired links, locked accounts and password reset. Verify the admin console theme actions your staff use, such as realm theme selection and any custom admin pages, against the console generation your build targets. Send each email template through the SMTP settings that production uses, not a local mail catcher, so that transport changes in the new release are exercised.
Test the custom authenticators and event listeners by triggering their code paths and confirming the side effects, such as a flow step that blocks a login or an event that writes to your audit system. Decode the access and ID tokens from a test login and compare the claims from each custom mapper with the values your resource servers expect. Finally, test logout in both directions: front-channel logout from a relying party and backchannel logout delivered to each client that registered a logout URI, with session end confirmed in every application. Record the Keycloak version, the image digest and the results, and keep that record with the release change request so the next upgrade starts from a known baseline.
What makes a custom Keycloak upgrade take longer
This table compares the factors that expand or shrink the work of moving custom themes and SPI providers to a newer Keycloak release. Read each row against your own extensions to estimate where the effort will concentrate. The main takeaway is that provider code tied to Keycloak internals and overridden templates usually cost the most, while a build pipeline and a scripted test plan reduce the repeat cost of every release.
| Effort driver | Why it changes the work | How to keep it down |
|---|---|---|
| Number of overridden templates | Each overridden template may need updating for each new release, so the upgrade effort grows with every copied file. | Extend existing themes instead of replacing templates, and keep a list of every overridden file with its source version. |
| Customized admin console | Custom admin console themes built for the old console generally need re-implementation by extending keycloak.v2, which is a rewrite rather than a patch. | Decide early whether admin branding is required, and limit changes to the supported theme extension points. |
| Number of SPI providers | Each provider is compiled against Keycloak APIs, so every provider is a separate code change and rebuild step. | Keep providers small, document which APIs each one calls, and retire providers that duplicate built-in features. |
| Dependence on Keycloak internals | Providers that use internal classes or Quarkus and Hibernate types may break on major version jumps such as the Jakarta EE and Quarkus 3 change in Keycloak 22. | Use only public SPI interfaces, and confirm each internal dependency against the upgrading guide before starting. |
| Deprecated login or admin features | Features such as login:v1 and admin-fine-grained-authz:v1 are scheduled for removal, so themes or policies that depend on them need migration work. | Check the features guide for enabled legacy features and move to login:v2 before the target release. |
| Realm and user base size | Large realms slow migration tests and make rollback planning longer, and they affect how long test logins and sessions must run. | Test with a copy of production-sized data, and confirm the migration approach with the database schema guidance. |
| Number of test flows | Every login, registration, password reset, email and logout path needs a check for each custom template or provider, multiplying test time. | Write a fixed test plan per release that covers each custom flow once, and automate the repeatable checks. |
| Existing build and CI pipelines | Without a pipeline, providers and themes are built by hand, and each release repeats setup steps and introduces version drift. | Version the theme and provider code, pin the Keycloak version in the build, and run the build and tests on every upgrade branch. |
Questions teams ask before upgrading custom Keycloak code
How much effort does upgrading a custom Keycloak theme take?
The effort depends mostly on how the theme was built and how many pages it overrides. A theme that extends the existing base theme and overrides only a few templates usually needs less rework than one that replaces many templates wholesale, because the Keycloak themes guide warns that overridden templates may need updating for each new release. The second driver is the admin console. If the custom theme targets the old admin console, the upgrade notes indicate it most likely has to be re-implemented from scratch by extending keycloak.v2, since the new React-based console uses a newer PatternFly. Ask for an inventory of every overridden template, every custom resource and any admin console styling before agreeing on scope. Theme work is usually one-time per major change, but every later minor release needs a template check.
Do custom providers need rewriting for Keycloak 22 or later?
Often yes. Keycloak 22 moved from Java EE to Jakarta EE and Quarkus 3, so custom providers written against earlier versions need code changes and a rebuild before they run on the newer release. Providers that only use stable interfaces and avoid internal classes tend to need smaller changes, while providers that depend on internal APIs, older Hibernate usage or deprecated adapters need more work. The fastest way to find out is to compile the provider against the target release and run its unit and integration tests. Ask the team to list every SPI implementation, its dependencies and any direct database access, because those three items determine how much code moves.
Can an internal team upgrade custom Keycloak code without outside help?
An internal team can do this when it has a developer who knows the provider code, someone who can run Keycloak locally or in a staging cluster, and time to test login flows properly. Outside help is most useful when the team lacks Java and Quarkus experience, when the custom code is old and undocumented, or when the same team must also meet a production deadline. Whichever path is chosen, the work is the same: inventory the customizations, rebuild them against the target release, test login, logout, token and account flows, and document the result. A fixed-scope engagement with written deliverables can cover part of that work, while the internal team keeps ownership of the realm and the code afterward. Confirm which party will own the code after handover.
What does the upgrade need from our team?
The work needs a few specific inputs before it starts. The most important are a current realm export from the source environment, a staging Keycloak that matches production configuration as closely as possible, and a set of test accounts covering each login method in use, including federated users, social logins and any passkey or OTP flows. You also need the source code and build pipeline for each custom theme and provider, the list of applications that depend on each customization, and a named owner who can approve test results and sign off on the cutover. Access to the staging environment, the database backup process and the reverse proxy configuration should be confirmed early, because those are common blockers. Ask the partner to put these inputs in the written scope.
How long does rebuilding custom providers and themes take?
The duration depends on the number of custom artifacts, how far the target release is from the current one, and how many applications must be retested. A single theme with a few template overrides is a much smaller task than a set of providers that touch user storage, token mappers and authentication flows. Scope also grows when the team must redo admin console styling, migrate deprecated features such as login:v1 before its removal, or resolve dependency conflicts after the Quarkus 3 change. The most reliable way to size the work is to inventory each artifact and mark whether it needs code changes, template changes or only a retest. Ask for a schedule that separates the rebuild, the test cycles and the production change window, and for the test plan that each phase depends on. Any calendar estimate should come from the written scope, not from a general rule.
How do we avoid breaking production logins during the upgrade?
Avoid breaking production logins by testing the exact release and the exact customizations in staging before any production change, then rolling out with a rollback path. Keep the realm export and a restorable database backup before migration, and confirm whether the database schema migrates automatically at startup or manually. Build the test plan around real login paths: browser login, password reset, OTP or passkey prompts, social and brokered logins, token refresh, logout and admin console access. Check the feature flags for deprecated features and the upgrade notes for opt-in breaking changes, since a minor release may change behavior. Keep the old image or artifact ready to redeploy, and watch login failure rates, error logs and metrics during the first hours after cutover. Have an owner with authority to roll back agreed in advance.
Official Keycloak sources to read before the upgrade
Start with three official Keycloak sources before you change anything: the Keycloak upgrading guide, the Working with themes guide and the Enabling and disabling features page. The upgrading guide tells you which admin console and login theme generation is in play and which changes affect Java providers, including the move from Java EE to Jakarta EE and Quarkus 3 that Keycloak 22 introduced. The themes guide explains that overridden templates may need updating for each new release and that extending an existing theme is safer than replacing templates. The features guide lists which login and admin features are deprecated and scheduled for removal, so your theme's theme.properties and any use of login:v1 or admin-fine-grained-authz:v1 can be checked against it.
Read the upgrading notes for every release on your path, not only the target version. A jump from one Keycloak 26 minor release to a later one can carry opt-in changes or behavior changes that only appear in the notes for the intermediate release, and your custom providers may depend on an interface that changed along the way. Build a list from those notes: each theme template you override, each SPI interface your provider implements, each feature flag your realms rely on, and each dependency your provider pulls in. Confirm the exact release sequence for your own version with the upgrade notes rather than assuming it from the latest release.
Keep the reading tied to your own inventory. For each item on the list, record which source explains the change, who on your team owns the fix, and which test in your release plan will prove it works. The sources do not state how long a rebuild or retest will take in your environment, so ask your team or your partner to estimate that from your provider count, template count and the number of login flows they cover.
How DeployOpen scopes and delivers a custom Keycloak upgrade
DeployOpen treats custom themes and SPI providers as code and configuration that must be inventoried, rebuilt and tested against each target Keycloak release. The work runs inside your own infrastructure, from the first scope agreement through a documented handover and optional ongoing support.
How we scope
- Inventory every custom theme, SPI provider and extension, including the Keycloak version each was written against.
- Identify which template overrides and admin console customizations depend on the old admin console generation.
- Agree the written scope, deliverables and test plan for each target release before any work starts.
How we build
- Rework themes to extend the supported base theme where possible, and re-implement admin console pages on keycloak.v2 where needed.
- Port providers to the Jakarta EE and Quarkus 3 code requirements and rebuild them against the target release.
- Run each release's test plan in a staging environment that mirrors your production realms, clients and database.
How we hand over
- Document each change, the reason for it, and the test results per release in a format your platform team can maintain.
- Provide build instructions, version pins and a runbook for rebuilding and deploying providers and themes.
- Walk your engineers through the test plan so they can repeat it for the next minor release without us.
How we support
- Offer ongoing support, upgrades and continuous testing for custom code as a retainer, if your team wants it.
- Review each new Keycloak release's migration notes against your inventory and flag affected customizations.
- Confirm the support terms, response expectations and included releases in the written scope before engagement.

