Self-hosted Keycloak or managed Keycloak: which model fits your team
Choose self-hosted Keycloak when identity data must stay inside your own cloud accounts, data centers or air-gapped network and your team can run what sits behind it. Choose a managed Keycloak service when you cannot staff that work and the provider's regions, feature set, upgrade policy and pricing meet your requirements, confirmed in writing before you commit. Keycloak is Apache-2.0 licensed, so the license does not settle the question. The decision turns on where users, credentials and sessions live and who answers when they fail. Self-hosting means you run a relational database in production, such as PostgreSQL 14 to 18, and the development file database is not suitable for production. High availability designs also need a synchronously replicated database, so involve your database team early.
Upgrades are where the operating effort shows. Keycloak plans four minor releases a year and says breaking changes in a minor release will be opt-in, but the 26.8 upgrade notes still change behavior: SMTP StartTLS is enforced without plaintext fallback, backchannel logout tokens from external providers must have their signatures validated, and login failures are persisted to the database by default. Schema migrations run automatically at startup unless you choose manual migration, and the Operator documentation strongly recommends manual approval mode for operator updates. When you self-host, your team reads these notes, tests them and schedules each change. Ask a managed provider how it announces upgrades, how much notice you receive, whether you can delay a release, and who tests your configuration before a change reaches production.
Before you pick the managed route, get written answers on four points: the regions where realms and user data are stored and backed up, which features are included (for example LDAP or Active Directory federation, SAML, Organizations and passkeys), the upgrade policy, and the pricing model, including what drives the bill. Also ask how you export realms, users and client configuration if you leave. Self-hosting carries its own checks: TLS on all communication, a reverse proxy with path restrictions, the admin console on a different hostname from public frontend URLs, and metrics at /metrics once you start with --metrics-enabled=true. Those controls are yours to build and keep when you self-host, and to verify when a provider runs them.
How self-hosted Keycloak and managed Keycloak compare factor by factor
This table compares self-hosted Keycloak with a managed Keycloak service on the features and facts that most affect fit: licensing, release, databases, high availability, federation, brokering, Organizations and metrics. Read the self-hosted column as what the upstream project provides, and the managed column as questions to put to the provider, since managed terms vary. The main takeaway: the feature sets largely overlap, so the decision usually turns on who runs the database, upgrades and monitoring.
| Factor | Self-hosted Keycloak | Managed Keycloak |
|---|---|---|
| Upstream license | Apache-2.0, per the LICENSE file in the keycloak repository. Ask counsel what applies if you modify the server. | Confirm with the provider whether it runs upstream Keycloak and what terms govern the service. |
| Current release | 26.8.1, published October 13, 2026. You schedule minor and patch upgrades within your own change control. | Confirm which Keycloak version the provider runs and how quickly it applies new minor releases. |
| Production databases | PostgreSQL 14 to 18, MariaDB, MySQL, Microsoft SQL Server, Oracle Database and Amazon Aurora PostgreSQL. The dev-file database is not suitable for production. | Confirm the database engine and version the provider uses, and whether you can choose or move it. |
| High availability designs | Three documented: single cluster across availability zones, multi-cluster v2, and deprecated multi-cluster v1. Supported designs need synchronous database replication. | Confirm which design the provider runs, which regions or sites it covers, and how failover is tested. |
| LDAP and Active Directory federation | Built in and documented in the server administration guide. You control the directory connection and its network path. | Confirm whether the provider allows LDAP or AD federation, how it reaches your directory, and which AD versions it supports. |
| Identity brokering | Brokers logins to external OIDC or SAML providers and common social providers, configured per realm. | Confirm which external identity providers the service accepts and whether custom OIDC or SAML brokers are allowed. |
| Organizations feature | Documented in the server administration guide for managing member organizations and their domains. | Confirm the provider exposes Organizations, whether it is enabled on your plan, and the version it runs. |
| Metrics at /metrics | Prometheus-format metrics at /metrics on the management interface when metrics are enabled. You scrape and store them. | Confirm whether you can scrape metrics or receive them, and which login, cache and admin data you can access. |
Who controls data location, access and compliance evidence
Who runs the platform decides who holds the data, who can reach the admin paths and which evidence an assessor can collect. The cards below set out what you control in a self-hosted Keycloak, what a managed service controls and what to confirm before you sign. Read each card against your own residency rules and assessment scope.
Where the data sits
Self-hosted Keycloak keeps realm configuration and user records in the database you run, so you choose the region, data center or air-gapped network. If you federate users from LDAP or Active Directory, those records stay in that directory. With a managed service, the provider chooses where the database, backups, logs and support access sit. Ask for the list of regions, where backups are copied and which staff or systems can open the database from outside your chosen region.
Admin console on its own path
Keycloak's production guide calls for the admin console and Administration REST API to sit on a different hostname or context path from public frontend URLs. Self-hosted, you enforce that split yourself through DNS, the reverse proxy and network rules, and you decide which admin accounts can reach it. In a managed service, ask whether the admin hostname is separate from login pages, whether it is reachable from the public internet and how provider staff access your realm during an incident.
Keycloak production guideTLS and proxy path rules
The same production guide calls for TLS on all communication and a reverse proxy with path restrictions. Self-hosted, you own the certificates, the protocol and cipher settings and the proxy rules that decide which paths reach admin endpoints and which reach public login pages. In a managed service, ask which TLS versions the service accepts, who renews certificates and whether you can set your own path rules or allowlists at the edge. Retest those rules after every upgrade so that new endpoints do not slip past them.
Audit and log access
Keycloak can expose Prometheus-format metrics at /metrics on its management interface when you start it with --metrics-enabled=true. Metrics show service health and performance and do not replace an audit record of who changed a realm or signed in. Confirm how admin events and login events are written, where they are stored, how long they are kept and whether you can export them to your own log platform. Self-hosted, you set retention and decide who reads the logs. Managed, check whether those exports exist and who at the provider can read them.
Splitting compliance evidence
DeployOpen prepares systems, controls and evidence for compliance assessments, but it does not issue audit reports or certifications. Independent auditors and certification bodies do that work. Self-hosted, your team produces the configuration, access and change evidence for the whole stack. In a managed service, the provider holds its own attestation documents, which describe its service, while your realm and client configuration remains your evidence to produce. Request the provider's current attestation documents and confirm their scope by region before relying on them.
Where the trust boundary sits in each model
The diagram starts at the user browser, which sends login traffic through a TLS reverse proxy to the Keycloak nodes, and those nodes read and write the relational database. The admin console and Administration REST API sit on a separate hostname, so the proxy can restrict public paths while admin access stays on its own route. In the self-hosted model, your team operates every component in the left group, including the proxy, nodes, database and admin hostname. In the managed model, the provider boundary encloses the nodes, database and admin hostname. Confirm in writing where that line falls, who can reach the admin path, and where data and backups are held.
Request path in each model, with the provider boundary to confirm.
What your team runs in each model
This table lists the operating work each model leaves with your team, row by row. Read the self-hosted column as tasks you staff and the managed column as items to confirm in writing with the provider. The main takeaway is that self-hosting keeps upgrades, databases, certificates and on-call with your team, so the decision depends on whether those skills and capacity already exist.
| Operating area | Self-hosted Keycloak | Managed Keycloak |
|---|---|---|
| Database operations | You choose, size and run a supported production database such as PostgreSQL 14 to 18. | Provider runs the database. Confirm the engine, version and maintenance windows you get. |
| High availability | You design the cluster, the load balancer and a synchronously replicated database for the chosen HA design. | Confirm the availability design, failover behavior and whether it spans availability zones. |
| Upgrades and patching | Keycloak plans four minor releases a year. Breaking changes in minor releases are opt-in, so you decide when to adopt them. | Confirm the upgrade schedule, notice period and whether you can pin or defer a version. |
| Operator updates on Kubernetes | Use manual approval mode, which the Operator documentation strongly recommends, to avoid unintended upgrades. | Confirm whether upgrades apply automatically and whether you can approve them before they run. |
| Backups | You back up the database and configuration and test restores on your own schedule. | Confirm backup frequency, retention, restore testing and how a restore is requested. |
| Monitoring | Enable metrics with the metrics-enabled setting, then scrape the Prometheus-format endpoint on the management interface. | Confirm whether Prometheus-format metrics or equivalent logs are exposed to you, and how long they are kept. |
| Certificates | You issue, rotate and protect TLS certificates for every hop, including the admin console hostname. | Confirm who manages certificates, custom domain support and how rotation is scheduled. |
| Runtime | Kubernetes with the Keycloak Operator, or the server distribution on virtual machines, both run by your team. | Confirm the hosting region, data location and whether the instance is dedicated to your organization. |
| On-call | Your team carries pages for Keycloak, the database, the load balancer and certificate expiry. | Confirm support hours, response targets and the escalation path in the written agreement. |
Who applies upgrades and patches, and how often they arrive
Self-hosting Keycloak means your team owns every upgrade, and the project's release rhythm sets the workload. Since Keycloak 26.0, the project plans four minor releases a year and a major release every two to three years, and it says breaking changes in a minor release will be opt-in. Minor releases are therefore routine work, while a major release needs its own planned test window. The current release is 26.8.1, published October 13, 2026, so a team running an older line will face several minor upgrades before it catches up. The Keycloak Operator documentation strongly recommends manual approval mode for operator updates, which keeps a human decision in front of every new version applied to production.
Two decisions shape each upgrade. By default, Keycloak migrates its database schema automatically at startup, which is simple for a small deployment but means the first node that starts changes the shared database. The upgrading guide suggests manual migration for large deployments, where the team applies the SQL through a reviewed change and can plan database rollback separately. The 26.8 upgrade notes change work for operators in three places: SMTP connections must use StartTLS with no plaintext fallback, so relays that only accept plaintext will fail until reconfigured; backchannel logout tokens from external providers must pass signature validation; and login failures are persisted to the database by default, which adds write load and retention to plan for. Read these notes against your current version before scheduling any move.
Upgrade terms belong in the contract. If you compare a managed Keycloak service, ask which release line it runs and how far behind the current release it sits, how much notice it gives before each minor and major upgrade, which maintenance windows it uses and whether you can choose one, whether 26.8 changes such as enforced StartTLS are tested against your configuration before they reach your tenant, and how rollback works, including whether database schema changes can be reversed. If you self-run instead, Red Hat build of Keycloak is a supported distribution based on the open source project that replaces Red Hat Single Sign-On. Confirm which version it currently ships before you plan your upgrade calendar against its lifecycle.
What drives the cost of each model
With self-hosting, your organization pays its cloud or data center provider, its own staff, and any vendor subscription directly. The largest one-time cost is the initial build, and most of the rest recurs every month. Cost rises with the number of nodes you run for availability, the size of the database, and how often your team upgrades and tests.
- Compute and load balancing: You pay for the nodes that run Keycloak, the external load balancer in front of them, and the reverse proxy with path restrictions. Cost rises with the nodes needed for availability and with each extra environment, such as development, test, and production.
- Production database: Keycloak needs a relational database in production, and the dev-file database is for development only. The high availability designs need a synchronously replicated database, so budget for the replicated service, its backups, and any commercial engine licensing. Supported engines are listed in the Keycloak database guide.
- Staff time, on-call, and upgrade testing: Your team owns the upgrade calendar, schema migration, monitoring, and the on-call rota. Keycloak plans four minor releases a year, and each one still needs a staging run against your own realms and clients, since the 26.8 upgrade notes changed defaults such as enforced SMTP StartTLS and persisted login failures.
- Red Hat subscription, if chosen: The Red Hat build of Keycloak is an optional supported distribution of the open source project. It adds a recurring cost on top of infrastructure, so confirm its terms with Red Hat or in a written quote.
Before comparing totals, ask your team to estimate the hours each upgrade cycle takes and confirm the database engine and licensing terms in your own environment.
With a managed service, the provider runs the servers, database, and platform upgrades, and you pay a fee for that work. Your spending shifts toward a recurring charge plus the configuration and testing that stay on your side. Use the provider's published price list or a written quote as the source for any figure, since pricing terms differ between providers.
- Service fees: The provider bills for running the platform, usually as a recurring charge. Ask which metric the bill uses, such as users, logins, or environments, and whether production and non-production environments are billed separately.
- Storage and data charges: Backups, retained audit records, and exports may carry separate charges or retention limits. Confirm the region where your data is held and any fee to export realms, users, and logs when you leave.
- Work that stays with you: Realm and client configuration, identity brokering, login themes, and any federation to on-premises Active Directory or LDAP remain your work. Initial configuration is one-time, while changes to applications and directory links recur, and the network path to on-premises directories needs your monitoring.
- Upgrade testing and change control: The provider schedules platform upgrades, but your team still tests each connected application and approves the upgrade window. This cost recurs and grows with the number of applications on the platform.
In the written quote, ask for the billing metric, the storage, backup, and support tiers included, where data is held, how much notice upgrades receive, and the export terms if you leave.
Moving from self-hosted Keycloak to managed Keycloak, and back
This sequence moves a Keycloak estate between a self-hosted server and a managed service without breaking the applications that sign in through it. It produces a tested target realm, written decisions on extensions and versions, and a cutover with a rollback path. The reverse move follows the same plan, and the target Keycloak version must match the source or follow it on a supported upgrade path.
Inventory realms, clients, identity providers and federation links
The platform team that runs the current Keycloak server, working with each application owner, lists everything the sign-in path depends on. For every realm, record the clients with their client type, redirect URIs and token settings, the external OpenID Connect or SAML identity providers used for brokering, and the LDAP or Active Directory federation links with their mappers. Also record any custom authenticators, themes or provider JARs, the admin accounts, and who owns each application. The step is done when every application maps to a named client and each dependency has an owner and an entry in one inventory document.
Confirm extension and version support with the provider
The platform team asks the managed service provider in writing which Keycloak versions it offers, whether custom providers, themes and authenticators can be deployed, and what review each one needs. Ask whether the service can reach your LDAP or Active Directory server over your network path, what database access you get, and how it handles SMTP and outbound identity provider connections. Compare the answers with the inventory from the previous step. The step is done when each extension is marked as accepted, replaced or retired, and the approved Keycloak version is recorded next to your current version.
Export configuration and plan the database move
The platform team exports each realm's configuration from the source server and stores the files under the same access controls as production secrets, because they may contain client secrets and key material. Confirm with the provider whether user records, password hashes, OTP and WebAuthn credentials can be imported, or whether users must re-enroll their factors. Document how data from your relational database reaches the target database, how the import runs, and who can read the export. The step is done when the export is checked against the inventory, the import method is confirmed in writing, and a dated backup of the source database exists.
Test the target in a non-production realm
Import the exported configuration into a non-production realm on the target service, using a test hostname and test copies of the relying applications. Exercise each client type with password sign-in, MFA enrollment and reuse, identity brokering, directory sign-in and logout. Check that the token issuer and claims match what each application expects, and run directory sync if federation is in use, comparing the results against the source. The step is done when every test case from the inventory passes and the results, including any differences from the source, are recorded for the cutover owner to review.
Plan cutover around issuer and client settings
Relying applications validate tokens against the issuer, so a hostname change on the managed service changes the issuer value that every application must trust. Prepare the issuer URL, discovery endpoint, redirect URIs and client secrets for each application, and deliver any new client secrets through your secrets manager and never through email. Switch applications in a planned order with their owners present, starting with a low-risk group. The step is done when each application in the first group accepts tokens from the new issuer and its owner has signed off the switch.
Keep a rollback path until sign-in is verified
Keep the source server, its database and its realm configuration unchanged until sign-in is verified for every application and admin group. Record the issuer, hostname and client settings each application used before the switch, so its owner can restore them quickly if a problem appears. Users who sign in to the target after cutover create state that the source does not have, so decide in advance how that state is handled if you roll back. The step is done when each application is verified on the new issuer, the rollback owner has confirmed the source can be restored, and the retirement decision for the source is documented.
Questions buyers ask before choosing self-hosted or managed Keycloak
What drives the cost of self-hosted Keycloak compared with a managed service?
The main difference is who carries the operating work and who pays for the infrastructure. Self-hosting costs include compute and storage in your own cloud account or data center, a production database, load balancing, monitoring, backups, and the staff time to build, patch and answer alerts. A managed service bundles much of that into the provider's fee, so you pay the provider's price model and still carry integration, identity configuration and internal support. Costs rise with the number of environments, multi-zone high availability, on-call coverage and upgrade frequency. Ask any provider or partner to separate one-time setup from recurring fees, and ask what each quote assumes about user counts, regions and support tier.
How long does a self-hosted Keycloak build and cutover take?
Timing depends on your environment, so a reliable answer comes from a written scope that lists phases, assumptions and exit criteria before any date is set. The main drivers are the number of realms and clients to migrate, whether users come from LDAP or Active Directory federation or from Keycloak's own store, how many external identity providers you broker to, and whether the target runs on Kubernetes with the Keycloak Operator or on virtual machines. Cutover effort also depends on your database choice, TLS and reverse proxy setup, how many applications need updated redirect URIs or token settings, and how much change control and testing your organization requires. High availability adds design work, since the two supported high availability designs both need a synchronously replicated database. Ask who owns each dependency and what happens if a cutover window slips.
What skills does a team need to run Keycloak itself?
The team needs working depth in the platform it chooses, plus the surrounding services that keep Keycloak available. On Kubernetes, that means cluster operations, the Operator lifecycle and namespace-level networking. On virtual machines, it means Linux administration, service management and a repeatable install from the server distribution. In both models, someone must administer the production database, since Keycloak needs a relational database in production, and manage TLS certificates and the reverse proxy path rules that keep the admin console on a separate hostname. Metrics are exposed at /metrics when metrics are enabled, so someone must scrape, alert and dashboard them. Finally, an on-call rota must cover login outages, failed upgrades and certificate expiry. A managed service usually moves platform and database work to the provider, but integration, identity design and application on-call usually stay with you. Check whether your team already holds these skills before you commit to building in-house.
Can a team run self-hosted Keycloak without outside help?
Yes, a team with the platform, database and operations skills described above can run Keycloak without outside help. The real test is depth: Keycloak sits in front of every login, so an upgrade or database fault affects the whole organization. Outside help is most useful for the first build, for hardening against the production guidance, for upgrade planning and for a one-time configuration review before go-live. Ask whether your staff have already taken an identity service through a major upgrade, and whether they have restored the database to a tested point in time. DeployOpen works inside your own infrastructure and offers fixed-scope engagements with written deliverables, plus retainers for ongoing support, upgrades and continuous testing. Whether you need that help depends on your team's capacity and the on-call load you can sustain.
Can a managed Keycloak service meet our data residency and compliance requirements?
It can, but only for the requirements the provider's own contract and attestation scope cover, so confirm each one in writing before you choose it. Start with the data your identity service holds: user profiles, credentials or password hashes, session and audit records, and the logs they generate. For each, ask where it is stored and processed, which regions and subprocessors are involved, and whether backups, support access and telemetry stay in the same jurisdiction. Then ask for the current report or documentation the provider can share, and check the scope: which services, which regions and which period it covers. An attestation covering the vendor's platform does not automatically cover your configuration, your integrations or your applications. Self-hosting in your own cloud account or data center keeps those decisions with you, so your compliance team can review the controls directly.
What does it cost to move Keycloak to a different model later?
The cost is mostly in the data, client configuration and cutover, and it grows the more applications depend on your settings. Start by confirming which configuration export and import each platform supports, and whether password hashes, MFA enrolments and passkeys can move; if credentials do not transfer, users may need to re-enroll second factors. Each connected application needs its redirect URIs, signing and token settings checked during cutover. Plan a parallel run, a rollback path and a freeze window, and ask for those steps to be scoped and priced separately. You can lower the cost of a later move now by keeping realm and client definitions in version control. With the Keycloak Operator, KeycloakRealmImport and KeycloakOIDCClient resources can hold that state. Ask any provider for its export format and exit terms in writing before you sign.
How do upgrades and patching differ between self-hosted and managed Keycloak?
In a self-hosted model, your team or partner schedules every upgrade and patch, so the release cadence and the change window are yours to manage. Keycloak plans four minor releases a year and a major release every two to three years, and it says breaking changes in a minor release will be opt-in. The Keycloak upgrading guide lists 26.8 upgrade notes that include enforced SMTP StartTLS without plaintext fallback and mandatory signature validation of backchannel logout tokens, so test those against your mail and federation settings before you upgrade. The Operator documentation strongly recommends manual approval mode for operator updates to avoid unintended automatic upgrades. Schema migration runs automatically at startup by default, and large deployments can apply it manually. In a managed model, ask the provider which Keycloak versions it runs, how long it keeps them, how much notice you get, and whether you can hold a version for testing.
What does DeployOpen do for self-hosted Keycloak, and what does it do for managed Keycloak?
For self-hosted Keycloak, DeployOpen plans, implements, customizes, integrates, hardens, backs up, upgrades, documents and supports the platform inside your own cloud accounts, data centers or air-gapped networks. Engagements are usually fixed-scope, with scope, deliverables and timelines agreed in writing before work starts, and ongoing support, upgrades and continuous testing are available as retainers. DeployOpen can also test the applications and integrations around Keycloak, and prepare the systems, controls and evidence your compliance team reviews. It does not issue audit reports or certifications, so independent auditors still make that determination. A managed service falls outside the self-hosted model DeployOpen describes, because its work centers on platforms it deploys in your infrastructure. Any help with a managed deployment would depend on a written scope that names exactly what is included. DeployOpen does not publish a price list, and a quote follows from that scope.
How DeployOpen scopes and supports self-hosted Keycloak
DeployOpen is a Chainscore Labs company that plans, implements, hardens, backs up, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Keycloak, the choice between running it yourself and buying a managed service gets weighed against your data location, upgrade rules and staffing before any build starts. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing first.
How we scope
- The written scope names the Keycloak release line, the database and the hostnames to be covered.
- Scope records which realms, user sources, identity brokers and client applications move onto the platform.
- Deliverables and timelines are agreed in writing before work starts, and a quote follows from that scope.
How we build
- Deployment on Kubernetes or virtual machines, with the database and reverse proxy documented as separate decisions.
- Admin console and Administration REST API kept on a different hostname or context path from public URLs.
- Identity brokering, LDAP or Active Directory federation, and metrics enabled and exposed for monitoring.
How we hand over
- Written runbooks for upgrades, database schema migration and rollback, matched to the Keycloak release line in use.
- If you run the Operator, set update approval to manual and record the reasoning for your change board.
- Handover covers the documentation, access list and evidence that your compliance team needs to review the setup.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, scoped in writing like the original work.
- Each Keycloak release is reviewed against its upgrade notes before your next maintenance window.
- Ask the managed provider who applies patches and who holds backups, since that split changes your scope.

