How to Use This Generator
The generator turns a few choices into a complete Keycloak Docker Compose example you can run right away:
- Pick a distribution (upstream Keycloak, or Locke if you want a Redis cache backend) and a Keycloak version.
- Leave PostgreSQL persistence on so your realms, users, and clients survive container restarts.
- Optionally tick Include reverse proxy to add an Nginx or HAProxy service for TLS termination.
- Click Generate Configuration, then copy the output or download
docker-compose.yml(plus any proxy config).
That covers the most common request, a "keycloak docker compose example" that actually starts on the first try, without hand-editing YAML or guessing at environment variables. New to running Keycloak in containers? Our Keycloak documentation walks through realms, clients, and first-run setup.