Collabora keeps loading after opening document

I installed Collabora for owncloud following:

Everything went totally fine, http://localhost:9980 says “ok” and I can reach
http:// localhost:9980/loleaflet/dist/admin/admin.html

After setting the Collabora Online Server to localhost on port 9980 getting an ok, I tried to open a docx document in owncloud. But instead of showing the document it keeps loading…

The error seems to be:

Collabora Online: No connection can be established to the host “http ://localhost:9980”.

Please ask your administrator to check the Collabora Online server settings. The exact error message was:cURL error 7: Failed to connect to localhost port 9980: Connection refused

I would try to set a DNS Entry and access via HTTPS

@dmitry Just access collabora over https? Wouldn’t I get an error referring to uneven protocols?

And how do I do that?

Setting the adress on instead of localhost:9980 the error disappears but it just keeps loading infinitely…

I finally got to access collabora on to get an “ok” response by setting ssl true with:
docker exec -it collabora /bin/bash -c "apt-get -y update && apt-get -y install xmlstarlet && xmlstarlet ed --inplace -u \"/config/ssl/enable\" -v true /etc/loolwsd/loolwsd.xml && xmlstarlet ed --inplace -u \"/config/ssl/termination\" -v true /etc/loolwsd/loolwsd.xml".

But connecting to it in owncloud I get: hat die Verbindung abgelehnt.

Hi @Combo_Breaker,
I’ve just tried to reproduce your error with an ownCloud running in docker and Collabora running in a container like you did.

When going to http:// localhost:9980/loleaflet/dist/admin/admin.html I’m not able to set the necessary settings described in the documentation. Were you able to do this?

I could see the following in the collabora docker logs (docker logs collabora --tail=100 -f):

