Artica Wiki

Docker Store: Keycloak identity server

Install a production-ready Keycloak single sign-on server with PostgreSQL from the Artica Docker Store, published only through the Artica reverse-proxy.

Artica for Docker Edition > Keycloak

Give your users one login for all their business applications.
Artica installs a production-ready Keycloak identity server in a single form.
The database, the HTTPS settings, the first administrator and the hardening are done for you.
No port of the appliance is opened: the Artica reverse-proxy is the only way in.

The Keycloak tile in the Docker Store

What Keycloak brings

Keycloak is an open-source identity and access management server.
It speaks OpenID Connect, OAuth 2.0 and SAML 2.0.
Your applications send their users to Keycloak to sign in, and Keycloak tells them who the user is.

With the Docker Store, you get it without writing a single compose file.

Advantages

Use cases

Before you start

Install Keycloak

  1. Open Docker > Docker Store.
  2. On the Keycloak tile, click Install.
  3. Fill in the form.
  4. Click Install Keycloak.

The Keycloak installation window

Field What to enter
Site address The public HTTPS address of the server, for example https://sso.example.com.
No path.
The stack is named after it: keycloak-sso-example-com.
Administrator login 1 to 60 characters.
Lower-case letters, digits and _ . @ - only.
Keycloak stores logins in lower case, so an upper-case login is refused.
Password 12 to 256 characters, without backslash.
Volume size Maximum size of the PostgreSQL volume, in GiB.
The volume is named keycloak-<host>-db-1.

The window above was captured on an appliance without a reverse-proxy and without an enrolled Docker Relay agent.
That is why the form is greyed out and the red banner asks to enrol the agent first.

The first start takes one to two minutes.
Keycloak prepares its database and rebuilds its runtime for PostgreSQL.
The stack job completes when the three services report healthy.

After the installation

Open the administration console at https://<your address>/admin/ and sign in with the account you chose.
The OpenID issuer of the master realm is https://<your address>/realms/master.

Keycloak marks this first administrator as temporary.
Create a permanent administrator in the Keycloak console, then remove or keep the first one as your policy requires.

Keycloak creates the first administrator only on an empty database.
If you reinstall Keycloak at the same address, the kept volume is mounted again with its accounts.
The password you type then has no effect.

The stack window

Click Stack on the tile to open the stack.
The Details tab sums up the application: origin, owner, revision, the two encrypted secrets and the server socket.

The Details tab of the Keycloak stack

The Services tab shows the three services and their health checks.

The Services tab of the Keycloak stack

Service Image Role
db postgres:17-alpine The database.
Read-only root file system, data in pgdata/ on the size-limited volume.
keycloak quay.io/keycloak/keycloak:26.8 The identity server, in production mode.
User 1000, no capability, 2 GB memory limit.
web nginx:stable Serves Keycloak on /srv/artica-docker/sockets/<stack>/keycloak/http.sock.

Troubleshooting

Symptom Cause and fix
The window says the quay.io image source is not allowed. Add quay.io to the image sources of the Docker service, then reopen the window.
The window asks to enrol the Docker Relay agent first. The appliance has no reverse-proxy and the relay agent is missing or not enrolled.
Install and enrol it from Docker > Docker Relay agent.
"The Keycloak address must start with https://" Type an https:// address.
The browser shows "HTTPS required". The reverse-proxy site is published in plain HTTP.
Publish it in HTTPS: Keycloak trusts the X-Forwarded-Proto header the reverse-proxy sends.
The console keeps loading or redirects to another host. The address typed at installation is the only one Keycloak accepts.
Publish the site under exactly that name.