Identity and SSO
What it costs to self-host Keycloak
Open Source Identity and Access Management For Modern Applications and Services Below is the server it needs at each team size, what that costs, and how long the 1 commercial product it replaces would take to cost more.
| Team size | Memory | Disk | Cheapest plan that fits | Server | With backups and your time |
|---|---|---|---|---|---|
| solo | 2.5 GB | 10 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 5 people | 2.5 GB | 10.1 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 10 people | 2.5 GB | 10.1 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 25 people | 2.6 GB | 10.2 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 50 people | 2.6 GB | 10.5 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 100 people | 2.7 GB | 11 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
| 250 people | 3.1 GB | 12.5 GB | Basic 4 GiB · DigitalOcean | $24.00 | $141 |
The sizing model for Keycloak
JVM service with PostgreSQL. Memory is dominated by the heap rather than by user count, so cost per user falls steeply as the directory grows. This is the CNCF-backed incumbent.
- 2 GB of memory for the whole stack at rest, every container the project ships included.
- 2 MB more per active user, then 25% on top so the box is not running at its ceiling.
- 10 GB of disk to begin with, growing 0.01 GB per user.
- 2 vCPU. Carried through from the project's baseline and not scaled with team size, because for this workload memory is what runs out first.
These base figures come from the project's own documented requirements. The per-user increments are ours in every case. They are deliberately generous rather than optimistic: a comparison that undersizes the server flatters self-hosting.
Time, not just money
Keycloak is rated medium to operate, which in this model means about 6 hours to get it running properly the first time and 1.5 hours a month after that. At $75 an hour that is $450 once and $112 a month, which is usually the largest line in the whole calculation.
What it replaces
| Commercial product | Its cost at 10 people | Keycloak at 10 people | Break-even | |
|---|---|---|---|---|
| Auth0 Essentials (B2B) | $150 | $141 | 4.3 years | full breakdown |
Where to put Keycloak
2.5 GB of memory and 10.1 GB of disk is what this needs at 10 people. The cheapest plan that fits, among the providers whose prices we have read ourselves, is the Basic 4 GiB at DigitalOcean for $24.00 a month.
Go to DigitalOcean Compare hosts
We are not claiming this is the cheapest server on the internet. It is the cheapest one we can honestly quote. Hetzner Cloud, Vultr and PikaPods publish prices we could not read programmatically, and Hetzner in particular is usually cheaper per gigabyte of memory than anything quoted above. Price them yourself before you commit.
The DigitalOcean link above is a referral link: if you sign up through it and pay your first $25, we receive $25 of DigitalOcean account credit. That never changes the computed costs, which server is chosen, or the conclusion of this page. The sizing model and every price source are published in full.
Project facts
| Licence | Apache License 2.0 |
|---|---|
| Written in | Java |
| GitHub stars | 36,732 |
| Open issues | 3,318 |
| Latest release | 26.7.3 |
| Last commit | 2026-09-12 |
| Repository checked | 2026-09-12 |
| Project | www.keycloak.org · keycloak/keycloak |