Difficulty connecting OnlyOffice to Nextcloud

Nextcloud version (eg, 20.0.5): nextcloud 27.1.13
Operating system and version (eg, Ubuntu 20.04): Docker on Ubuntu 22.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.57
PHP version (eg, 7.4): 8.1 - I think the latest docker image.
Onlyoffice: 7.5
OnlyOffice plugin: 8.2.4 ← built from source and inserted to the nextcloud container after the default one downloaded in the UI didn’t work.


I am struggling to get a very basic setup of OnlyOffice - or even Nextcloud office/collabora - connected to my test system.

I am trying to build a docker compose file with NO reverse proxy, self-signed or even no SSL certificates ← again this is just for testing, and I am trying to build this one step at a time.

Essentially I have a db, Nextcloud app, and OnlyOffice instances running as separate containers part of the the same network - this is the default in Docker compose. The db and the app connect no problem, I’ve set it up dozens of times.

OnlyOffice can succeed in getting a ‘true’ response if tested. The error I receive is
Error when trying to connect (Error occurred in the document service: Error while downloading the document file to be converted.) (version

I’ve tried to do all the steps in this ticket, but still no dice. I am struggling to understand how I can further debug, so any tips would be very helpful.

Here is the Docker compose I have thus far.

version: '3'

    image: mariadb:10.5
    restart: unless-stopped
    container_name: nxtclouddb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
      - ./datadb:/var/lib/mysql
      - MYSQL_ROOT_PASSWORD=***********
      - MYSQL_PASSWORD=**********
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud

    image: nextcloud:latest
    container_name: nxtcloud
    restart: unless-stopped
      - 9080:80
      - db
      - ./data:/var/www/html
      - MYSQL_PASSWORD=************
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db

    image: onlyoffice/documentserver:latest
      - 9970:80
      - app
    container_name: onlyOffice
      - JWT_SECRET=secret
      - JWT_HEADER=AuthorizationJwt

I am probably just missing something very simple, but seems like just using the service names to connect doesn’t allow for the response to take place, and I suspect it could be related to Docker network is unknown to the Nextcloud interface.

take a look at Nextcloud Collabora integration. The integration using WOPI protocol is same and all the mechanics should work similar.

btw: as soon you start production I strongly recommend to use defined docker tags and avoid :latest https://vsupalov.com/docker-latest-tag/

Thank you. The requirements for that setup have public DNS and TLS certificates to enable all of the services. Is it not possible to run Nextcloud with NC office (Collabora) or Only Office without those even for testing?

I did try this Quick tryout with Nextcloud docker - Collabora Office and Collabora Online but it didn’t work.

The requirement is to run NC and CODE same way… but I’m not sure it work at all without TLS and didn’t even test because I would never expose my Nextcloud to an internet without TLS (and there is no reason for me to run CODE locally). Today with letsencrypt certificates TLS is easy and cheap so you should go this way from the beginning.

Hello. Thank you for the response. I did get it set up using the Nextcloud AIO image and building a small node in Linode after purchasing a private domain name. Connectivity is a bit hit and miss, sometimes docs fail to load, sometimes it works, but enough to just explore the feature.

I think it is a bit of a miss honestly to not support HTTP and IP-based authentication. One of Nextcloud’s strengths is to run on premise meaning it would not be exposed to the Internet. Files works great without the more complicated requirements of domain names and TLS/SSL, the addition of just the office suites multiplies deployment complexity by orders of magnitude.

I’ll try to look at forcing the CODE plugin to install - currently the app is failing to install, but I did read your other post about the OCC commands to force it. Perhaps that is the better route for a single system deployment on a local network.

Thanks a lot for all the feedback and support.

Hello - I managed to figure out the issue.

My Nextcloud server I had running on a non-standard port - 9036 and 9037. I while the services in the Docker network do route to one another between Nextcloud / Apache and the Collabora service, the handshake breaks because the user log in and user of the environment is from a non-standard port.

Adjusting to port 80 and applying these environment parameters to Collabora allowed for successful connection (only for testing purposes) without SSL.

extra_params: “–o:ssl.enable=false --o:net.frame_ancestors=*.local”

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.