Socket Error when accessing Collabora

I just got mine to work with system wide nginx install reverse proxying out nextcloud and collabora. I had the same issues described here and found Banjo’s post helpful.

I have both nextcloud and collabora setup via docker-compose (I’m a bit of a docker noob so pardon me if there is an easier way).

Basic overview:

  1. Standup nexus docker (not going over this)
  2. Standup collabora docker (docker-compose.yml below)
  3. Copy the loolwsd.xml from the docker’s environment to your local machine to customize. (I ran an interactive shell on the office container, but I think you can just exec a copy command as well)
  4. Modify the loolwsd.xml to turn off SSL (my ssl proxy is the termination, so http after that point) per Banjos post.
  5. Modify my nginx config for collabora to include examples from #2 ngix reverse proxy termination
  6. Change the nginx config to proxy the http://localhost not https:.
  7. restart nginx
  8. test you have fully signed https working (you should get text “ok”).
  9. Setup the https://collabora.tld.com url in nextcloud, not http://foo:9980 like the examples show.
  10. test by clicking on an office document in nextcloud (should open up collabora editor)

My docker-compose.yml:

version: '2'

services:
    office:
        image: collabora/code
        container_name: office
        restart: always
        ports:
          - 127.0.0.1:9980:9980
        volumes:
          - ./loolwsd.xml:/etc/loolwsd/loolwsd.xml
        environment:
          - domain=nextcloud_subdomain.tld.com
          - server_name=collabora_subdomain.tld.com
          - username=myadmin
          - password=mysecretpaassword
        security_opt:
          - seccomp:unconfined
        cap_add:
          - MKNOD
          - SYS_CHROOT
          - FOWNER

I hope this helps the next guy!