Problem running OnyOffice

After having had problems running Collabora I decided to try OnlyOffice, which seems to be the only valid alternative to Collabora…
I’ve installed the image on Docker, ran it, (of course I removed all the Collabora stuffs before) and added the OnlyOffice unofficial app to my Nextcloud.
Having not found threads about issues related to the use of TLS/SSL I decided to test it on an unsafe mode, on the 80 port. I decided also to run it on the same host where Nextcloud was running, quitting Apache from listening on the 80 port.
The image is properly running and it can be checked accessing the welcome page from the browser but when I try to open a document from Nextcloud I receive immediately the message “ONLYOFFICE app not configured. Please contact admin”.
Checking the log of the docker image there is not any error.
I’m using Nextcloud 11.0.2 (stable) on an Apache webserver, on Debian 9.0 (stretch) with docker running on the same host.
Does anyone had this problem and fixed it in some way?

You should use another host.
Try to use SSL Encryption, here https://github.com/onlyoffice/docker-documentserver is a good how to.

I had the same Problem but i was running on 2 different system.
I tried to access the documentserver directly, in your case in your browser http://mydocumentserver

When it says Documentserver is running, try again to open a document.
Sounds crazy but that was the solution to my issue.

Regards

1 Like

I’ve been having the same issue. Pinged a contact at ONLYOFFICE to come take a look :slight_smile:

Hello! Please specify the following moments.

  1. Version of Document Server.
  2. When does the issue occur: when you open documents form internal or from external network?
  3. Did you set document server’s address at the page with administrative settings /index.php/settings/admin#onlyoffice?

If your nextcloud is using ssl, you have to do that with onlyoffice too. Recent browsers refuses mixed content.

Hi, the issue occours both from internal and external networks. I’ve properly set the document server address in the administrtive settings. of course.

Thank you dev0, following the suggestions in this thread I’ve tried to move the document server to a different host and found the same problems keeping the service unsecure.
Now I’m trying to run onlyoffice on port 443, the image starts normally but I haven’t found any useful howto to install a certificate for it, can you help me?

@filippo If its not accessible via the internet in my opinion a self-signed cert does the work. Other option would be a Let’s Encrypt cert which is available for free.

I’m using let’s encrypt with nextcloud, it works very well.
The problem here is that I can’t understand how to produce a certificate for the onlyoffice docker image…

Try mapping ports and folder with the certificates following the steps described here
If the folder is already mapped, copy the crt and key files and restart the onlyoffice container

I thought you now where running these systems on different hosts, so i think you will have different domains to access them.

You need a cert for every domain.

So you have to create a cert for you f.e. onlyoffice.example.com and one for nextcloud.example.com

Yes, of course.
But while it was easy to configure the SSL for nextcloud in apache, it seems to be slightly more complicated for onlyoffice: I cannot use an apache virtualhost listening on port 443 because the OnlyOffice image need to use this port in an exclusive way.
I’ve read the howto linked by ibnpetr but is not clear where is the folder app/onlyoffice/DocumentServer/data/

in your root. The folder is /app/onlyoffice/DocumentServer/data not app/onlyoffice/DocumentServer/data

Oh, what a stupid error…
Well, I’v followed that howto but still not working.
No error in docker log, but I see in my browser console that the connection is refused: “GET https://documentserverurl/web-apps/apps/api/documents/api.js net::ERR_CONNECTION_REFUSED”

@filippo did you copy the certs to the named destination and restartet the docker image?

Yes.
Resuming:
I’ve installed Docker running OnlyOffice image on a different host respect to the one where Nextcloud is running. OnlyOffice is started on port 443:443 and I followed the steps on the linked howto regarding the certificate.
The link of the host running OnlyOffice is properly set (with https://) into the admin settings of Nextcloud.
But it’s still not working… what I’m forgetting?