Hi,
i have also an issue with nextcloud integration while running collabora code as a docker instance. Let me post the issue first, and below some detailed system information. In general, i have no idea if this is a config issue in collabora or in apache or maybe something complete different.
Short description of the isse
- Nextcloud app richdocuments is configured with demoserver and works well
- Nextcloud app was configured with my own docker based instance which shows that everything is OK, except the WOPI ip adress limition. This list is empty, so that no access denied should happen while testing.
When trying to open a word document, the loading page appears, loads a moment and then “the document could not be loaded” appears. In the meantime, this error shows up in collabora log:
wsd-00001-00030 2025-04-18 19:45:38.348941 +0200 [ websrv_poll ] WRN #38: Unknown resource: /?Uri=wss%3A%2F%2Fonlyoffice.mydomain.de%2Fcool%2Fhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%253Faccess_token%253DjygDlWPpYq8NJmyzNElqJpNmEBnImNPy%2526access_token_ttl%253D0%2Fws%3FWOPISrc%3Dhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%26compat%3D%2Fws G, host: onlyoffice.mydomain.de, path: 1
[0] 'Uri=wss%3A%2F%2Fonlyoffice.mydomain.de%2Fcool%2Fhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%253Faccess_token%253DjygDlWPpYq8NJmyzNElqJpNmEBnImNPy%2526access_token_ttl%253D0%2Fws%3FWOPISrc%3Dhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%26compat%3D%2Fws'
full URI: /?Uri=wss%3A%2F%2Fonlyoffice.mydomain.de%2Fcool%2Fhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%253Faccess_token%253DjygDlWPpYq8NJmyzNElqJpNmEBnImNPy%2526access_token_ttl%253D0%2Fws%3FWOPISrc%3Dhttps%253A%252F%252Fnextcloud.mydomain.de%252Fnextcloud%252Findex.php%252Fapps%252Frichdocuments%252Fwopi%252Ffiles%252F192163_5284ca74215b1%26compat%3D%2Fws| wsd/ClientRequestDispatcher.cpp:940
In the browser, this request is shown with HTTP 400:
My configuration looks like:
- Collabora from docker image 24.04.13.2.1: onlyoffice .mydomain. de (forgive me, i reused the domain from previous office server
)
- Nextcloud 30.0.10 as native hosted: nextcloud. mydomain. de/nextcloud/ (yes, with path)
- Both running on the same host with apache2 as webserver. OS is current stable Debian, up2date
Collabore Admin Interface works well, even the websockets - Used the apache config with TLS termination from collabora: Proxy settings — SDK https://sdk.collaboraonline.com/ documentation
The first issue i’ve faced was, that calling the collabora domain without any path (and even without trailing slash shows the debian default page. I was able to solve this by adding the last line in virtual host config. Before, no error shows up in collabora log. So my guess is, that my apache config must be change in another way, but i have no idea how. Maybe someone of you can help me with that. Let me post the configs:
Apache virtual host config
<IfModule mod_ssl.c>
<VirtualHost *:443>
Servername onlyoffice.mydomain.de
SSLProxyEngine on
SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384
SSLProtocol All -SSLv2 -SSLv3
SSLCompression off
SSLHonorCipherOrder on
SSLCertificateFile /etc/letsencrypt/live/onlyoffice.mydomain.de/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/onlyoffice.mydomain.de/privkey.pem
include /etc/letsencrypt/options-ssl-apache.conf
#SetEnvIf Host "^(.*)$" THE_HOST=$1
#RequestHeader setifempty X-Forwarded-Proto https
#RequestHeader setifempty X-Forwarded-Host %{THE_HOST}e
#ProxyAddHeaders Off
AllowEncodedSlashes NoDecode
# keep the host
ProxyPreserveHost On
# static html, js, images, etc. served from coolwsd
# browser is the client part of Collabora Online
ProxyPass /browser http://127.0.0.1:9980/browser retry=0
ProxyPassReverse /browser http://127.0.0.1:9980/browser
# WOPI discovery URL
ProxyPass /hosting/discovery http://127.0.0.1:9980/hosting/discovery retry=0
ProxyPassReverse /hosting/discovery http://127.0.0.1:9980/hosting/discovery
# Capabilities
ProxyPass /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities retry=0
ProxyPassReverse /hosting/capabilities http://127.0.0.1:9980/hosting/capabilities
# Main websocket
ProxyPassMatch "/cool/(.*)/ws$" ws://127.0.0.1:9980/cool/$1/ws nocanon
# Admin Console websocket
ProxyPass /cool/adminws ws://127.0.0.1:9980/cool/adminws
# Download as, Fullscreen presentation and Image upload operations
ProxyPass /cool http://127.0.0.1:9980/cool
ProxyPassReverse /cool http://127.0.0.1:9980/cool
# Compatibility with integrations that use the /lool/convert-to endpoint
ProxyPass /lool http://127.0.0.1:9980/cool
ProxyPassReverse /lool http://127.0.0.1:9980/cool
ProxyPass / http://127.0.0.1:9980 retry=0
ProxyPassReverse / http://127.0.0.1:9980 retry=0
</VirtualHost>
</IfModule>
docker-compose.yml:
services:
collabora:
image: collabora/code:24.04.13.2.1
container_name: collabora_code
ports:
- "9980:9980"
restart: unless-stopped
volumes:
- /mnt/volume-fsn1-ds04/collabora-online/etc/coolwsd/:/etc/coolwsd/
cap_add:
- MKNOD
environment:
- domain=owncloud.mydomain.de
- aliasgroup1=owncloud.mydomain.de
- dictionaries=de_DE
- TZ=Europe/Berlin
In the mapped coolwsd.xml i’ve configured
- The SSL settings
- and the allowed POST hosts ip adresses
Thanks for help,
Markus