- VM with 2vcpu / 4G memory
- Ubuntu 20.04+ or Rocky/Rhel/Centos 8+
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
docker network create web
git clone https://github.com/mustafaarif/keycloak-traefik.git
cd traefik-proxy
mkdir certs && cd certs
touch acme.json
chmod 600 acme.json
CF_API_EMAIL=<cloudflare_email>
CF_DNS_API_TOKEN=<api_token_from_cloudflare>
PRIMARY_DOMAIN=<primary_domain>
TRAEFIK_SSLEMAIL=<ssl_email>
docker compose up -d
# Fill in random_pass with password generated from `openssl rand -base64 14`
POSTGRES_USER=pstadmin
POSTGRES_PASSWORD=random_pass
POSTGRES_DB=keycloak
KEYCLOAK_ADMIN=keycloak-admin
KEYCLOAK_ADMIN_PASSWORD=random_pass
mkdir ~/keycloak/dbData
docker compose up -d