Can't figure out OCIS with Collabora setup

I’ve set up a test deployment with bare OCIS and I’m super impressed. Thus I’ve tried setting it up with Collabora - and failed. I can’t use config script provided with OCIS full as I need to get it working with reverse proxy I have in my lab (Nginx PM with Let’sEncrypt certs).

I’ve came up with following compose.yaml file :

services:
  ocis:
    container_name: ocis
    hostname: ocis
    image: owncloud/ocis:latest
    restart: unless-stopped
    entrypoint:
      - /bin/sh
    command: ["-c", "ocis init || true; ocis server"]
    expose:
      - 9200
    volumes:
      - $PWD/config:/etc/ocis
      - $PWD/data:/var/lib/ocis
    ports:
      - "9200:9200"
      - "9233:9233"
    environment:
      DEMO_USERS: false
      PROXY_TLS: false
      PROXY_ENABLE_BASIC_AUTH: "false"
      OCIS_INSECURE: false
      OCIS_URL: https://testocis.mydomain.app
      PROXY_HTTP_ADDR: 0.0.0.0:9200
      OCIS_LOG_LEVEL: info
      OCIS_LOG_COLOR: true
      OCIS_LOG_PRETTY: true
      COLLABORA_DOMAIN: testdocserv.mydomain.app
      FRONTEND_APP_HANDLER_SECURE_VIEW_APP_ADDR: com.owncloud.api.collaboration.CollaboraOnline
      GATEWAY_GRPC_ADDR: 0.0.0.0:9142
      MICRO_REGISTRY_ADDRESS: 127.0.0.1:9233
      NATS_NATS_HOST: 0.0.0.0
      NATS_NATS_PORT: "9233"

  collabora:
    container_name: collabora
    cap_add:
      - MKNOD
    command:
      - bash
      - -c
      - coolconfig generate-proof-key ; /start-collabora-online.sh
    environment:
      DONT_GEN_SSL_CERT: "YES"
      aliasgroup1: https://testwopi.mydomain.app:443
      extra_params: |
        --o:ssl.enable=false \
        --o:ssl.ssl_verification=false \
        --o:ssl.termination=true \
        --o:welcome.enable=false \
        --o:net.frame_ancestors=testocis.mydomain.app
      password: admin
      username: admin
    healthcheck:
      test:
        - CMD
        - curl
        - -f
        - http://localhost:9980/hosting/discovery
    image: collabora/code:24.04.12.3.1
    ports:
      - 9980:9980
    logging:
      driver: local
    restart: always

  collaboration:
    container_name: collaboration
    cap_add:
      - NET_ADMIN
    command:
      - -c
      - ocis collaboration server
    depends_on:
      collabora:
        condition: service_healthy
        required: true
      ocis:
        condition: service_started
        required: true
    entrypoint:
      - /bin/sh
    ports:
      - "9300:9300"
      - "9301:9301"
    environment:
      COLLABORATION_APP_ADDR: https://testdocserv.mydomain.app
      COLLABORATION_APP_ICON: https://testdocserv.mydomain.app/favicon.ico
      COLLABORATION_APP_INSECURE: "true"
      COLLABORATION_APP_NAME: CollaboraOnline
      COLLABORATION_APP_PRODUCT: Collabora
      COLLABORATION_CS3API_DATAGATEWAY_INSECURE: "true"
      COLLABORATION_GRPC_ADDR: 0.0.0.0:9301
      COLLABORATION_HTTP_ADDR: 0.0.0.0:9300
      COLLABORATION_LOG_LEVEL: info
      COLLABORATION_WOPI_SRC: https://testwopi.mydomain.app
      MICRO_REGISTRY: nats-js-kv
      MICRO_REGISTRY_ADDRESS: ocis:9233
      OCIS_URL: https://testocis.mydomain.app
    image: owncloud/ocis-rolling:latest
    logging:
      driver: local
    restart: always
    volumes:
      - $PWD/config:/etc/ocis

volumes:
  ocis-config:
    name: ocis_full_ocis-config
  ocis-data:
    name: ocis_full_ocis-data

And while the components start the connection is not working. The Collabora app is registered and I can click create new .odt (etc.) doc - but that just brings blank page.
Collabora shows OK when I try to visit tesdocserv.mydomain.app .

Any suggestions, including troubleshooting suggestions that may help in nailing the problem down? What am I missing?

BTW - when I’ve been looking at the file generated by default OCIS Full I’ve noticed COMPANION_DOMAIN env variable, but can’t find mention of it in the docs.

Configuration seems to be correct is web is showing the button. Also collabora seems to be able to communicate with ocis (as the file is created). Are there any logs in ocis that might shed some light on what is happening? If not, which status code is the web getting when it shows the blank page?

I can’t find any errors in the logs (will double check it), but when I’ve launched developer tools I see:

Refused to frame ' ..... ' because it violete the following Content Security Policy directive: "frame-src 'self" blob: https://embed.diagrams.net/

Got it - all it has taken to make it work was to create a policy file csp.yaml and a PROXY_CSP_CONFIG_FILE_LOCATION variable pointing to it.

2 Likes