Theming, settings in ocis.yaml?

Steps to reproduce

  1. Try to follow the documentation for adding custom theme in OCIS.
  2. Tried setting WEB_UI_THEME_PATH: "https://themeurl-redacted/ocis/theme.json" in the compose environment variables.
  3. Tried to set the url in ocis.yaml with
web:
  web:
    theme_server: https://redacted.com
    theme_path: /ocis/theme.json

Expected behaviour

Theme should change

Actual behaviour

Doesn’t change

Server configuration

Debian docker

Web server:

Database:

PHP version:

ownCloud version: (see ownCloud admin page)
4.0.0+0535c62b6

Updated from an older ownCloud or fresh install:
no
Where did you install ownCloud from:
Docker
The content of config/config.php:

Are you using external storage, if yes which one: local/smb/sftp/…
local
Are you using encryption: yes/no
no
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/…

Client configuration

Browser:

Operating system:

Can someone tell me how the config should look like to point it to a json theme file? the documentation doesn’t make much sense

Hey,

i think the same topic has been already discussed here:

Yep, but seems like the team ghosted him… since it’s unresolved maybe the team can chime in?

Hey,

i’m not sure how much of the ownCloud people (or team) working with OCIS are reading this forum so i’m not sure if β€œghosting” is adequate :frowning_face:

Maybe you can repeat / append your question to the linked thread to keep the knowledge (if any new has been found in the meantime) in a single thread?

I think if the documentation doesn’t make sense it could be also possible to open an issue below to let the ownCloud people know.

It could be also possible that they are already aware but i don’t have any knowledge on OCIS to be sure:

Seems that theming DOES work, but not for the login page… Nothing changes on the login page.

Are you using the buildin IDP or an external solution like keycloak?

Also you are not being ghosted :slight_smile: thing is, there is lots of questions popping in on several public channels we have to monitor and sometimes posts/messages get lost in the noise. We are sorry about this, we are doing our best to reply to everybody. Sometimes it might take a bit.

Hello and thanks for the reply :pray:

I am using the built in idp, is this not customizable ? I e looked through the docker container as well…

I see now in the documentation that is supposed to be an ui-folder in the idp directory… I’m gonna look when I get home if it’s there, although it feels like I have searched through all the folders

The internal idp has its own assets (you can recreate them by running make -C services/idp generate) in the repo. But they are not intended to modify them with the released binary at the moment. We might replace the internal IDP in the near future which may allow such things.

Oh wait there is IDP_ASSET_PATH where you can host the modified assets… but we might still replace the IDP in the near future :slight_smile:

Hey,

i still think that this topic should be closed and the discussion around theming should continue in the original Unable to theme OCIS topic. For example the users in the other topic are currently not even aware of the newly gathered info here :frowning_face:

2 Likes

Alright, sounds like it’s coming a new idp so I might just wait until then :slight_smile:

as @dragonchaser mentioned, the build in idp is a separate service which ships it own assets.

regarding the opening question from @monkeyfella, i prepared a docker compose to show how it works:

services:
  ocis:
    image: owncloud/ocis:latest
    entrypoint: /bin/sh
    command: ['-c', 'ocis init || true && ocis server']
    ports:
      - 9200:9200
    environment:
      OCIS_INSECURE: "true"
      WEB_UI_THEME_SERVER: "https://corsproxy.io"
      WEB_UI_THEME_PATH: "/?https%3A%2F%2Fgist.githubusercontent.com%2Ffschade%2Fa5945840f2a8033ded11b54aacc5a130%2Fraw%2F27f2d6f323c1f702e191477d980e0248baa33a7e%2Ftheme.json"
      IDM_CREATE_DEMO_USERS: "true"
      IDM_ADMIN_PASSWORD: admin
      PROXY_ENABLE_BASIC_AUTH: "true"

the important env variables are

WEB_UI_THEME_SERVER
WEB_UI_THEME_PATH

as you can see the example uses a proxy for the theme.json, this is because of cors.

