Miget is now Lyngbak. Same platform, same plans, same API.Why the name →

Startups get $300 or more in Lyngbak credits.Apply →

Moving production infrastructure? We migrate it for you, free.Talk to us →

PricingEnterpriseDashboard
Start for Free
← All templates

Keycloak

Keycloak IAM - OIDC, SAML, social login, user federation - backed by a managed Postgres, stateless and production-mode.

3 GiB

2 services, 5 GB disk

$24/mo

flat resource

$0.037/h

Usage Billing

What is Keycloak?

Keycloak is the heavyweight champion of open-source identity: full OIDC and SAML, social logins, user federation (LDAP/AD), fine-grained authorization, admin console, and two decades of enterprise hardening via Red Hat. It is what you deploy when per-MAU pricing on Auth0 or Clerk stops being funny.

This template runs Keycloak in production mode (start, not start-dev) backed by a managed Postgres that Lyngbak provisions and wires automatically - host, port, credentials all injected. TLS terminates at the platform ingress with forwarded headers trusted, so issuer URLs come out as your https domain, which is exactly what OIDC clients require.

All state lives in Postgres; the Keycloak pod itself is stateless and restarts clean. Two variables (bootstrap admin username/password) and you have an identity provider.

What you get

  • OIDC, OAuth2, and SAML 2.0 - works with every framework’s auth library
  • Social login (Google, GitHub, …) and identity brokering
  • User federation: LDAP and Active Directory
  • Admin console with realms, clients, roles, and flows
  • Production mode behind TLS ingress; correct https issuer URLs
  • Managed Postgres auto-provisioned and auto-wired - stateless Keycloak pod

How it runs on Lyngbak

ServiceRolePublic
keycloakidentity server, production mode (:5000)yes
dbPostgres - managed service on Lyngbak, container locallyno

Before you deploy

  • KC_ADMIN_USERNAME / KC_ADMIN_PASSWORD

    bootstrap admin, applied on first start against an empty database

Sizing and billing

Keycloak is RAM-hungry (JVM + Quarkus): 2 GiB is the realistic floor. The managed Postgres adds 1 GiB. CPU matters at login bursts - password hashing is deliberate work.

Hobby resource$24/mo2 vCPU, 2 GiB + 1 GiB RAM add-on, 60 GiB disk, shared CPU
Pro resource$30/mo1 vCPU, 2 GiB + 1 GiB RAM add-on, 10 GiB disk, dedicated CPU
Usage Billing, shared CPU$0.037/h1.5 vCPU, 3 GiB reserved. $27/mo for a full month, billed by the second.
Usage Billing, dedicated CPU$0.094/h2 vCPU, 4 GiB reserved. $68/mo for a full month, billed by the second.

A resource is a flat monthly price, with RAM and disk add-ons when the stack needs a little more than a tier, and room for your own apps on a larger one. On Usage Billing each service takes the smallest size that fits it and is billed by the second it runs, so a stopped stack stops costing CPU and RAM. Its 5 GiB of volumes cost $0.15 per GiB a month ($0.75/mo) for as long as they exist. One workspace can use both. See pricing

Compared with the managed service

ServicePlanPriceIncludes
Auth0Essentials (B2C)$70/moat 1,000 MAU (from $35 at 500 MAU) - scales with users
ClerkPro$25/mobase + $0.02 per monthly retained user past 50k; SSO connections $75 each
FusionAuthStarter (cloud)$162/mocheapest managed FusionAuth, billed annually

Identity SaaS prices per user; Keycloak prices per gigabyte. Past hobby scale the curves diverge fast. Prices from each vendor's pricing page, June 2026.

Run it locally first

The same compose file runs with plain Docker Compose. Clone the template source, copy .env.example to .env, and run docker compose up -d.

Questions

How does self-hosted Keycloak compare to Auth0 pricing?

Auth0’s paid plans price per monthly active user and climb steeply past the entry tiers. Keycloak on this template has no per-user pricing: unlimited users, realms, and clients, and you pay for the compute it reserves. The trade is operating it yourself - which this template reduces to a deploy.

Is this production-mode Keycloak or a dev toy?

Production mode: kc start with a real Postgres, proxy headers configured for the platform’s TLS ingress, and correct https issuer URLs. start-dev appears nowhere in this template.

Where is Keycloak’s state stored?

Entirely in the managed Postgres (realms, users, clients, sessions config). The Keycloak pod is stateless - redeploys and restarts are uneventful, and the database gets the platform’s managed-service treatment.

Can I use Keycloak for SSO across my apps?

Yes - that is its core job. Create one realm, register each app as an OIDC client, and every standard auth library (NextAuth, Spring Security, Django, Rails) points at your realm’s well-known endpoint.

More in Auth & API Gateway

authentik

The modern identity provider - OIDC, SAML, LDAP, and visual login flows - now Redis-free on a managed Postgres.

Open the template →

Kong Gateway

DB-backed Kong API gateway with Kong Manager behind basic auth - managed Postgres, zero config at deploy time.

Open the template →

Logto

The open-source Auth0 experience - hosted sign-in pages, social logins, organizations, MFA - on one managed Postgres.

Open the template →
Keycloak: OIDC/SAML identity server with Docker Compose | Lyngbak (formerly Miget)