Skip to content

Keycloak cost calculator: self-hosting vs managed

Compare the cost of running Keycloak yourself with a RealmDeploy plan. Enter your own prices for servers, database, backups, load balancer and monitoring, and the hours your team spends on upgrades, patching, on-call and incidents.

Runs in your browser. Nothing you paste is sent to us.

Self-hosting: your numbers

Every number here is an example
They are round figures for a small two-node setup, not prices we looked up. Replace each one with your own cloud bill and your own hours.
Infrastructure, US dollars a month

A virtual machine or its share of a Kubernetes cluster.

For example a primary and a replica.

Managed PostgreSQL or your own.

Database backups, snapshots and the storage they sit on.

Engineering time, hours a month

Reading release notes, testing, rolling out.

Operating system, Java, image and database patches.

The hours you pay for someone to be reachable.

Outages, lockouts, certificate and database trouble.

Fully loaded: salary, taxes, benefits and overhead.

The comparison

CostSelf-hostingRealmDeploy Premium
Monthly$1,905$999
Yearly$22,860$11,988
Break-even
Self-hosting costs the same as Premium at 2.9 engineering hours a month, at $100 an hour. You entered 12.

With these numbers, self-hosting costs $906 a month more ($10,872 a year).

Compute
$3002 × $150
Database
$3002 × $150
Backups
$30
Load balancer
$25
Monitoring
$50
Engineering
$1,20012 hours × $100
Self-hosting
$1,905a month
Premium at $999 a month covers the cluster, its database, backups, upgrades and written support for the Keycloak we run. Your realms and applications take your time either way, so leave that work out of the hours above.
A guide, not a quote. It compares running costs only and leaves out the one-time work of building a setup or moving to one.

How to use it

  1. Replace each example number with a price from your own cloud bill.
  2. Enter the hours a month your team spends keeping Keycloak running.
  3. Set the full cost of one engineering hour.
  4. Pick the plan to compare with, billed monthly or yearly.
  5. Read the monthly and yearly totals and the break-even hours.

What to know

The cloud bill is the easy part of running Keycloak. The larger cost can be time: upgrades, patches for the operating system, Java and the database, someone on call, and the incidents that come up.

The calculator adds both and shows the totals side by side. The break-even is the number of engineering hours a month at which self-hosting costs the same as the plan you picked.

Every default is an example, not a market price. The result is only as good as the numbers you put in.

What Keycloak really costs

Keycloak is open source under the Apache License 2.0. You can download it, run it and change it without paying anyone. That makes it easy to think of it as free. It is not. Running Keycloak in production costs money every month, and most of that money is not on the cloud bill.

A production Keycloak needs servers, a database, backups, a way in from the internet, and a way to see when something goes wrong. It also needs people. Someone reads the release notes, tests each upgrade, patches the image and the database, answers the page at night, and fixes things when users cannot sign in.

This page is a guide to those costs. It explains each category, how to find your own numbers, and how the calculator above adds them up. The calculator does not know your prices. Every number in it is an example for you to replace.

The cost categories

The calculator splits the cost of self-hosting into six parts. Five are infrastructure you pay a provider for. The sixth is the time your team spends.

CategoryWhat it coversWhere to find your number
ComputeThe machines or containers Keycloak runs on, times how manyYour cloud bill, filtered by the tags or the cluster Keycloak uses
DatabasePostgreSQL or another supported database, often a primary and a replicaThe managed database line on the bill, or the VMs you run it on
Backups and storageDatabase backups, snapshots, disks and the storage that holds themStorage and backup lines on the bill
Load balancerThe load balancer or ingress in front of Keycloak, and its trafficNetwork lines on the bill
Monitoring and logsMetrics, dashboards, log storage and alertingYour monitoring tool’s invoice, or its share of it
Engineering timeUpgrades, patching, on-call and incidents, in hours, times an hourly costTime tracking, tickets, the on-call schedule and incident reports

Compute

