1
0
mirror of https://github.com/owncloud/ocis.git synced 2026-10-23 23:29:02 +03:00
Files
David Walter 18b2df94f3 feat: add ownCloud branding background to login screens (#12406)
* feat: add ownCloud branding background to login screens

Ships the ownCloud branding image as the default IDP login background and
aligns the web and Keycloak login screens to match.

Reworked for the no-npm IDP (services/idp/src was removed by #12086): the
branding is applied directly in the committed bundle. The default background
image lives at services/idp/assets/identifier/static/media and is referenced
from theme.css, which now anchors it to the top right (background-position) so
the ownCloud logo stays fully visible at every viewport aspect ratio instead
of being cropped by center positioning. Operators can still override the image
via IDP_LOGIN_BACKGROUND_URL (unchanged on master).

Also embeds the same image in the web service theme assets and adds an
"owncloud" Keycloak login theme (already anchored top right) to the
ocis_keycloak deployment example.

Signed-off-by: David Walter <david.walter@kiteworks.com>
Signed-off-by: Lukas Hirt <info@hirt.cz>

* docs(deployment): title-case ocis_keycloak README headings

Co-authored-by: Martin <github@diemattels.at>
Signed-off-by: Lukas Hirt <info@hirt.cz>

---------

Signed-off-by: David Walter <david.walter@kiteworks.com>
Signed-off-by: Lukas Hirt <info@hirt.cz>
Co-authored-by: kobergj <jkoberg@owncloud.com>
Co-authored-by: Martin <github@diemattels.at>
2026-08-26 09:41:11 +02:00
..

document this deployment example in
document this deployment example in
docs/ocis/deployment/ocis_keycloak.md

Please refer to our documentation for instructions on how to deploy this scenario.

Branding / Custom Login Theme

This example ships a custom Keycloak login theme named owncloud in themes/owncloud/login/. It applies the ownCloud branding background as a full-viewport image and styles the login form to match the builtin oCIS IDP login screen. The theme is:

  • mounted into the Keycloak container via docker-compose.yml (./themes/owncloud:/opt/keycloak/themes/owncloud:ro)
  • enabled for the imported realm via "loginTheme": "owncloud" in config/keycloak/ocis-realm.dist.json

It inherits everything from the standard keycloak login theme (parent=keycloak in theme.properties) and only overrides CSS and images.

Replacing the Background Image

Overwrite themes/owncloud/login/resources/img/owncloud-background.png with your own image (PNG/JPEG/WebP, recommended minimum resolution 1920×1080) and restart the Keycloak container. If you use a different file name or format, adjust the --oc-login-background-image custom property at the top of themes/owncloud/login/resources/css/owncloud.css. The browser favicon comes from resources/img/favicon.ico in the same theme. There is intentionally no logo above the login card since the background image already contains the ownCloud logo; to add one back, style #kc-header-wrapper in owncloud.css.

Note: Keycloak caches themes. When iterating on the theme, either restart the container or start Keycloak with --spi-theme-static-max-age=-1 --spi-theme-cache-themes=false --spi-theme-cache-templates=false.

Background of the Builtin oCIS IDP (when not using Keycloak)

Deployments that use the builtin oCIS IDP (LibreGraph Connect) instead of Keycloak show the same branding background by default: if the environment variable IDP_LOGIN_BACKGROUND_URL is unset or empty, the IDP falls back to the embedded asset served from /signin/v1/static/owncloud-background.jpg. Setting IDP_LOGIN_BACKGROUND_URL to any URL overrides the background as before. The embedded asset itself can be replaced on the filesystem through IDP_ASSET_PATH.