Marketplace
Security

Keycloak

Open-source identity and access management (SSO/OIDC).

Deploy this app

About

Runs Keycloak in Docker with a generated administrator password, ready to configure realms, clients and identity providers for single sign-on across your applications.

Admin credentials are saved to /root/keycloak-credentials.txt. This starts Keycloak in development mode (start-dev) — switch to a production configuration with a real database and TLS before going live.

Ports opened by the installer

8080/tcp · Keycloak

Install script (runs as cloud-init user-data on first boot)

#!/bin/bash
set -e
apt-get update -y
apt-get install -y ca-certificates curl gnupg
install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
chmod a+r /etc/apt/keyrings/docker.asc
. /etc/os-release
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $VERSION_CODENAME stable" > /etc/apt/sources.list.d/docker.list
apt-get update -y
apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
systemctl enable --now docker
ADMIN_PASS=$(openssl rand -base64 18 | tr -dc 'A-Za-z0-9')
docker run -d --name keycloak --restart=always -p 8080:8080 -e KC_BOOTSTRAP_ADMIN_USERNAME=admin -e KC_BOOTSTRAP_ADMIN_PASSWORD="$ADMIN_PASS" quay.io/keycloak/keycloak:latest start-dev
echo "admin / $ADMIN_PASS" > /root/keycloak-credentials.txt