Hey everyone,
I’ve been trying to troubleshoot an internal connection issue between Nextcloud and Collabora CODE, and I’m not completely sure if my architecture or configuration logic is correct — maybe I’m missing something small.
Setup Summary
We run both Nextcloud and Collabora CODE as Docker containers behind a corporate WAF (which performs SSL termination) and an internal NGINX reverse proxy that routes to the containers.
Externally, users access everything via HTTPS (https://nc.examplecloud.com, https://office.examplecloud.com), but internally the containers communicate via plain HTTP on a private Docker network.
Client (HTTPS)
↓
Corporate WAF (SSL termination)
↓
Internal NGINX reverse proxy
├─ Nextcloud container → http://172.23.0.5:80
└─ Collabora container → http://172.23.0.6:9980
However, Collabora still seems to use the external HTTPS route when performing WOPI requests to Nextcloud, causing:
wsd-00001-00024 [ websrv_poll ] ERR #31: Failed or timed-out CheckFileInfo
[https://nc.examplecloud.com/index.php/apps/richdocuments/wopi/files/3703_abcxyz?access_token=abc&permission=edit]
| wsd/wopi/CheckFileInfo.cpp:119
Nextcloud config.php (sanitized)
<?php
$CONFIG = array (
'overwrite.cli.url' => 'http://nc.examplecloud.com',
'overwritehost' => 'nc.examplecloud.com',
'overwriteprotocol' => 'http',
'overwritecondaddr' => '^172\\.23\\.0\\.',
'trusted_proxies' => [
'172.18.0.0/16',
'172.22.23.90',
'192.168.0.0/16',
'172.23.0.0/24',
],
'trusted_domains' => [
'nc.examplecloud.com',
'office.examplecloud.com',
'collabora',
'172.23.0.0/24',
],
'richdocuments' => [
'wopi_url' => 'http://collabora:9980',
'wopi_allowlist' => ['0.0.0.0/0','::/0'],
],
'allow_local_remote_servers' => true,
);
docker-compose.yml excerpt (simplified)
services:
nextcloud:
image: nextcloud:latest
networks:
nextcloud_net:
ipv4_address: 172.23.0.5
volumes:
- ./config:/var/www/html/config
- ./custom_apps:/var/www/html/custom_apps
environment:
- POSTGRES_HOST=ip-db
- REDIS_HOST=redis
collabora:
image: collabora/code:latest
networks:
- nextcloud_net
extra_hosts:
- "nc.examplecloud.com:nginx-internal-ip"
- "office.examplecloud.com:nginx-internal-ip"
environment:
- aliasgroup1=https://.*:443
- aliasgroup2=http://office\.examplecloud\.com
- extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:net.proxy_disable=true
- DONT_GEN_SSL_CERT=true
ports:
- "9980:9980"
nginx:
image: nginx:1.24-alpine
networks:
- nextcloud_net
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
networks:
nextcloud_net:
driver: bridge
ipam:
config:
- subnet: 172.23.0.0/24
What I’m trying to figure out
-
Why is Collabora still calling the external HTTPS endpoint (handled by WAF) instead of the internal HTTP route?
-
Could
overwriteprotocolandoverwritecondaddrbe ignored in this network chain (due to proxy headers)? -
Or maybe the
aliasgroup1in Collabora isn’t rewriting URLs correctly behind NGINX and WAF?
If anyone has a similar setup (WAF + NGINX reverse proxy + dockerized Nextcloud & Collabora) and got internal WOPI HTTP working, I’d really appreciate your input.
I’m not even sure if this is the correct way to configure it at all — maybe I’ve taken the wrong approach from the beginning? Any insights or confirmation would really help. :)))
