Unable to connect nextcloud docker to collabora container which is accessible from host

Good afternoon,

My problem: I can access my Collabora container at http://office.${DOMAIN_NAME}/loleaflet/dist/admin/admin.html from my host, and office.${DOMAIN_NAME} shows OK (though https gives 500 error for both), so my collab server is runing, but when attempting to connect my nextcloud server to the collab container I get the error “Failed to load Collabora Online - please try again later”, no matter which combination of the following I enter in the nextcloud setting for collab URL:

{http,https}://{nextcloud-collab,office.${DOMAIN_NAME}}:{9980,80,}

I tried following examples from [Collabora] Configuration with docker-compose (which led to the below compose.yml) and elsewhere, but to no avail. I’m attempting to have the entire network run via http as this is all on an internal network for which only some users have access to the internal DNS, hence VIRTUAL_HOST having both nextcloud.${DOMAIN_NAME} and nextcloud.${DOMAIN_NAME}.${TLD}. I suspect the issue could stem from not having valid LE certificates such that nextcloud refuses to connect to collab, but am unsure how to correct this.

After having now sunk hours into resarching the issue and permuting all settings I can think of I’ve run out of thigs to try… is there something I’m doing obviously wrong? Should I perhaps be switching to using self signed certificates with jwilder/nginx-proxy and use https for everything after all?

Thanks

version: ‘3’
services:
nginx-proxy:
image: jwilder/nginx-proxy:alpine
labels:
- “com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy=true”
container_name: nginx-proxy
networks:
- proxy_network
ports:
- 80:80
- 443:443
volumes:
- ./proxy/conf.d:/etc/nginx/conf.d:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- ./proxy/certs:/etc/nginx/certs:ro
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
restart: unless-stopped

letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
depends_on:
- nginx-proxy
networks:
- proxy_network
volumes:
- ./proxy/certs:/etc/nginx/certs:rw
- ./proxy/vhost.d:/etc/nginx/vhost.d:rw
- ./proxy/html:/usr/share/nginx/html:rw
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: unless-stopped

nextcloud:
image: nextcloud:latest
container_name: nextcloud-app
networks:
- proxy_network
- ldap_network
depends_on:
- letsencrypt
- nginx-proxy
- nextcloud-db
- nextcloud-redis
volumes:
- ./nextcloud-db:/var/lib/mysql
- ${DATA_LOCATION}/nextcloud:/var/www/html/data
- ./nextcloud/config:/var/www/html/config
- ./nextcloud/custom_apps:/var/www/html/custom_apps
- ./nextcloud/themes:/var/www/html/themes
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_HOST=nextcloud-db
- REDIS_HOST=nextcloud-redis
- VIRTUAL_HOST=nextcloud.${DOMAIN_NAME},nextcloud.${DOMAIN_NAME}.${TLD}
- LETSENCRYPT_HOST=nextcloud.${DOMAIN_NAME}.${TLD}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
restart: unless-stopped

nextcloud-collab:
image: collabora/code
container_name: nextcloud-collab
networks:
- proxy_network
depends_on:
- letsencrypt
- nginx-proxy
cap_add:
- MKNOD
#ports:
# - 9980:9980
expose:
- 9980
environment:
- domain=nextcloud\\.${DOMAIN_NAME}
- username=admin
- password=${ADMIN_PASSWORD}
- VIRTUAL_PROTO=https
- VIRTUAL_PORT=9980
- VIRTUAL_NETWORK=proxy_network
- VIRTUAL_HOST=office.${DOMAIN_NAME}
- LETSENCRYPT_HOST=office.${DOMAIN_NAME}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
restart: unless-stopped