1 Like

Thank you,
I have managed to theme my setup now, also built the idp and got it working.

I tried replacing the idp with authelia, I got everything working until the last step when it gets to the oidc callback page, it never redirects and actually logs me in.

In the logs it seems like everything is fine.

So if you guys have time, a setup example, or guide on how to get caddy and authelia to work together would be much appreciated.

This is going offtopic for the theming discussion. So just some quick pointers here.

There is this nice blogpost which contains a slightly outdated, but mostly correct example:

Also there is deployments: Add new example for authelia by rhafer Β· Pull Request #7249 Β· owncloud/ocis Β· GitHub a work in progress docker-compose example. It’s still has a couple of issue, but should give you some hints.

If you have more question I suggest you to comment on already existing discussion about authelia (IIRC there is one already) or open a new topic.

1 Like

What files go in the IDP_ASSET_PATH?
These:
favicon.jpg
loginBackground.jpg
logo.svg
logo_dark.svg
owncloud-app-icon.png ?

open a terminal

$ git clone https://github.com/owncloud/ocis.git

when it’s finished, cd in to the ocis directory, type:
$ make generate

If everything works out you should have the directory ocis/services/idp/assets/identifier

in that folder there should be:

.
β”œβ”€β”€ asset-manifest.json
β”œβ”€β”€ index.html
β”œβ”€β”€ service-worker.js
β”œβ”€β”€ service-worker.js.map
β”œβ”€β”€ static
β”‚   β”œβ”€β”€ css
β”‚   β”‚   β”œβ”€β”€ 8.b5f1a04b.chunk.css
β”‚   β”‚   β”œβ”€β”€ 8.b5f1a04b.chunk.css.map
β”‚   β”‚   β”œβ”€β”€ main.51329a5b.chunk.css
β”‚   β”‚   └── main.51329a5b.chunk.css.map
β”‚   β”œβ”€β”€ favicon.ico
β”‚   β”œβ”€β”€ js
β”‚   β”‚   β”œβ”€β”€ 0.f01e1168.chunk.js
β”‚   β”‚   β”œβ”€β”€ 0.f01e1168.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ 10.829ffc84.chunk.js
β”‚   β”‚   β”œβ”€β”€ 10.829ffc84.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ 8.49361285.chunk.js
β”‚   β”‚   β”œβ”€β”€ 8.49361285.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ 9.39746e85.chunk.js
β”‚   β”‚   β”œβ”€β”€ 9.39746e85.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ all-i18n-data.1885b7ec.chunk.js
β”‚   β”‚   β”œβ”€β”€ all-i18n-data.1885b7ec.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ containers-goodbye.ff63fd5d.chunk.js
β”‚   β”‚   β”œβ”€β”€ containers-goodbye.ff63fd5d.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ containers-login.d536530a.chunk.js
β”‚   β”‚   β”œβ”€β”€ containers-login.d536530a.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ containers-welcome.a48d2ff2.chunk.js
β”‚   β”‚   β”œβ”€β”€ containers-welcome.a48d2ff2.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ identifier-main.b785f365.chunk.js
β”‚   β”‚   β”œβ”€β”€ identifier-main.b785f365.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ main.fb7e3116.chunk.js
β”‚   β”‚   β”œβ”€β”€ main.fb7e3116.chunk.js.map
β”‚   β”‚   β”œβ”€β”€ runtime-main.2e292c87.js
β”‚   β”‚   └── runtime-main.2e292c87.js.map
β”‚   β”œβ”€β”€ logo.svg
β”‚   └── media
β”‚       β”œβ”€β”€ background.7296b9ab.jpg
β”‚       └── inter.aadb65ac.ttf
β”œβ”€β”€ workbox-4632734d.js
└── workbox-4632734d.js.map

5 directories, 36 files

copy the identifier folder to a location and point your IDP_ASSET_PATH: β€œ/to/your/location/for/identifier”

main.51329a5b.chunk.css is probably what you want to start look in first

1 Like