Overview
dokku-keycloak provisions and manages Keycloak on a Dokku server end to end: a production-mode Keycloak with its own PostgreSQL database, a generated admin password, correct proxy settings, Let's Encrypt TLS, realm export and import, and upgrades that back up the database first. It is released under the MIT license.
The challenge
Running Keycloak properly behind a reverse proxy has many sharp edges: production mode, hostname and proxy headers, build-time versus runtime options, and upgrades that can damage data. The plugin had to make all of that safe by default.
What we built
- 01One command that creates the app and a dedicated PostgreSQL service and deploys Keycloak
- 02Production mode with health and metrics kept off the public interface
- 03A random admin password handed to Keycloak once and never stored in app config
- 04Zero-downtime deploys that wait for Keycloak to be ready
- 05Checksum-verified extensions, realm export and import, and upgrades that dump the database first
