Skip to main content

Docker Compose Environment Variables

These are the environment variables that can be added to a .env file, which should be created in the same directory as the docker-compose.yaml file to configure the installation. The default values are shown in the table below.

KeyTypeDescriptionDefault
POSTGRES_USERstringThe username for the PostgreSQL database.postgres
POSTGRES_PASSWORDstringThe password for the PostgreSQL database.postgres
POSTGRES_DBstringThe name of the PostgreSQL database.keycloak
TLS_CERTstringThe path to the TLS certificate file./etc/ssl/certs/tls.crt
TLS_KEYstringThe path to the TLS key file./etc/ssl/private/tls.key
KEYCLOAK_URLstringThe URL for Keycloak. E.g. https://keycloak.example.com (Required)
KC_ADMIN_USERstringThe admin username for Keycloak. (Required)
KC_ADMIN_PASSWORDstringThe admin password for Keycloak. (Required)
REALM_INSTALLER_CLIENT_SECRETstringThe secret for the realm installer client for Keycloak. (Required)
KEYCLOAK_REALMstringThe realm for Keycloak.eggplant
INITIAL_USER_USERNAMEstringThe username for the initial Keycloak user. (Required)
INITIAL_USER_PASSWORDstringThe password for the initial Keycloak user. (Required)
INITIAL_USER_GIVEN_NAMEstringThe given name for the initial Keycloak user. (Required)
INITIAL_USER_FAMILY_NAMEstringThe family name for the initial Keycloak user. (Required)
INITIAL_USER_EMAILstringThe email for the initial Keycloak user. (Required)
INITIAL_USER_IS_PASSWORD_TEMPORARYbooleanWhether the initial user's password is temporary.true
SMTP_HOSTstringThe SMTP server host.localhost
SMTP_PORTintegerThe SMTP server port.25
SMTP_FROMstringThe "from" address for SMTP emails.noreply@localhost
SMTP_AUTHbooleanWhether SMTP authentication is enabled.true
SMTP_USERNAMEstringThe username for SMTP authentication.
SMTP_PASSWORDstringThe password for SMTP authentication.