Skip to main content

Keycloak

Keycloak is available as a project service to add single sign-on, OpenID Connect and SAML to your applications. SailOps runs Keycloak 26 with the official operator, publishes it on a public HTTPS URL and stores its data in a PostgreSQL service of the same project. Trial organizations cannot provision it.

Create an instance​

Open Services → Create Service → Keycloak. The form has four sections:

  1. Basic Configuration — instance name and Keycloak version. The version is fixed at creation.

  2. Database — Keycloak keeps all its data (realms, users, sessions that survive restarts) in PostgreSQL:

    • Use an existing PostgreSQL service of the project, or
    • Create a new PostgreSQL service with the usual PostgreSQL options. It is created together with Keycloak and appears in your services list like any other database.

    SailOps creates a dedicated database and user for Keycloak on that service. The choice is fixed at creation.

  3. Resources — compute class, flavor (at least 0.5 vCPU and 1 GiB of memory per instance; the 0.5 vCPU eco flavor suits development and small realms) and number of instances (1 to 3). Several instances share their sessions and keep serving while one restarts. Instances, flavor and compute class can be changed later; changes restart the instances one at a time.

  4. Public Access — optional list of IP addresses or CIDRs allowed to reach the admin console. See Restrict the admin console.

Provisioning waits for the PostgreSQL service to be ready, then starts Keycloak. The first start creates the database schema: about 2 minutes with 1 vCPU, about 6 minutes with 0.5 vCPU.

Sign in to the admin console​

The Credentials tab shows the admin console URL and the username of the master realm administrator. The password is shown once; store it immediately. Reset password sets a new one.

Create a permanent administrator

Keycloak marks the bootstrap administrator as temporary and shows a banner in the console. Create your own administrator in the master realm, then keep the bootstrap account only as a recovery path.

SailOps also creates a client named sailops-admin in the master realm. It is what lets the Reset password action work even if you changed the administrator password. Do not delete or disable it: without it, SailOps can no longer reset the password for you.

Use it from your applications​

Realms, clients, users and identity providers are managed in the Keycloak admin console. Every realm is served under the public URL shown on the Overview tab:

https://<public URL>/realms/<realm>/.well-known/openid-configuration

Token issuers always use the public URL, so tokens obtained by a browser are valid for your backends.

To give a container or a job the URLs it needs, create a connection to the Keycloak instance. It injects:

VariableValue
KEYCLOAK_URLPublic URL, for browsers and issuer checks
KEYCLOAK_INTERNAL_URLIn-project URL, for back-channel calls such as token exchange or the Admin API

A Keycloak connection carries no credentials: create a client in your realm for each application.

Restrict the admin console​

The admin console, the Admin REST API and the master realm can be restricted to a list of IP addresses or CIDRs, in the form or later by editing the instance. Your application realms stay public, as an identity provider must be. An empty list allows every address.

Database and backups​

Keycloak itself keeps no data: everything is in its PostgreSQL database. Back it up and restore it from the PostgreSQL service, with its scheduled and manual backups.

A PostgreSQL service used by Keycloak cannot be deleted while Keycloak exists; delete Keycloak first. When you delete Keycloak, its dedicated database is dropped. If the PostgreSQL service was created together with Keycloak and nothing else uses it, the delete dialog offers to delete it too. Keycloak, and the PostgreSQL service deleted with it, show the Deleting status until they are gone. Keycloak can no longer be changed once its deletion is accepted; the PostgreSQL service is only deleted after Keycloak is gone, and the dashboard disables its actions in the meantime.

Billing​

Each instance is billed per hour at its flavor's price. The PostgreSQL service is billed separately, as any database.

Limitations​

  • Realm import, custom themes and custom providers are not available yet.
  • Keycloak-specific metrics (logins, sessions) are not shown; the Observability tab shows CPU, memory and instance status.