One Keycloak node is enough to try it. For production, plan at least two, so one can restart or fail while the other keeps people signing in. Each node needs enough memory and CPU for your load. Password hashing takes real CPU time, so a busy sign-in hour needs more than a quiet one.

If Keycloak runs on a shared Kubernetes cluster, count its share of the cluster, not the whole cluster. If it has machines of its own, count those machines.

Database

Keycloak keeps realms, clients, users and, since version 26, user sessions in its database. The database is the one part you cannot lose. You might run a managed PostgreSQL with a replica, or two instances of your own. Count both. If the database is shared with other systems, count Keycloak’s share.

Backups and storage

Backups are cheap to store and expensive to forget. Count the backup storage, the disk snapshots and any copies kept in a second region. A backup you have never restored is a guess, so count the time to test a restore in the engineering hours too.

Load balancer

Keycloak sits behind a load balancer or an ingress controller that ends TLS and spreads traffic across the nodes. Cloud load balancers charge by the hour and by the traffic. If one load balancer serves many systems, count Keycloak’s share. The reverse proxy helper shows the settings Keycloak needs behind one.

Monitoring and logs

You need to know when sign-in is slow or down before your users tell you. That means metrics, alerts and logs, and somewhere to keep them. Keycloak serves health checks and metrics on its management port; the health and metrics helper gives you the URLs and probes.

Engineering time

For a small or medium setup, the time your team spends can cost more than the machines. It is also easy to leave out, because nobody sends an invoice for it. The calculator asks for four kinds of time.

Upgrades

Keycloak moves fast. The official upgrading guide lists nine minor releases in the 26 line alone, from 26.0 to 26.8, each with its own migration notes, and patch releases in between. Many notes need action: a renamed option, a changed default, a theme that renders differently, a database migration that takes a while on a large table.

An upgrade means reading those notes, trying the new version on a copy of your setup, backing up the database, rolling out and checking afterwards. The upgrade risk checker lists the notes between two versions so you can see how much there is to read.

Patching

Keycloak is only one layer. Below it are the container image or the operating system, the Java runtime, the database engine and the load balancer. Each gets security fixes. Someone has to notice them, apply them and check that sign-in still works.

On-call

If Keycloak is down, nobody signs in to anything that depends on it. So someone has to be reachable when it breaks. Count the hours you pay for that: an on-call allowance, or Keycloak’s share of a rotation that covers several systems.

Incidents

Things go wrong: a certificate expires, the database fills up, a node runs out of memory, a change in the admin console locks people out. Look at the last six or twelve months of incident reports or tickets about sign-in, and take the monthly average.

The hourly cost

Use the fully loaded cost of an engineering hour, not the salary alone. That includes taxes, benefits, equipment and overhead. If you do not know it, ask finance. The calculator multiplies every hour by this number.

How the calculator adds it up

The sums are simple, and you can check every one of them on the page.

The formulas
infrastructure = nodes × price per node
               + database instances × price per instance
               + backups and storage
               + load balancer
               + monitoring and logs

engineering    = (upgrades + patching + on-call + incidents hours)
               × cost of an engineering hour

self-hosting   = infrastructure + engineering        (a month)
plan           = the plan’s price, billed monthly or yearly

break-even     = (plan − infrastructure) ÷ cost of an engineering hour

Yearly totals are the monthly totals times twelve. For a plan billed yearly, the calculator uses its monthly price when billed yearly. Starter is billed monthly only.

Reading the break-even

The break-even is a number of engineering hours a month. Below it, self-hosting costs less than the plan you picked. Above it, self-hosting costs more.

It is often a small number. If your infrastructure costs a few hundred dollars a month and an engineering hour costs around a hundred, a handful of hours a month closes the gap. Ask how many hours your team really spent on Keycloak last month, and the month before.

If your infrastructure alone costs more than the plan, the calculator says so. Then no amount of saved time changes the answer for that plan.

What the calculator leaves out

