How to migrate from Keycloak to Zitadel with password hashes intact
The documented path for moving a Keycloak realm into self-hosted Zitadel has three steps: export the realm's users with kc.sh export, convert the export with the zitadel-tools migration utility, which keeps PBKDF2 password hashes usable, and import the converted users through POST /admin/v1/import. Effort follows three variables: the number of realms, the number of clients, and whether password hashes carry over, since users whose hashes do not carry over need a reset or a just-in-time fallback. Clients and roles then have to be mapped by hand onto Zitadel organizations, projects and applications, and that mapping is where most of the design work sits. The Zitadel Keycloak migration guide is the next read for the exact export and conversion steps.
DeployOpen plans and runs this move inside your own infrastructure, in the cloud accounts, data centers or air-gapped networks you control, under a fixed scope agreed in writing before work starts. The scope is where the variables above get pinned down: which realms and clients move, how roles become Zitadel project roles and grants, how each realm maps to an organization, and which users, if any, need a password reset. No price appears on this page because a quote follows from that written scope. Ask for the quote to list one-time work, such as export validation, conversion and cutover, separately from any ongoing support or retainer work so you can compare it with the cost of running the move with your own team.
Before the first export, confirm the hash algorithm, iteration count and credential format configured in the source realm, because the conversion depends on them and a mismatch may only surface at first login. Confirm that the target Zitadel will run on a PostgreSQL version in the range Zitadel supports, currently 14 through 18, and rehearse the full sequence against a non-production instance first. After the import, check the Zitadel events API for user.human.added events to confirm that every exported user arrived, compare those counts with the Keycloak export, and sign in with a sample of migrated accounts before any application is pointed at Zitadel.
What maps cleanly from Keycloak to Zitadel and what does not
This table compares each Keycloak item in scope for this migration with its closest Zitadel equivalent and states how far the Zitadel documentation supports that mapping. Read the status column first: rows marked documented have a published path, partly documented rows need a design decision, and rows marked to confirm should be checked in your own Zitadel version before cut-over. The main takeaway is that user records and password hashes move through a documented import, while clients, roles, brokering and authorization need deliberate redesign and testing.
| Keycloak item | Zitadel equivalent | Migration notes | Status |
|---|---|---|---|
| Users, attributes and PBKDF2 password hashes | Human users imported through POST /admin/v1/import | Export with kc.sh export, convert with zitadel-tools to keep PBKDF2 hashes usable, then check user.human.added events. Confirm custom attribute mapping. | Documented for users and hashes; attributes to confirm |
| Realms | Organizations inside an instance, with projects and users inside them | Decide per realm whether it becomes its own organization. Instance boundaries give full data isolation, so set them first. | Partly documented |
| Clients (OIDC and SAML) | Applications inside a project, using OIDC, OAuth 2.0 and SAML 2.0 | Recreate redirect URIs, protocol settings and signing keys per application. Confirm whether client secrets can move, or plan to issue new ones. | Partly documented |
| Roles, client roles and groups | Project roles and grants, with groups to confirm | Map realm and client roles to project roles, then grant them to organizations that need them. Confirm how groups become roles or grants. | Partly documented |
| Identity brokering and user federation | Identity providers, including Keycloak, LDAP and OpenLDAP | Recreate each brokered provider and LDAP attribute mapping, then test account linking before cut-over. Providers are set per organization. | Partly documented |
| Authorization services | No direct equivalent confirmed; rebuild with roles, grants and application checks | Plan a design pass to rebuild policies and permissions from roles, grants and application checks. | To confirm |
| Admin console users | Instance and organization administrator roles | Recreate administrators with only the roles they need, and confirm which roles cover instance and organization administration. | To confirm |
| Active sessions and tokens | Sessions and tokens issued by Zitadel after cut-over | Plan for users to sign in again and for applications to receive new tokens. Confirm whether any sessions or refresh tokens carry over. | To confirm |
| OTP credentials and passkeys | Passkey login with password fallback; OTP to confirm | Passkey login is documented. Confirm whether OTP seeds and passkey public keys can be imported, or plan re-enrollment. | Partly documented |
How to map realms, clients and roles to organizations, projects and applications
The first decision is whether each Keycloak realm becomes an organization inside one Zitadel instance or gets an instance of its own. An instance is a virtual tenant with full data isolation, while organizations hold the users and projects for a group of applications. Keep one shared instance with one organization per realm when the realms share an owner and one team can administer them together. Choose separate instances when a realm must be isolated for regulatory, contractual or data residency reasons, or when a different team must operate it independently, since each instance carries its own configuration and administration. Record the decision and its reason for every realm, and confirm with Zitadel how your self-hosted deployment will run more than one instance before you commit. The Zitadel organizations documentation describes what sits at each level.
Build the mapping in four steps. First, inventory every client in every realm, recording whether it is confidential or public, its redirect URIs, its token lifetimes and scopes, and the protocol mappers it uses. Second, group clients into projects, placing together the applications that share roles and an owning team. Third, define project roles for the permissions each application checks, then grant them to the organizations that need access, so each realm role and client role has a clear destination. Fourth, recreate each client as a Zitadel application with the same redirect URIs and token settings, and test it against a non-production login. The mapping must be signed off by the security owner and each application owner before the import script is written, because the script needs final organization, project and role names to assign users and grants correctly.
Plan for Keycloak's fine-grained authorization rules to change shape. Policies, permissions and resources in Keycloak Authorization Services often encode decisions that depend on attributes, group membership or client context. Copying them into Zitadel one for one is risky because the access model differs: project roles and grants control who may use an application, while the application or its policy layer decides what each user may do inside it. List each existing rule and mark it as a role, a grant, an application check or a rule to retire, then have the application owner test the result. Confirm the current role and grant behavior in Zitadel's documentation before you write the rules down.
Which documented tools and APIs carry the migration
Six documented tools and endpoints carry the Keycloak move: the export, the conversion, the import, the verification, the ongoing provisioning that follows, and the index of Zitadel's migration guides. Each card names the item to confirm before you rely on it, because commands and request shapes depend on the Keycloak and Zitadel versions you run.
Export users with kc.sh
The export starts with kc.sh export, run against the Keycloak installation that holds the users. The command takes flags that select the realm and the output directory, and those flags can differ between Keycloak versions, so confirm the flags for your Keycloak version before the first run. Check that the output includes password credentials, because the hashes are what let users keep their passwords. Run the export against a copy of the database first, and record the Keycloak version beside the output so the conversion step uses the same assumptions.
Convert with zitadel-tools
The zitadel-tools migration utility reads the Keycloak export and rewrites it into the shape Zitadel's import step expects. Its key role here is keeping PBKDF2 password hashes usable, so users sign in with existing passwords instead of resetting them. Confirm that the hashes survive conversion by comparing a sample of converted records with the originals, and by logging in as a test user after import. Keep the converted files under the same access controls as the original export, since they still contain credential material.
Keycloak migration guideImport through the admin API
Converted users go into Zitadel through POST /admin/v1/import, an administrative endpoint that requires a credential with import rights on the target instance. Check the authentication method and request shape against your Zitadel version, including whether the body accepts a batch or one user per call. Test with a small set of users in a non-production instance before loading the full population. Record each response, because a partial failure in a large batch is easy to miss without per-request records.
Verify with the events API
After import, the events API shows what Zitadel created for each user. Look for user.human.added events, one for each imported human user, and compare the count with the number of users in the export. A matching count confirms creation only, so pair it with a test login for a sample of users in each organization. Confirm the event type name and the query syntax on the Zitadel version you deploy before you write any reconciliation script.
Provision with SCIM v2
SCIM v2 is the standard provisioning interface Zitadel exposes for creating, updating and deactivating users from an external directory. Use it for ongoing provisioning after cutover, once the identity source keeps changing. The initial load is a one-time move of existing accounts and goes through the import endpoint instead. Decide which system is the source of truth for joiners and leavers, and confirm that your HR or directory tool can send SCIM requests to your Zitadel endpoint. Test deprovisioning as carefully as creation, because a missed deactivation leaves an active account behind.
SCIM v2 guideCheck the migration guides
Zitadel publishes migration guides for several identity systems, and the index lists each source and the approach it uses, such as bulk import or just-in-time migration. Use it to confirm that the Keycloak guide matches your Zitadel version, and to compare it with any other source you are moving in the same program. Keycloak tooling changes between releases, so read the version notes in the guide before you copy any command. Treat the index as the starting point, then return to the Keycloak guide for the steps.
Migration guides indexWhat happens to passwords, OTP seeds and passkeys during the import
Keep existing passwords only where Zitadel can verify the stored hash without a reset, and check that on every realm before you promise users they will not need one. The documented Keycloak path exports users with kc.sh export, converts them with the zitadel-tools migration utility, which keeps PBKDF2 password hashes usable, and imports them through POST /admin/v1/import. That conversion only helps if the hash algorithm, iteration count and salt format on each realm match what Zitadel verifies. Realms can carry different password policies, and a realm changed after its first setup may differ from the rest. Inspect the settings on each realm, then confirm the exact requirements with Zitadel before the first test import. The Keycloak migration guide is the starting point for that check.
OTP seeds and passkeys need their own check. Do not assume the password import also carries one-time password secrets or WebAuthn credentials from Keycloak. Ask Zitadel, in writing, whether the Keycloak path moves OTP seeds, which credential types it includes, and how passkey public keys are handled, then test each type with a sample user in a staging instance. Zitadel supports passkeys based on FIDO2 and WebAuthn, with password login as a fallback, so a user who keeps a password can still sign in if an authenticator is lost. Decide now which users must re-enroll an authenticator, and write that step into your cutover notice before the first production user signs in.
For users whose hashes do not carry over, choose between a forced reset and just-in-time migration before the batch runs. A forced reset imports the account without the old password and requires the user to set a new one. It is simple to run but adds support load on the first day. Just-in-time migration leaves the credential check with the legacy Keycloak realm at login, which avoids a reset but means Keycloak must stay reachable for the whole grace period. Zitadel's migration guides describe approaches of this kind, so confirm with Zitadel how each one is configured in the import payload. Whichever path you choose, count imported users per realm using user.human.added events in the events API, and reconcile those totals against your Keycloak export.
How the export, conversion, import and parallel run fit together
The flow starts in the Keycloak realm, which the team exports with kc.sh export. The resulting file contains password hashes, so it stays inside the client network under strict access control. The zitadel-tools conversion keeps PBKDF2 hashes usable, and POST /admin/v1/import loads the users into a Zitadel instance. Check the import by querying the events API for user.human.added events, then map clients, roles and organizations. During the parallel run Keycloak remains authoritative until cutover. A final delta export carries late changes across, and applications are then repointed.
Export, conversion, import and parallel run inside the client network.
Migrate from Keycloak to Zitadel in five phases with a parallel run
This sequence moves Keycloak realms into Zitadel without forcing a password reset. Keycloak and Zitadel run side by side until each application has shown matching logins and token claims, so the cutover depends on recorded evidence.
Inventory realms, clients, roles and consumers
List every realm, user store, client, role, federation link and custom extension in Keycloak, including any custom authenticators or SPIs. Then list every application that consumes tokens from each realm, with a named owner for each one. The client provides administrator access to Keycloak and the owners of each application. DeployOpen maps each realm to a Zitadel instance, organization and project, and delivers a migration register that ties every consumer to its target application and cutover position. Your team can export the configuration and gather the consumer list internally, with DeployOpen reviewing the result. The step is done when every consumer has an owner, a target application in Zitadel and a place in the cutover order.
Pilot one realm in non-production Zitadel
Export one realm with kc.sh export, convert its users with the zitadel-tools migration utility so PBKDF2 password hashes stay usable, and import them through POST /admin/v1/import into a non-production Zitadel. Check that imported users sign in with their existing passwords, and confirm in the events API that each one has a user.human.added event. The client provides the non-production Zitadel environment on PostgreSQL 14 through 18, a copy of the pilot realm and test accounts that cover its user types. DeployOpen runs the pilot and delivers a written procedure with the conversion and import steps. Your team can repeat the export and sign-in checks once the procedure is written. The step is done when sample users sign in and the event count matches the number of users exported.
Run batched imports alongside Keycloak
Import the remaining realms in batches while Keycloak stays live, with one named write authority for each user population so a password reset or profile change is made in only one system. Repoint one pilot application to Zitadel and compare its login results and token claims with the same test user on Keycloak, including subject, audience, issuer and role claims. The client provides the named write authority, the pilot application owner and access to logs from both systems. DeployOpen designs the batch order and comparison checklist and delivers a comparison record for each test case. Your team can run the batches and the pilot application's test logins internally. The step is done when the agreed test cases match or each difference has a recorded owner decision.
Cut over users and applications
Freeze user changes in Keycloak, take a final export delta and import it into Zitadel, then repoint each application to its new issuer. Keep a rollback plan that names the trigger for rollback, the decision owner and the steps that return each application to Keycloak. The client provides the change freeze approval, the application owners who repoint their code or configuration and the rollback decision owner. DeployOpen writes the cutover runbook and rollback plan and supports the cutover window. Your team can freeze changes, repoint applications and run the sign-in checks. The step is done when the delta import reconciles with the freeze record, each application signs in against Zitadel and the owners have reviewed the rollback plan.
Retain evidence and decommission Keycloak
Retain migration evidence under the client's retention policy, back up the Keycloak database and configuration, and shut Keycloak down only after no consumers remain. Exports contain password hashes, so store them encrypted for the retention period and delete working copies. The client provides the retention policy, backup storage and the sign-off authority for decommissioning. DeployOpen assembles the evidence pack with the pilot report, comparison records, import logs and cutover record, and tests a restore of the Keycloak backup. Your team can archive the evidence, run the backup and disable the Keycloak service itself. The step is done when the evidence pack is accepted, a backup restore has been tested and the consumer logs show no remaining traffic to Keycloak.
What drives the cost and duration of a Keycloak migration
This table lists the inputs that change how much work a Keycloak to Zitadel migration involves, and the items to request in a written scope. Read each driver as a direction: the more of it your estate contains, the more design, conversion and testing it usually needs. Ask every partner to quote against the same inventory so the figures can be compared.
| Driver | Why it changes the effort | What to ask for in a quote |
|---|---|---|
| Realms and their mapping | Each realm needs an organization or instance decision. More realms mean more tenancy design, project grants and verification. | Realm inventory, the target instance and organization model for each realm, and any realms to merge. |
| Clients and protocol mix | Each client becomes a Zitadel application. Confidential, public and SAML clients each need their own configuration and tests. | Client inventory with protocol, grant types, redirect URIs and whether each client is confidential or public. |
| Roles and composite roles | Composite roles must be redesigned as Zitadel roles and grants. Deep composites and client-scoped roles take longer to map and verify. | Role and composite role export, which applications consume each role, and the intended role model in Zitadel projects. |
| Users and password hashes | Password hash compatibility decides whether users keep their passwords. Users with unsupported hashes or no password need a reset or verification path. | Confirmed user count, hash algorithms in the export, OTP and passkey handling, and the plan for users who cannot migrate. |
| Identity brokering and federation | Identity brokers and user federation links such as LDAP move with separate configuration. Each link changes login routing, account linking and sync testing. | List of identity providers and user federation providers, the target Zitadel identity provider for each, and linking rules. |
| Custom extensions | Keycloak extensions do not carry over as code, so each one needs a rebuild, a replacement or a retirement decision. | Inventory of deployed authenticators, providers, themes and event listeners, the business function of each, and its sign-off owner. |
| Deployment shape and database | Clustering, database engine and high availability design affect export access, cutover steps and the target build. | Keycloak version, database engine, cluster topology, and whether the Zitadel target is a separate PostgreSQL-backed build, with its owner. |
| Parallel run and repointing | Each consuming application must repoint to Zitadel. Parallel run length and cutover window set how long both systems stay live. | Application count and owners, the parallel run length, cutover window, rollback plan and who runs the repointing tests. |
| Compliance evidence | Auditors may ask for evidence of user migration, access changes and the event trail. Imported users can be checked in the Zitadel events API. | Evidence the assessor expects, retention and deletion rules for the export holding password hashes, and records owners. |
What usually goes wrong in a Keycloak to Zitadel move
These six failures recur in Keycloak to Zitadel moves because they sit where user data, access and traffic cross between two systems. Each card names the failure, what causes it and the check that prevents it. Assign an owner to each check before the migration window opens.
Password hash files left on disk
The export from kc.sh export and the files produced by the conversion both contain password hashes for every user in the realm. Treat them as credentials: keep them in an encrypted, access-limited working directory, and never place them in a shared repository or ticket attachment. Delete the export and converted files once the import has been verified, and record the deletion in the change ticket.
Hashes that lock users out
A converted hash can pass the import and still fail at login if the conversion does not match the source realm's credential settings. The result is a wave of lockouts on the first working day after cutover, and it is hard to separate from a broken login page. Run pilot logins first with a set of accounts that includes users with second factors registered, and check the user.human.added events for each pilot user before the bulk import is declared complete.
Role and grant mismatches
Keycloak realm roles, client roles and group memberships usually do not map one to one onto Zitadel projects, roles and grants, so a direct copy can leave users without access or give them more than they had. Build a table that maps each source role to a Zitadel project role and grant, with the organization it applies to. Test one account per role, confirming that users who could not open an application before still cannot, and that every role grant from the source appears on the target.
Zitadel organizationsApplications still pointing at Keycloak
Any client that still uses the old issuer URL keeps sending sign-ins to Keycloak, so some sign-ins succeed against the old realm while others fail against the new one. Inventory each client by redirect URI, issuer, key endpoint and any hard-coded token validation in APIs or services, including background jobs and mobile apps. Repoint them in one scheduled change, then confirm from the source's logs that no sign-in still reaches the old realm.
Upgrades during the migration window
An operator update or a source upgrade during the migration changes the system you export from or import into, so the export, mappings and test results may no longer describe the same system. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. Set that mode before the window opens, and note that Keycloak migrates its database schema at startup by default, so a restart can change the database before you export.
Keycloak Operator installationTwo systems accepting writes
During a parallel run, if both Keycloak and Zitadel accept profile changes, password resets and new accounts, the two user stores diverge and a later import or sync can overwrite newer data. Name one write authority for each user attribute and credential, and record that choice before the parallel run starts. Make the other system read-only for those attributes, then compare a sample of accounts in both systems before the final cutover.
Questions teams ask before they migrate from Keycloak to Zitadel
How much does it cost to migrate from Keycloak to Zitadel?
The cost depends on the written scope, which DeployOpen quotes after reviewing your realms, clients and roles. Most engagements are fixed-scope, so the scope, deliverables and timeline are agreed in writing before work starts. Ask for the quote to show each component as its own line: assessment of your realms and clients, mapping of realms, clients and roles to Zitadel organizations, projects and applications, scripting of the export, conversion and import, a pilot with test users, cutover, and the internal staff time your team spends on reviews and testing. Assessment, mapping, scripting, pilot and cutover are one-time costs. Ongoing support, upgrades and continuous testing are separate retainers, so ask whether the quote includes any of them.
How long does a Keycloak to Zitadel migration take?
The timeline depends on the drivers that shape the work, so no fixed duration applies to every migration. The main drivers are the number of realms, the number of clients and custom flows, how many users have credentials that must carry over, how many applications need repointing, and how many change windows your organization allows. Ask DeployOpen for a timeline in the written scope, with milestones for assessment, mapping sign-off, pilot and each cutover window. Confirm which milestones depend on your team, such as approvals and test access, so you can plan staff time against them. If you plan a Keycloak upgrade during the same period, put that sequence in the scope as well.
Can our own team migrate from Keycloak to Zitadel without a partner?
Yes, if your team has administrators for both Keycloak and Zitadel and the time to run the work. The documented tools are public: the Keycloak export with kc.sh export, the zitadel-tools migration utility, and the POST /admin/v1/import endpoint in Zitadel. A partner adds planning capacity, a second set of hands for mapping and testing, and experience with cutover sequencing. Your team still owns the decisions that no partner can make for you, such as which Keycloak realms become which Zitadel organizations and who signs off on the mapping. Before deciding, check whether your staff can run a pilot without disrupting production sign-in and whether they can cover the work during your change windows.
What does our team need to provide for a Keycloak to Zitadel migration?
Your team provides the inputs and decisions that the migration cannot infer from the systems alone:
- Realm exports from Keycloak, produced for the migration tooling so that user records and credential data can be converted.
- A client inventory listing every OIDC and SAML client, its redirect URIs, scopes and the application behind it.
- Admin access to the Keycloak realms and to the target Zitadel instance, including an instance owner account for imports.
- Test users in each realm and named application owners who can confirm sign-in after cutover.
- Change windows for each cutover, agreed with the business owners of each application.
- Written sign-off on the mapping of realms, clients and roles to Zitadel organizations, projects and applications before the pilot starts.
Do users have to reset their passwords after moving from Keycloak to Zitadel?
It depends on whether each user's password hash carries over. The Zitadel Keycloak migration guide describes converting exported users with the zitadel-tools utility, which keeps PBKDF2 password hashes usable, so users in those realms can keep their existing passwords. Users whose credentials cannot be carried over need a password reset, or a just-in-time approach where Zitadel checks the legacy store at login. Confirm the credential types and hash settings in each realm during assessment, since they decide the path. Treat second factors and passkeys as separate items to check. Test password sign-in and any second factor for a sample of users in the pilot before any cutover.
What does Zitadel self-hosting and Enterprise cost?
Zitadel's pricing page lists a Free plan at US$0 per month with 100 daily active users, and a Pro plan at US$100 per month including 25,000 daily active users, both for Zitadel Cloud. The Enterprise plan has custom pricing and covers self-hosted or cloud deployments, with custom support agreements and technical account management. The page also lists ISO 27001, SOC 2 Type II and OpenID certification for Zitadel. Confirm with Zitadel which license terms and fees apply to your self-hosted deployment, since the core moved to the GNU Affero General Public License 3.0 with v3.0 on 31 March 2025. DeployOpen's migration quote is separate from any Zitadel plan or license fee, so ask for both as separate lines.
Does DeployOpen issue an audit report for the migration?
No. DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports, attestations or certifications. Independent auditors and certification bodies issue those documents. For a migration, the evidence usually includes the signed-off mapping, change records for each cutover, the import results, and the configuration of login, access and administrator settings in your Zitadel instance. Ask your auditor which of these they need before the pilot, so the evidence is collected as the work happens. Zitadel's listed certifications describe Zitadel's own offering, so your controls on your own deployment still need their own evidence.
How do we verify imported Keycloak users arrived correctly in Zitadel?
Check the Zitadel events API for user.human.added events, which record each imported human user. Compare the count and identifiers in those events against the Keycloak export for each realm, and log the result of each import batch so failed records can be retried. Then test sign-in for a sample of users in every realm, covering the password path, any second factor and the redirect back to the application. Confirm that organizations, projects and roles match the signed-off mapping, and that each application points at the Zitadel issuer before cutover. Store the verification output with the change record for that window.
How DeployOpen scopes and delivers a Keycloak to Zitadel migration
DeployOpen treats each Keycloak to Zitadel migration as a fixed-scope engagement, with the realm inventory, user counts, password hash handling and application list agreed in writing before work starts. The work runs inside your own infrastructure, so exports, converted files and the Zitadel instance stay under your control. Ongoing support, upgrades and continuous testing are available as retainers once the cut-over is complete.
How we scope
- Written scope lists each Keycloak realm, client and role mapping to Zitadel instances, organizations, projects and applications.
- Scope records which user stores, hash types and login flows need to move, and which are retired.
- Fixed-scope terms set the deliverables, acceptance checks and timeline before any export runs against production.
How we build
- Export realm users with kc.sh export, keeping PBKDF2 password hashes intact for conversion.
- Convert users with the zitadel-tools migration utility, then import them through POST /admin/v1/import.
- Map realms, clients and roles to organizations, projects and applications, then test each sign-in path before cut-over.
How we hand over
- Verify imports by checking user.human.added events in the Zitadel events API against the export counts.
- Document the realm-to-organization mapping, client settings, role grants and the import runbook for your team.
- Hand over test results and the list of Keycloak components to retire, with an owner named for each.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the migration is live.
- Ask whether a retainer covers Zitadel version upgrades, including the PostgreSQL versions your deployment requires.
- Confirm how Keycloak is retired after cut-over, including whether the old realm stays read-only for rollback.

