Run Keycloak

Keycloak comes vith various way of running it: Bare server, Docker, Kubernetes, OpenShift, etc.. Keycloak server installation and configuration documentation is excellent. Keycloak needs a database to run and offers several choices (Oracle, SQL Server, PostgreSQL, MySQL), by default it uses an H2 embedded database. I choose to run Keycloak with Postgres as it’s easier to investigate data in a Postgres DB and it’s now very frequent that I choose Postgres for my persistence needs.

Run Keycloak with Postgress and Docker-compose

During development, I choose Docker Compose to run Postgres alongside Keycloak, the repository holds a docker-compose.yml file to easily starts a Keycloak standalone instance persisting data in a Postgres DB.

To start Keycloak with Postgres: