Can we use Keycloak commercially under Apache 2.0 without buying a license?
Keycloak is licensed under the Apache License 2.0, and the community downloads are offered without a license key or sign-up. The project's downloads page at keycloak.org publishes the server archive and the Quay container image with no license key or registration step, and the LICENSE.txt file in the keycloak/keycloak repository carries the Apache License, Version 2.0 text. If an approval document needs a license position, that is the starting point: you do not purchase a license to run the community build in production, and the terms permit commercial use, modification and redistribution subject to the conditions in Section 4 of the license.
Procurement, legal and security should each read this page for different reasons. Procurement needs to confirm that no license fee or key appears in the cost model for the community build. Legal needs to review the attribution, notice and redistribution conditions if your organization will ship a customized Keycloak image to customers or partners. Security needs to know which artifact is being approved, because the license position covers the community build only. Confirm the exact version and artifact your change record names, and check the third-party license notice the downloads page links to for dependency licenses.
The position does not extend to Red Hat build of Keycloak, which is Red Hat's supported distribution based on the open source project. Red Hat delivers it under a Red Hat subscription, and its entitlement article says it is included in Red Hat Runtimes, Red Hat Application Foundations and OpenShift Container Platform subscriptions and is not sold separately. If you are considering that build, record it as a separate licensing and support decision, and confirm the entitlement terms with Red Hat through the Red Hat build of Keycloak entitlement article before the approval document is finalized.
Which license or subscription applies to each Keycloak distribution
This table compares the community Keycloak server with the Red Hat build of Keycloak on the terms that govern each, what each grants, what each restricts and what is published about price. Read it as a decision aid: the community server needs no key or sign-up, while the Red Hat build arrives only with a qualifying Red Hat subscription, and the published price for that route is found on the pricing page.
| Distribution | Governing terms | What it grants | What it restricts |
|---|---|---|---|
| Community Keycloak server | Apache License 2.0, text in LICENSE.txt in the keycloak/keycloak repository | Use, modify, redistribute and sublicense the server in source or object form, plus a patent license from contributors | Redistribution requires a copy of the license, prominent change notices, retained notices and any NOTICE attributions; no trademark use beyond describing origin |
| Community server archive and Quay container image | Apache License 2.0, distributed from keycloak.org downloads | Download and run without a license key or sign-up | Same Apache 2.0 conditions apply to any customized build or image you redistribute |
| Red Hat build of Keycloak | Red Hat subscription terms and the Red Hat Customer Portal entitlement article | Red Hat-supported distribution based on the open source project, delivered with the subscription | Available only under a qualifying subscription; not sold separately; subscription terms govern use |
| Entitlement through Red Hat Runtimes | Red Hat Runtimes subscription | Includes the Red Hat build of Keycloak as part of the subscription | Confirm with Red Hat which subscription tiers and core counts apply to your environment |
| Entitlement through Red Hat Application Foundations | Red Hat Application Foundations subscription | Includes the Red Hat build of Keycloak as part of the subscription | Confirm inclusion and terms for your exact subscription before relying on it |
| Entitlement through OpenShift Container Platform | OpenShift Container Platform subscription | Includes the Red Hat build of Keycloak as part of the subscription | Not available as a standalone purchase; confirm terms with Red Hat |
| Standalone Red Hat build price | Not published in the supplied facts | No standalone price is confirmed here | See the Keycloak pricing page and request a quote from Red Hat for current figures |
What the Apache 2.0 license grants you in practice
The Apache License, Version 2.0 governs the Keycloak source and object code as published in the keycloak/keycloak repository. The four points below cover what you may do with it, what protects you from contributors, what you must keep when you pass it on, and what the license leaves out.
Copyright license to use and change
The license grants a perpetual, worldwide, royalty-free copyright license to reproduce, modify, sublicense and distribute Keycloak in source or object form. You can run it in production, change it for your own needs and pass it to your suppliers without paying the project or asking permission. The grant covers the code as published, so any change you make to it becomes your own work to document, test and maintain. Confirm that your legal team agrees the grant fits your internal and customer-facing use.
Keycloak LICENSE.txtPatent license from contributors
Each contributor grants a license under its patent claims that its own contributions necessarily infringe, so you can make, use, sell and import the work without that contributor suing you over those claims. The protection is limited to each contributor's contribution and does not cover patents held by third parties that are unrelated to the code. If your architecture relies on specific patented techniques outside Keycloak, such as proprietary federation hardware, check those separately with counsel.
Conditions for redistribution
If you redistribute Keycloak or a modified build, including a container image, you must give recipients a copy of the license, mark changed files with prominent notices, and keep copyright, patent, trademark and attribution notices in the source. You must also carry over any NOTICE file entries. Teams that ship a customized image to customers or sister companies should build these notices into their release pipeline, because missing notices are the most common way a redistribution goes wrong.
Trademark exclusion
The license does not let you use the Keycloak name, logos or other product names except for reasonable and customary use that describes the origin of the work. A product named after Keycloak, or a branded distribution you sell, needs a separate decision about naming. Keep the Keycloak name in plain descriptive text, and review any custom branding of the login or admin pages with your legal team before it reaches customers.
What changes when you redistribute a customized Keycloak build or container image
Running Keycloak inside your organization, serving your own users, or modifying the server for your own deployment does not trigger the redistribution conditions of the Apache 2.0 license. Those conditions apply when you pass a copy of Keycloak, or a derivative of it, to someone outside your organization, such as a customer, a partner, or a managed service provider who ships it to their clients. Before you build a customized server archive or container image for anyone else, decide whether that handoff is a distribution under the license, because the answer determines what you must include with it.
Section 4 of the license sets out the conditions. Recipients must receive a copy of the Apache License. Every file you modified must carry a prominent change notice. The copyright, patent, trademark and attribution notices from the source must stay in place in the source form you distribute. If the project includes a NOTICE file, you must carry its attributions into your redistribution. For a custom image, this usually means the license text and notices are present in the image filesystem and in any source you publish alongside it. Ask your build owner to show where each of these items lives in the artifact, not only in the repository.
A redistributed image also contains third-party components that carry their own licenses. The third-party license notice published on the Keycloak downloads page lists license and source information for Keycloak's dependencies. Review that notice against the exact dependencies in your image, including any extensions, themes or libraries you add, and confirm that the notices you ship cover them. Also confirm with counsel how the trademark limit in Section 6 applies to the name and logo on your branded image, since the license does not grant rights to the Keycloak name beyond describing the origin of the work.
Which license position fits internal, embedded and customer-facing use
When Keycloak signs in only your own employees to internal applications, and no copy of the server or a modified build leaves the organization, the license obligations are light. Apache 2.0 allows you to use and modify the work without a fee or license key, and running it on your own servers for staff does not by itself distribute copies.
- No redistribution step: Operating Keycloak for internal users does not by itself trigger the notice conditions in Section 4 of the license.
- Internal changes: Modifications you keep inside the company carry no obligation under Apache 2.0 to publish source code.
- Descriptive naming: Internal portals may refer to Keycloak in a descriptive way, which Section 6 permits for reasonable and customary use.
- Red Hat subscription: Not needed for the license. It becomes relevant only if you want Red Hat's supported build, which is delivered under a subscription and is not sold separately.
Ask counsel whether any copy leaves the organization, for example on a vendor's managed environment, a contractor's workstation or a backup held by a third party, because each of those can change the analysis.
If you embed Keycloak or a derivative inside a product you sell, or ship a container image that bundles it, you are redistributing the work. Section 4 applies to every copy you distribute, whether it is delivered as software, an appliance or an image pulled by customers.
- License copy: Include a copy of the Apache License with the product or image so recipients receive the terms.
- Change notices: Mark each modified file with a prominent notice that you changed it.
- Retained notices: Keep the copyright, patent, trademark and attribution notices in source form, and carry over any content from the NOTICE file.
- Third-party dependencies: Keycloak's dependencies carry their own licenses. The Keycloak downloads page publishes a third-party license notice with license and source information that you should reproduce for your distribution.
- Branding: Section 6 grants no right to use Keycloak trade names or product names as your product name, so describe your offering as based on Keycloak.
Ask counsel to review the notice bundle, the image labels and product marketing, and whether your customer contracts add obligations that the Apache terms do not address.
Operating Keycloak as a hosted identity service for other organizations is a different position from internal use. Apache 2.0 does not prohibit commercial hosting, and it does not require you to publish changes you make to run that service. Whether a hosted arrangement counts as redistribution depends on facts counsel must assess, including whether you deliver any component into the customer's environment.
- Commercial hosting: The license grants use and modification rights without a fee, so a paid service is not barred by the license alone.
- Delivered components: If you install agents, images or customized builds into customer-controlled environments, the Section 4 conditions apply to those copies.
- Service naming: Your service name and sales material should not present the offering as an official Keycloak product, because Section 6 limits use of the project's names.
- Customer contracts and data: Service agreements, data processing terms and support commitments sit outside the license and need their own review.
- Red Hat terms: Any Red Hat entitlement terms are separate from the Apache license and must be checked before you describe a Red Hat build based service.
Ask counsel to map each delivery model, such as a shared tenant, a dedicated instance or a customer-premises component, to the Apache conditions before you publish the service description.
Air-gapped networks change how you obtain and move the software, not the license terms. The keycloak.org downloads page offers the server archive and the Quay container image without a license key or sign-up, so you can obtain the artifacts through your own approved process and transfer them under your change procedures.
- No activation step: Installing from the archive or the image does not require a license key or registration, so no license server needs to be reachable.
- Carried notices: Transfer the license text, the third-party license notice and any NOTICE content with the artifacts into the enclosed network.
- Internal mirrors: A private registry or file store that holds copies is still a set of copies, so the notice conditions apply to each one you make.
- Red Hat subscription: Red Hat build of Keycloak is included in Red Hat Runtimes, Red Hat Application Foundations and OpenShift Container Platform subscriptions and is not sold separately. Confirm your entitlement and update access before the network is closed.
- Provenance: Verify the artifacts you import against the project's published sources using your own intake process.
Ask counsel and your security team to confirm how artifacts are approved, mirrored and documented for the enclosed environment, because the license does not establish that those steps meet your internal or regulatory requirements.
What the license requires of your organization
Apache 2.0 lets you run Keycloak, change it and ship it without paying a fee or asking permission. The obligations that remain apply mainly when you redistribute the software or a customized build, so the cards below cover what you must carry along, what you must mark and where the trademark line sits.
Attribution and license notices
Under Section 4, anyone who receives a copy of Keycloak or a derivative work from you must also receive a copy of the Apache License. Keep the copyright, patent, trademark and attribution notices in the source you distribute. For a container image or installer bundle, check that the license text and the third-party notices travel inside the artifact, not only in your internal repository. Confirm the exact wording in the LICENSE.txt file of the version you ship.
Keycloak LICENSE.txtChange notices on modified files
If you modify Keycloak source files, Section 4 requires prominent change notices in those files. Teams that patch the server, add SPI providers or alter themes should record who changed what and when, inside the file itself. Build pipelines that rebuild the server from a fork should keep those notices through merges and rebases, because a silent loss of a notice is an easy compliance gap to miss during an audit.
Carrying NOTICE file attributions
Section 4 also requires you to carry over any NOTICE file attributions that come with the work. Check the upstream repository for a NOTICE file in the version you use, and check the third-party license notice published on the downloads page for dependencies. Where you bundle additional components into your own image, list their attributions alongside Keycloak's so the distributed package tells a complete story.
Keycloak downloadsTrademark limits under Section 6
Section 6 does not give you permission to use the Keycloak name, logos or other trademarks, except for reasonable and customary uses that describe where the work comes from. Naming your product "Keycloak based" in a description is usually within that allowance, but branding a commercial service or container as an official Keycloak or Red Hat product is not. Ask counsel to review product names, marketing pages and any co-branding before launch.
No license key or user limit
The Apache 2.0 license contains no license key, activation step or user-count cap. The downloads page offers the server archive and the Quay container image without a license key or sign-up, as read in November 2026. Keep that statement in your own compliance file with the date you checked it, and confirm with the license text and the vendor's current download page before you rely on it for a regulated deployment.
How the Keycloak name can and cannot be used
Section 6 of the Apache 2.0 license is the part of Keycloak's terms that governs naming. It does not give you permission to use the licensor's trade names, trademarks, service marks or product names, except for reasonable and customary use to describe the origin of the work. In practice, the Apache license lets you run, modify and redistribute the code, but it does not let you call your product, service or domain "Keycloak" as if it were your own brand. The name is a separate right from the code, and the license does not transfer it.
Apply that rule to each case you are likely to face. A product name such as "Acme Keycloak" or a customized distribution sold under a new name goes beyond descriptive use, so choose a name that does not contain the Keycloak mark. A marketing page can state accurately that your service runs Keycloak, which is the descriptive use the license permits, but it should not imply that the Keycloak project endorses or certifies your offering. A managed service sold to customers needs the same care: describe it as hosted or operated Keycloak, and do not make the service name or logo look like an official project offering. A rebranded login theme is different again. Changing colors, logos and text in the theme is ordinary customization, but the theme's visible branding should not present your sign-in page as an official Keycloak product.
Before launch, have legal counsel review the product name, domain names, logos, marketing copy and customer contracts against Section 6 and the project's own trademark guidance, and confirm the current policy on the Keycloak downloads page. Record the decision in writing so that future rebrands, partner listings and conference materials follow the same rule. This review does not require DeployOpen or any other party to hold a license key or agreement, because none is required for the open source server.
What to collect before the license approval goes through
This sequence gives the approver a written record of which Keycloak license terms apply, which distribution and version the organization will run, and whether any redistribution or subscription obligation exists before sign-off.
Read the license at the target version
The engineering lead or the open source reviewer opens the LICENSE.txt file at the root of the keycloak/keycloak repository, using the tag or branch that matches the release you plan to deploy rather than assuming the main branch is the same. The file is the Apache License, Version 2.0, January 2004, and the reviewer should confirm that text against the copy at the version in use. Done when the reviewer has a note stating the license name, the version of Keycloak checked, and the date the file was read.
Confirm the distribution you need
The architect decides whether the deployment uses the community server archive or the container image published by the Keycloak project, or the Red Hat build of Keycloak, which Red Hat supplies as a supported distribution based on the same open source project. The decision depends on whether the organization needs Red Hat's support terms and tested platforms. Done when the approval record names one distribution and the artifact source for it.
Record the third-party license notice
The reviewer downloads the Keycloak server from the downloads page and saves the third-party license notice that the project publishes for its dependencies, which lists license and source information for each library. Dependencies carry their own terms, so this notice is the file the compliance team will ask for during an audit of software in use. Done when the notice is stored with the approval record and its download date is written beside it.
Decide on redistribution and modification
The legal reviewer and the platform lead answer one question in writing: will the organization give a modified Keycloak build, a custom container image or a theme and extension bundle to anyone outside the organization, such as a contractor, a customer or a subsidiary. If yes, the Apache 2.0 conditions on license copies, change notices, retained notices and any NOTICE file attributions apply to that build, and the team must plan for them in its release process. Done when the record states yes or no and lists the artifacts covered.
Check trademark and naming use
The brand owner reviews how the organization will name its service, internal portal and public materials, because the Apache 2.0 license does not grant permission to use Keycloak trade names, trademarks or product names beyond reasonable and customary descriptions of origin. The owner checks whether any custom logo, product name or public marketing claim would go beyond that description. Done when the approval record states the approved naming and any items sent to legal for review.
Confirm subscription needs for support
The procurement lead and the CIO confirm whether the organization's support model requires a Red Hat subscription. Red Hat's entitlement article states that the Red Hat build is included in Red Hat Runtimes, Red Hat Application Foundations and OpenShift Container Platform subscriptions and is not sold separately, so the team should confirm which of those subscriptions it already holds and whether the support obligations match its internal policy. Done when the record names the subscription, or states that none is required, and the contact who verified it.
File the decision with version and date
The approver files a single decision record that lists the Keycloak version, the distribution, the date the license file was read, the notice location, the redistribution answer, the naming decision and the subscription position. The record should be signed off by the owner of the approval and linked from the deployment plan so that a later upgrade can repeat the check against the new version. Done when the record is stored in the organization's change or governance system and the next review date is set.
What catches buyers out on Keycloak licensing
Keycloak's Apache 2.0 license is permissive, which is why it is easy to assume it covers everything around the project. The four cards below separate the open source code from the Red Hat build, the free download from paid support, the project name from the product you ship, and the license notices you must keep when you redistribute a customized image.
Assuming the Red Hat build is community licensed
The Apache 2.0 license covers the Keycloak project code. The Red Hat build of Keycloak is a separate, supported distribution based on that code and is delivered under a Red Hat subscription. Red Hat's entitlement article says it is included in Red Hat Runtimes, Red Hat Application Foundations and OpenShift Container Platform subscriptions and is not sold separately. Before you plan around either option, confirm which distribution you are deploying, which subscription entitles you to it, and what terms Red Hat attaches to it.
Entitlement articleAssuming a free download means free support
The keycloak.org downloads page offers the server archive and the Quay container image without a license key or sign-up. That access is free, but it does not include vendor support, a fixed support lifecycle or a contractual response commitment. Support for the community project comes through the project's own channels. If your organization needs a named vendor to answer for production incidents, that is a separate purchase, and you should ask what it covers before you rely on it.
Treating the Keycloak name as free to use
Apache 2.0 section 6 does not grant permission to use the licensor's trade names, trademarks, service marks or product names, except for reasonable and customary use in describing the origin of the work. The license lets you use and modify the code, but it does not let you brand your product or service as Keycloak in a way that suggests endorsement. Plan product names, logos and marketing copy with this limit in mind, and ask counsel to review any name that includes the project name.
Dropping notices from a custom image
If you redistribute a modified Keycloak build or a container image you built, section 4 requires you to give recipients a copy of the license, mark modified files with prominent change notices, and keep the copyright, patent, trademark and attribution notices in source form. You must also carry over any NOTICE file attributions. The keycloak.org downloads page publishes a third-party license notice covering dependencies. Build that notice into your image pipeline so each release ships with the required files.
Keycloak downloadsQuestions procurement, legal and security ask about the Keycloak license
Do we need a license key to run Keycloak in production?
No. Keycloak is licensed under Apache License 2.0, and the keycloak.org downloads page offers the server archive and the Quay container image without a license key or sign-up. The license is granted by the copyright holders to anyone who receives the work, so there is no vendor key to activate. Confirm the current download terms on the downloads page before you standardize on an image source, and keep a record of the version and checksum you deploy. If you adopt the Red Hat build instead, the terms come from a Red Hat subscription, which is a separate question covered below.
Can we run Keycloak in production and modify its source code?
Yes. Section 2 of the Apache 2.0 license grants a perpetual, worldwide, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute the work. Production use and internal modification fall within that grant. Your obligations start when you distribute the work. Modifications still need to be tracked, because the conditions in Section 4 apply to any redistributed derivative. Your engineering team should also plan how modified code will be rebased onto each new Keycloak release, since upgrade effort grows with the size of your changes.
What do we have to do if we ship a customized Keycloak inside our product?
Section 4 sets the conditions for redistribution. When you distribute Keycloak or a derivative work, you must give recipients a copy of the Apache 2.0 license, mark modified files with prominent change notices, keep the copyright, patent, trademark and attribution notices in source form, and carry over any NOTICE file attributions. For a container image or appliance, the same duties apply to the files and documentation you ship. Section 6 separately withholds permission to use Keycloak's trade names and trademarks, except for reasonable and customary descriptions of origin, so product names and logos need a separate review.
Does the Apache 2.0 license cover the Red Hat build of Keycloak?
Not in the same way. The Red Hat build of Keycloak is Red Hat's supported distribution based on the open source Keycloak project and replaces Red Hat Single Sign-On. According to Red Hat's entitlement article, it is delivered under a Red Hat subscription, included in the Red Hat Runtimes, Red Hat Application Foundations and OpenShift Container Platform subscriptions, and not sold separately. The upstream code remains Apache 2.0, but the support terms, entitlement and usage rights of the packaged build are set by Red Hat. Read the entitlement article and your subscription agreement before assuming the same rights apply to the Red Hat build.
What should we confirm with Red Hat or our counsel before we decide?
Confirm the following in writing before you rely on a position:
- Which Red Hat subscription, if any, entitles you to the Red Hat build, and whether your existing subscriptions already include it.
- Whether Red Hat's terms restrict redistribution, container image reuse or use outside the entitled environments.
- Whether your legal team needs to review the third-party license notice published with the Keycloak downloads, which covers dependencies and not only Keycloak itself.
- How you will handle Keycloak and Red Hat trademarks in your product documentation and marketing.
Counsel should review the Apache 2.0 conditions against your distribution model. This page explains the license terms and does not replace legal advice.
Is there any sign-up or usage limit that affects using Keycloak in our environment?
The license itself does not impose usage limits, seat counts, core counts or sign-up requirements on the open source project. The downloads page makes the server archive and container image available without a sign-up. Limits that do matter come from the commercial side: a Red Hat subscription is priced and counted under Red Hat's own rules, and support coverage depends on that subscription. Ask Red Hat how its subscription counts cores or nodes for your deployment, and ask your team how many environments (development, test, production, disaster recovery) you will run, since each one needs its own configuration and patching.
Do Apache 2.0 patent terms protect us if a contributor sues over Keycloak?
Section 3 grants a patent license from each contributor to make, use, sell, import and transfer the work, covering the patent claims that the contributor's contribution necessarily infringes. That grant is useful, but it is limited to contributions and the claims they necessarily infringe. It does not cover patents that apply to your own modifications or to combinations you build with other technology, and it does not replace a freedom-to-operate review. Ask counsel to review the grant against your own code and your stack, and keep a record of which Keycloak version and which patches you run.
Where to check each license claim
Start with the license text itself. The LICENSE.txt file at the root of the keycloak/keycloak repository is the Apache License, Version 2.0, January 2004, and it is the document that governs use, modification and redistribution. Read it on the main branch and compare it with the raw text copy, so your legal and engineering reviewers are working from the same wording. Confirm that the license file in the release tag you plan to deploy matches the main branch, because a reviewer's question is always about the version you actually run.
Next, check the third-party notices that ship with the server. The keycloak.org downloads page publishes a third-party license notice covering Keycloak's dependencies, along with license and source information. This matters because the Apache 2.0 terms cover Keycloak itself, while the libraries it bundles carry their own licenses. Ask your compliance team to record which dependency licenses they accept, and repeat that check whenever you move to a new minor release, since the dependency set can change between versions.
Finally, verify the Red Hat position separately. The Red Hat build of Keycloak entitlement article on the Red Hat Customer Portal describes how the build is delivered under a Red Hat subscription, and it is the source to check before you assume the supported distribution carries the same terms as the upstream archive. If your procurement team asks whether a license key or agreement is needed to download or run the community server, the downloads page is the place to confirm the current answer, and the answer should be recorded with the date you checked it.
How DeployOpen works on this
DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For Keycloak, that means turning a licensing question into a written decision about which distribution you run, who signs for it, and what your team must maintain.
How we scope
- Engagements are fixed-scope, with the scope, deliverables and timeline agreed in writing before work starts.
- The written scope states which Keycloak distribution, version line and license obligations apply to your redistributed builds and images.
- Scope also records any Red Hat subscription decision, support boundary and custom extensions that would carry their own licensing terms.
How we build
- We inventory your planned customizations, themes, SPI providers and bundled container images to check Apache 2.0 notice and change-marking duties.
- We confirm trademark usage in your product names, documentation and images so the Keycloak name is used only to describe the origin of the work.
- We test the deployment in your environment and record which license notices ship with each artifact your team will distribute.
How we hand over
- You receive a written record of the license obligations, the NOTICE and third-party attribution files, and the decisions behind them.
- Runbooks cover how to rebuild and re-notice images when you change a customization or move to a new Keycloak release.
- Handover includes a review with your legal, procurement and security owners so the license position is recorded before go-live.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers, so license checks follow each new release.
- Retainer work can include re-checking notices and trademark usage when your distribution or branding changes.
- Questions about the written license terms and your redistribution plans should go to your own legal counsel, with DeployOpen supplying the technical facts.

