Nextcloud + Collabora (ARM64) + Traefik

Hey,
Ever since I have Nextcloud setup I am having issues with Collabora. I recently moved to a hosted server at Hetzner with a bit more power then my Raspberry Pi 4.

I installed Nextcloud Office and Collabora Office - Built-in CODE Server (ARM64). I am running on an Ampere CPU, so thats why its ARM.

Everything installed fine, but I just can’t get it to work.

Nextcloud just can’t reach the Collabora instance.

I am using Cloudflare + Traefik, I think I need a Traefik label to proxy the connection correctly.

Here is the config I am using:

      - traefik.enable=true
      - traefik.docker.network=nextcloud
      - traefik.http.routers.nextcloud.rule=Host(`cloud.mydomain.tld`)
      - traefik.http.routers.nextcloud.entrypoints=websecure
      - traefik.http.routers.nextcloud.tls=true
      - traefik.http.routers.nextcloud.service=nextcloud
      - traefik.http.services.nextcloud.loadbalancer.server.port=443
      - traefik.http.services.nextcloud.loadbalancer.server.scheme=https
      - traefik.http.routers.nextcloud.middlewares=nextcloud_redirectregex,nextcloud_collabora_redirectregex
      - traefik.http.middlewares.nextcloud_redirectregex.redirectregex.permanent=true
      - traefik.http.middlewares.nextcloud_redirectregex.redirectregex.regex=https://(.*)/.well-known/(?:card|cal)dav
      - traefik.http.middlewares.nextcloud_redirectregex.redirectregex.replacement=https://$${1}/remote.php/dav      
      # Collabora
      - traefik.http.middlewares.nextcloud_collabora_redirectregex.redirectregex.permanent=true
      - traefik.http.middlewares.nextcloud_collabora_redirectregex.redirectregex.regex=^https://(.*)/nextcloud/(index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|oc[ms]-provider/.+|.+richdocumentscode_arm64/proxy)\\.php(?:$|/)
      - traefik.http.middlewares.nextcloud_collabora_redirectregex.redirectregex.replacement=https://$${1}/nextcloud/$${2}.php

But somehow when using these labels nextcloud is unreachable.

Accessing CODE using right URL is essential. Follow Collabora integration guide for generic overview. For collabora-built-in the only specialty is the address used:

  • https://mydomain.tld/apps/richdocumentscode/proxy.php?req=/hosting/capabilities
  • https://mydomain-tld/apps/richdocumentscode/proxy.php?req=/hosting/discovery

I don’t really get what you trying to achieve here:

but it doesn’t look right for me. If I get the last line right you are running NC on a subdirectory which might be not supported for CODE:

Thanks for the reply.

The docker labels are from this collabora post

In Collabora integration guide for generic overview you linked I read that setting collabora-built-in is more complicated and harder to debug. I decided to setup collabora in my docker-compose.yml file.

What should I say, it just works :slight_smile: Thanks for pushing me in the right direction.

1 Like