502 Bad Gateway error when trying to connect Onlyoffice document server docker to Nexcloud docker

I’m running Nextcloud 27 as a docker within OpenMediaVault 6. Exposed to the internet via duckdns/nginx alongside a few other services, running stably for 1 and a bit years.

I took a docker-compose for the Onlyoffice document server from this post:

https://www.reddit.com/r/selfhosted/comments/wu60bj/working_onlyoffice_dockercomposeyml/

---
version: '3.3'
services:
    documentserver:
        image: onlyoffice/documentserver
        container_name: onlyoffice-documentserver
        restart: always
        ports:
            - '5025:80'
        labels:
            - deunhealth.restart.on.unhealthy=true
        volumes:
            - '/home/cuntable/docker-data/onlyoffice/logs:/var/log/onlyoffice'
            - '/home/cuntable/docker-data/onlyoffice/data:/var/www/onlyoffice/Data'
            - '/home/cuntable/docker-data/onlyoffice/lib:/var/lib/onlyoffice'
            - '/home/cuntable/docker-data/onlyoffice/db:/var/lib/postgresql'
            - '/home/cuntable/docker-data/onlyoffice/redis:/var/lib/redis'
            - '/home/cuntable/docker-data/onlyoffice/font:/usr/share/fonts/truetype/custom'
            - '/home/cuntable/docker-data/onlyoffice/rabbitmq:/var/lib/rabbitmq'
            - '/home/cuntable/docker-data/onlyoffice/ds.example.conf:/etc/supervisor/conf.d/ds-example.conf'

and installed via Portainer (hashing out the networks subsection as that seems specific to OPs setup). Navigating to my.server.local.ip:5025, I get the welcome page:

as expected. After some minor edits to documentserver.subdomain.conf:

 set $upstream_app adminer;
 set $upstream_port 8080;

becomes

set $upstream_app my.server.local.ip;
 set $upstream_port 5025;

navigating to documentserver.myserver.duckdns.org now also shows me the welcome screen. Time to install the Onlyoffice NC app and add the server address. However, when I do that:

Error when trying to connect (Server error: `GET https://documentserver.myserver.duckdns.org/healthcheck` resulted in a `502 Bad Gateway` response:

502 Bad Gateway

502 Bad Gateway
ngin (truncated...)

Error message is also truncated in the logs available in the NC web interface. I also cannot find any way to navigate manually to Onlyoffice, even outside of Nextcloud. It’s the welcome page, and nothing else. It feels like something is vitally lacking in the install, but I can’t find out what because of the truncated error messages. Any ideas on what my next step should be?

It also appears that the editors are not running properly:

$ sudo docker exec 0xxxxxxxxxxe sudo supervisorctl start ds:example
[sudo] password for [user]:
unix:///var/run/supervisor.sock no such file

It appears that this line:

  • /srv/dev-disk-by-uuid-xxx/config/onlyoffice/ds.example.conf:/etc/supervisor/conf.d/ds-example.conf

was the issue. Another user had included it to make the docker more robust against restarts/updates

Hello @user-of-file

sudo docker exec 0xxxxxxxxxxe sudo supervisorctl start ds:example
[sudo] password for [user]:
unix:///var/run/supervisor.sock no such file

What is your version of docker engine? Probably this error entry is related to old docker version.