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.
wwe
May 2, 2024, 7:31pm
2
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:
opened 09:21PM - 09 Nov 21 UTC
Hi,
I am using the Collabora online CODE server installed over nextcloud on ar… m64.
The nextcloud is hosted on apache2 and accessible over a subdir like mydoman.tld/nc through a nginx reverse proxy.
Accessing the nextcloud and all other apps is no problem, but collabora code just wont load correctly, because it tries to access the proxy.php file the second and next requests over **domain.tld/apps/**... instead of **domain.tld/nc/apps/.**..
If I run: `php occ config:app:get richdocuments wopi_url ` it gives me the correct url with the subfolder.
It looks like this when trying to access the example file (https://domain.tld/nc/apps/richdocumentscode_arm64/proxy.php?req=/loleaflet/dist/loleaflet.html?file_path=file:///opt/libreoffice/online/test/data/hello-world.odt):
![grafik](https://user-images.githubusercontent.com/79169725/141004122-d8e5f51f-271d-4f08-8814-9227657c1c13.png)
The nextcloud is configured in config/config.php for the proxy and subpath:
```
[...]
'overwriteprotocol' => 'https',
'overwritehost' => 'domain.tld:443',
'overwritewebroot' => '/nc',
```
Also nc reports, that collabora online is accessible in the settings.
nginx is configured like this:
```
location ^~/nc/ {
rewrite /nc(.*) $1 break;
[...]
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:4000;
}
```
Maybe I am missing an important setting here...
Thanks for your help! 😄
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 Thanks for pushing me in the right direction.
1 Like