ERR  Cannot get file info from WOPI storage uri [http://localhost:8080/apps/richdocuments/wopi/files/12_ocrktkqjfzs5?access_token=1FsqICpCRdhAr3YuD6o87ZR6AYyEVf5O&access_token_ttl=0&permission=edit]. Error: Connection refused| wsd/Storage.cpp:474

Otherwise you might be able to set the configuration using the following xmlstarlet command by execing into the container (docker exec -it collabora bash).

xmlstarlet ed -L --subnode "config/net/post_allow" --type elem -n host -v "ip\.ad\.dr\.ess" /etc/loolwsd/loolwsd.xml

Make sure to replace ip\.ad\.dr\.ess\ with your public IP or for example with other-40\.umwelt-campus\.de and make sure to backslash all dots.

Alternatively you could also run the following command directly:

docker exec -it collabora /bin/bash -c "xmlstarlet ed -L --subnode \"config/net/post_allow\" --type elem -n host -v \"ip\.ad\.dr\.ess\" /etc/loolwsd/loolwsd.xml"

Afterwards you need to restart the docker container again to apply the configuration changes:

docker restart collabora

Hope that helps. Otherwise you might be able to see additional error messages (ERR) in the docker log while trying to access collabora through ownCloud, please send those through.

@eneubauer The settings have to be set in the Owncloud admin panel.

Okay, I’ll try this out. Thanks.

The reason I couldn’t connect to collabora on https was, I didn’t access Owncloud on https but just collabora. Do you know how to ssl encrypt owncloud?
btw is my localhost machine.

My vHost is just connecting to 9980 (Collabora):

<VirtualHost *:80>

   # Encoded slashes need to be allowed
   AllowEncodedSlashes NoDecode

   # Container uses a unique non-signed certificate
   SSLProxyEngine On
   SSLProxyVerify None
   SSLProxyCheckPeerCN Off
   SSLProxyCheckPeerName Off

   # keep the host
   ProxyPreserveHost On

   # static html, js, images, etc. served from loolwsd
   # loleaflet is the client part of LibreOffice Online
   ProxyPass /loleaflet retry=0
   ProxyPassReverse /loleaflet https://localhost:9980/loleaflet

   # WOPI discovery URL
   ProxyPass /hosting/discovery retry=0
   ProxyPassReverse /hosting/discovery

   # Main websocket
   ProxyPassMatch "/lool/(.*)/ws$" wss://$1/ws nocanon

   # Admin Console websocket
   ProxyPass /lool/adminws wss://

   # Download as, Fullscreen presentation and Image upload operations
   ProxyPass /lool
   ProxyPassReverse /lool


<IfModule mod_ssl.c>
    <VirtualHost _default_:443>

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        SSLEngine on
        SSLCertificateFile /etc/apache2/ssl/apache.crt
        SSLCertificateKeyFile /etc/apache2/ssl/apache.key
        <FilesMatch "\.(cgi|shtml|phtml|php)$">
            SSLOptions +StdEnvVars
        <Directory /var/www/html>
            SSLOptions +StdEnvVars
            DirectoryIndex index.php
            AllowOverride All
            Order allow,deny
            Allow from all
        BrowserMatch "MSIE [2-6]" \
                        nokeepalive ssl-unclean-shutdown \
                        downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

Without SSL I get the error message:

Unautorisierter WOPI Host - Versuchen Sie es später noch mal.

The problem is that ‘localhost’ inside the container will resolve to the internal container. But there the ownCloud installation won’t be available.

root@230a6c7ea892:/# docker exec -ti collabora  bash
telnet localhost 9980
Connected to localhost.
Escape character is '^]'.
telnet> Connection closed.
root@230a6c7ea892:/# telnet localhost 8080
Trying ::1...
telnet: Unable to connect to remote host: Cannot assign requested address

My ownCloud installation is available on the port 8080

eneubauer@host:~/bin/core$ docker ps
CONTAINER ID        IMAGE                      COMMAND                  CREATED             STATUS                 PORTS                    NAMES
230a6c7ea892        collabora/code             "/bin/sh -c 'bash st…"   2 hours ago         Up 2 hours   >9980/tcp   collabora
af004d98f332        owncloud/server:10.1       "/usr/bin/entrypoint…"   3 hours ago         Up 3 hours (healthy)>8080/tcp   owncloud-docker-server_owncloud_1

And the last part of the documentation definitely mentions to access collabora admin page:

Access Collabora Admin at http://[your-host-public-ip]:9980/loleaflet/dist/admin/admin.html e.g. , and set in Settings -> Admin -> Additional -> Collabora Online server -> http://[your-host-public-ip]:9980

So what could I do?

With https I can connect to but not to :8080 even if Owncloud is running…

Regarding SSL, if you look at the commands from the documentation very closely, you’ll notice that they disable SSL access for Collabora:

docker exec -it collabora /bin/bash -c "apt-get -y update && apt-get -y install xmlstarlet && xmlstarlet ed --inplace -u \"/config/ssl/enable\" -v false /etc/loolwsd/loolwsd.xml && xmlstarlet ed --inplace -u \"/config/ssl/termination\" -v false /etc/loolwsd/loolwsd.xml"

So you might want to re-enable SSL in the config

xmlstarlet ed --inplace -u "/config/ssl/enable" -v true /etc/loolwsd/loolwsd.xml

Note the different ‘’ and ’ " ’ if you want to directly run it with docker exec:

docker exec -it collabora /bin/bash -c "xmlstarlet ed --inplace -u \"/config/ssl/enable\" -v true /etc/loolwsd/loolwsd.xml"

Afterwards you’ll have to restart the docker container

docker restart collabora

I think your ownCloud runs on 443, as it doesn’t seem to be a docker setup.

Yep, I already did that . And I can access Collabora via SSL on port :9980 .

The problem is that I can’t run Owncloud on port 8080 via https. Just on http. I followed the official owncloud documentation and run it on port 8080 with the docker-compose.yml

    image: owncloud/server:${OWNCLOUD_VERSION}
    restart: always
      - ${HTTP_PORT}:8080

Is mod_ssl enabled?

Your default-ssl.conf configures port 443 not 8080, which is neither published nor exposed.

If you’re also running docker for your ownCloud, I would recommend to set up a reverse proxy that terminates SSL on the public IP address and forwards all traffic to the unencrypted endpoints.

You could have a look into jwilder’s nginx-proxy with docker-gen

I’m running a vanilla docker-compose.yml for owncloud-docker-server and collabora docker container you linked. The only adjustment I had to make to get it running was the one from my first post in this thread.
If that’s possible for you, it might be worth it to blow away your current environment and start over.

Afterwards you can start implementing the SSL termination via a reverse proxy.

Yep, I enabled ssl on apache2.

So, if i changed the :443 to :8080 I can’t even access but still :9980.

If you’re also running docker for your ownCloud, I would recommend to set up a reverse proxy that terminates SSL on the public IP address and forwards all traffic to the unencrypted endpoints.

I sadly got no idea how. Totally new to this stuff…

Is there no current way to get the ssl encrytion running on port 8080? Or 8082 - I mean you can change it if you want.

I remember vaguely that you can’t access collabora via localhost, you have to use the DNS name. So you have to go in the collabora container and create a hosts entry for your VM outside of the container.

I don’t access it over localhost. I’m using “” as domain name.

Do you have your ownCloud VM as a host entry in the collabora docker container?