A follow up to anyone who stumbles across this thread trying to setup this.
You can’t simply use the internal docker networking for nextcloud to access collabora. Nextcloud will say everything is fine when you enter this but nothing will work. The client machine must have full access to the collabora endpoints for this to work, not just nextcloud.
Anyway, heres how I managed to get this working with no nginx proxy (in fact, nginx proxy was throwing errors). Do note I am still on traefik v1.7 but the labels used here should be fairly self explanatory for adapting to v2.x syntax.
This method requires no manual editing of loolwsd.xml. You can simply run this yaml, and it is all good to go. All the loolwsd settings are managed via extra_params env variable.
I allow all ip addresses to access wopi.host and post_allow, which is necessary as this regex must match the client ip address, which, to allow arbitrary WAN connections, needs to be all ips.
code:
image: collabora/code:latest
container_name: nextcloud-code
environment:
- username=admin
- password=SECRET
- domain=nextcloud\\.ayew\\.host
- extra_params=--o:ssl.enable=false --o:ssl.termination=true --o:net.post_allow.host[0]=.+ --o:storage.wopi.host[0]=.+
networks:
- proxy
labels:
- traefik.frontend.rule=Host:collabora.ayew.host
- traefik.docker.network=proxy
- traefik.port=9980
- traefik.frontend.passHostHeader=true
cap_add:
- MKNOD
restart: always