It compares running costs. Some costs do not fit a monthly line, so they are not in the sums. Keep them in mind.

  • The one-time work of building a production setup: the cluster, the database, backups, monitoring, the image and the deployment pipeline.
  • Moving from one setup to another, whichever way you go.
  • Learning time when the person who knows Keycloak leaves.
  • Security reviews and audits that ask how Keycloak is run.
  • The cost of an outage to your business, which can be far larger than the hours spent fixing it.

Some work stays with you either way. Realm configuration, clients, identity providers, themes and connecting your applications take your team’s time whether you run Keycloak yourself or not. Leave that time out of the hours, so both sides compare the same thing.

Finding your own numbers

  1. Open the last three months of your cloud bill and find every line Keycloak uses. Tags or a separate account make this easier.
  2. Take the monthly average for compute, database, backups, load balancer and monitoring.
  3. List the Keycloak upgrades and patches of the last year and estimate the hours each took, testing included. Divide by twelve.
  4. Add the on-call hours you pay for, or Keycloak’s share of them.
  5. Count the incidents that touched sign-in in the last year and the hours spent on them. Divide by twelve.
  6. Ask finance for the fully loaded cost of an engineering hour.

If you have not run Keycloak in production yet, you have no history. Use your team’s experience with similar systems, and plan to check the numbers again after a few months.

When self-hosting makes sense

Running Keycloak yourself is a fair choice in some cases. A platform team that already runs many stateful services may add Keycloak with little extra effort. Some rules require that every system runs inside your own network. Very large or unusual setups may need control a managed plan does not offer.

A managed plan makes sense when Keycloak is important but not your core work. Then the hours spent on upgrades and on-call are hours not spent on your product. Our plans include a dedicated Keycloak with its own database, backups, managed upgrades and written support, on the cloud and region you choose. See the plans and prices for what each one includes.

Common mistakes

  • Counting only the cloud bill. The hours can be the larger part.
  • Counting one node. Production needs at least two to survive a restart.
  • Forgetting the database replica, the backups or the second region.
  • Using the salary as the hourly cost. Use the fully loaded cost.
  • Counting realm and client configuration as running cost. You do that work either way.
  • Trusting the example numbers. They are placeholders, not prices.

How to use it

  1. Replace the number of nodes and the price per node with your own.
  2. Do the same for the database, backups, load balancer and monitoring.
  3. Enter the hours a month for upgrades, patching, on-call and incidents.
  4. Enter the fully loaded cost of an engineering hour.
  5. Pick the plan to compare with and whether it is billed monthly or yearly.
  6. Read the monthly and yearly totals, the difference and the break-even hours.

Nothing you type leaves your browser. Use Reset to examples to start again.

Questions

Frequently asked questions

Is Keycloak free?

The software is open source under the Apache License 2.0 and costs nothing to download. Running it in production costs money: servers, a database, backups, monitoring and the time to keep it up to date.

How much does it cost to host Keycloak?

It depends on your setup and your team. Add up compute, database, backups, load balancer and monitoring from your cloud bill, then the hours spent on upgrades, patching, on-call and incidents times an hourly cost. The calculator does this sum for you.

Where do the default numbers come from?

They are round example figures for a small two-node setup, not prices we looked up. Replace every one with your own.

What does the break-even mean?

The number of engineering hours a month at which self-hosting costs the same as the plan you picked. Spend fewer hours and self-hosting costs less; spend more and it costs more.

Why count engineering time at all?

Because it is real money. An hour spent upgrading Keycloak is an hour your team does not spend on something else, and it is paid either way.

Does a managed plan remove all Keycloak work?

No. Realm configuration, clients, identity providers and connecting your applications stay with you. A managed plan takes over running the server: the cluster, database, backups, upgrades and patches.

Does the calculator include setup or migration costs?

No. It compares monthly running costs. One-time work such as building a setup or moving to one is not in the sums.

Is my data sent anywhere?

No. The calculator runs in your browser and nothing you type is sent to us.

Rather not run Keycloak yourself?

We run it for you on a cluster of your own, with backups, upgrades and written support. Starter and Premium begin with a 7-day trial.