Hello everyone,
I’m trying Nextcloud and Collabora Online on a local environment for the very first time, just for fun. But I’m not being able to open any of the .odt
and .docx
example documents.
Here’re my settings:
- MBP M1 macOS Monterey 12.6
- UTM 3.2.4 (58)
- Ubuntu 22.04 Jammy Jelly Fish
- Apache/2.4.52 (Ubuntu)
- PHP 8.1
- MariaDB Ver 15.1 Distrib 10.6.7-MariaDB, for debian-linux-gnu (aarch64)
- Docker 20.10.12, build 20.10.12-0ubuntu4
- Nextcloud 24.0.5
- Collabora Online latest Docker pull
Nextcloud is installed under Apache with the following Virtual Host,
<VirtualHost *:80>
DocumentRoot /var/www/nextcloud/
ServerName nextcloud.domain.local
ErrorLog /var/www/nextcloud/nc-error.log
CustomLog /var/www/nextcloud/nc-access.log combined
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
</VirtualHost>
and software configurations in config.php
:
<?php
$CONFIG = array (
'instanceid' => 'id',
'passwordsalt' => 'salt',
'secret' => 'secret',
'trusted_domains' =>
array (
0 => 'nextcloud.domain.local',
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '24.0.5.1',
'overwrite.cli.url' => 'http://nextcloud.domain.local',
'overwriteprotocol' => 'http',
'htaccess.RewriteBase' => '/',
'dbname' => 'nextcloud',
'dbhost' => 'localhost:3306',
'dbport' => '',
'dbtableprefix' => 'oc_',
'mysql.utf8mb4' => true,
'dbuser' => 'user',
'dbpassword' => 'password',
'installed' => true,
'app_install_overwrite' =>
array (
0 => 'documentserver_community',
),
'overwritehost' => 'nextcloud.domain.local',
'allow_local_remote_servers' => true,
);
Collabora Online is run inside a Docker container through the following command line,
sudo docker run -t -d -p 127.0.0.1:9980:9980 -e "aliasgroup1=http://nextcloud\\.domain\\.local:80" -e "username=username" -e 'password=password' -e "extra_params=--o:ssl.enable=false --o:ssl.termination=false" --privileged --restart always collabora/code
with the following Virtual Host,
<VirtualHost *:80>
########################################
# Reverse proxy for Collabora Online
########################################
Options -Indexes
ServerName collabora.domain.local
ErrorLog /var/www/nextcloud/coolwsd-error.log
CustomLog /var/www/nextcloud/coolwsd-access.log combined
AllowEncodedSlashes NoDecode
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
</VirtualHost>
and server configurations in coolwsd.xml
:
<config>
<server_name desc="External hostname:port of the server running coolwsd. If empty, it's derived from the request (please set it if this doesn't work). May be specified when behind a reverse-proxy or when the hostname is not reachable directly." type="string" default="">collabora.domain.local</server_name>
<ssl desc="SSL settings">
<enable type="bool" desc="Controls whether SSL encryption between coolwsd and the network is enabled (do not disable for production deployment). If default is false, must first be compiled with SSL support to enable." default="true">false</enable>
<termination desc="Connection via proxy where coolwsd acts as working via https, but actually uses http." type="bool" default="true">false</termination>
</ssl>
</config>
I’m able to open the service status, the service metrics, and the admin console. I’m also able to save the Collabora Online-server URL in the Nextcloud administration settings, and see the message Collabora Online server is reachable.
But when I try to open the example document, Welcome to Nextcloud Hub.docx, in Nextcloud, I see the error Failed to load Nextcloud Office - please try again later, and the following console error:
and Apache logs:
127.0.0.1 - - [07/Oct/2022:05:54:26 +0200] "PROPFIND /remote.php/dav/files/name/Documents/Welcome%20to%20Nextcloud%20Hub.docx HTTP/1.1" 207 1443 "-" "Mozilla/5.0>
127.0.0.1 - - [07/Oct/2022:05:54:26 +0200] "GET /apps/richdocuments/index?fileId=9&requesttoken=Imusb5SsEhZjbzh1Cx4UnlyKPmTjp2Im2HetUYWerNw%3D%3AVBLEJP3cZkNXV09GJHNd>
127.0.0.1 - - [07/Oct/2022:05:54:26 +0200] "GET /apps/richdocuments/js/richdocuments-document.js?v=becea89b-0 HTTP/1.1" 200 66534 "-" "Mozilla/5.0 (X11; Ubuntu; Linu>
127.0.0.1 - - [07/Oct/2022:05:54:27 +0200] "GET /cron.php HTTP/1.1" 200 877 "-" "Mozilla/5.0 (X11; Ubuntu; Linux aarch64; rv:105.0) Gecko/20100101 Firefox/105.0"
If I try to open the URL directly in a browser tab, I get the following error,
and Colabora Online server error logs:
wsd-00001-00064 2022-10-07 06:47:15.482704 +0000 [ docbroker_002 ] ERR loading document exception: Access denied, 403. WOPI::CheckFileInfo failed on: http://nextcloud.domain.local/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek?permission=edit| wsd/DocumentBroker.cpp:2263
wsd-00001-00064 2022-10-07 06:47:15.482736 +0000 [ docbroker_002 ] ERR Failed to add session to [http://nextcloud.domain.local:80/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek] with URI [http://nextcloud.domain.local/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek?permission=edit]: Access denied, 403. WOPI::CheckFileInfo failed on: http://nextcloud.domain.local/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek?permission=edit| wsd/DocumentBroker.cpp:2225
wsd-00001-00064 2022-10-07 06:47:15.482767 +0000 [ docbroker_002 ] ERR Unauthorized Request while starting session on http://nextcloud.domain.local:80/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek for socket #22. Terminating connection. Error: Access denied, 403. WOPI::CheckFileInfo failed on: http://nextcloud.domain.local/index.php/apps/richdocuments/wopi/files/9_ocns7lv0gdek?permission=edit| wsd/COOLWSD.cpp:4615
wsd-00001-00064 2022-10-07 06:47:15.482807 +0000 [ docbroker_002 ] ERR Invalid or unknown session [008] to remove.| wsd/DocumentBroker.cpp:2308
I’m aware this could be a normal behavior, considering that Collabora Online might expect a Nextcloud request to open a document.
That’s all I’ve got. I feel that the main problem could be related to SSL, but I’m not quite sure.
Anyone having the same issue?
Thank you all in advance for your help.