[Solved] Nextcloud 15.0.2 and Collabora Docker "Latest"

Greetings! I have installed and have successfully used Nextcloud since version … 9 (maybe?). I am currently running version 15.0.2. Thank you Nextcloud team for all your hard work!

I recently tried to install and run Collabora CODE via docker per the instructions at collabora.com and elsewhere. I think the docker image is working properly. I can visit https://my-domain.com/hosting/discovery and receive what appears to be a valid XML document via cURL. Further, after I copy one of the URLs in the XML document and paste it into a browser, I see the error “Wrong or missing WOPISrc parameter, please contact support.”. After clicking OK on the error, the browser shows much of what appears to be the application, though it does not actually work.

I have enabled collabora with my URL in the Nextcloud configuration, but I cannot figure out how to open any documents. No “Documents” icon is added to the “icon bar” in Nextcloud. Also, clicking on any LibreOffice files either created or uploaded to my server fails to result in editing those documents. All I see is a blank page with the Nextcloud “bar” at the top of the page.

In my logs (apache and docker), I have seen none of the errors posted by other people in various forums. In fact, clicking on an ODT file in the “Documents” folder (in the “Files” tab) results in no log entries shown with docker logs --follow container_name

Am I missing something obvious?

Thanks for any help and suggestions you can offer.

Best regards, David Klann

Probably bad etiquette to reply to one’s own post, but I have now learned more about this. I am seeing the following errors in my apache error log file when I click on an ODT file in the “Documents” folder in “Files”:

PHP Fatal error:  Cannot declare class GuzzleHttp\\Handler\\CurlFactory, because the name is

already in use in /path/to/apache/DocumentRoot/nextcloud/3rdparty/guzzlehttp/guzzle/src/Handler/CurlFactory.php on line 15

Still searching for a solution…


Hi @dklann I’ve encountered that error, too, and it’s not very useful.

I’ve started finding good indication on how to fix my Collabora installation on the nextcloud.log file in your Nextcloud data directory.

@anon50134577 Thanks for that tip. I had not previously looked in the nexcloud.log file. Reading that file, I learned that PHP (cURL) was unable to resolve the LOOL host name (the name passed to the docker instance).

I added the hostname to /etc/hosts and I no longer see errors in either the apache log or nextcloud.log. But now I am seeing the infinite “spinning indicator.” On to the next issue.

I consider this specific issue solved.

Editing the file /etc/hosts is a hack that does not really solve the underlying issue (I tried that, too).

For example the infamous “spinning wheel” is a common issue when you setup Collabora, it means there is a problem with the dockerized instance to talk to the NextCloud instance (be it domain name resolution or SSL certs validation).

Still no error from docker logs when you open a document?

Did you double check the docker run command you execute to start the container? (asking because in the end I had a misconfigured setup)

Well, I finally got it working. It took several edits to the file /etc/loolwsd/loolwsd.xml as well as adding my nextcloud IP address to my local /etc/hosts.

I needed to add a line in the section net.post_allow with the IP address of my nextcloud host.
I also needed to add lines in storage.wopi_desc containing the regular expressions for my WOPI hostname and my WOPI IP address.

After making these changes and copying the file back inside the docker image I was able to view and edit LibreOffice documents on my nextcloud server. Yay!

Thanks @jman1for your suggestions and hints. I too consider adding my IP address to /etc/hosts a hack, but at least it is an effective workaround.

Glad you could solve your configuration!

Collabora is a great tool, but has still some rough edges :wink: