How do I setup a Collabora Server with Nextcloud and using Docker Compose

It doesn’t work by default and none of the NGINX tweaks I see for Collabora are working.

I have looked at pages like:

and

https://collabora-online-for-nextcloud.readthedocs.io/en/latest/install/

I used them to edit my NGINX configuration file.

Here is the docker compose file I am using.

version: '3.7' 

services:

  proxy:
    image: pinidh/nginx-proxy:latest
    labels:
    - nextcloud-proxy.nginx-proxy=true
    container_name: nextcloud-proxy
    networks:
      - network1
      - network2
      - network3
    ports:
      - 80:80
      - 443:443
    volumes:
      - nextcloud_dhparam:/etc/nginx/dhparam
      - nextcloud_conf.d:/etc/nginx/conf.d:rw
      - nextcloud_vhost.d:/etc/nginx/vhost.d:rw
      - nextcloud_html:/usr/share/nginx/html:rw
      - nextcloud_certs:/etc/nginx/certs:ro
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/tmp/docker.sock:ro
    restart: unless-stopped

  letsencrypt:
    image: pinidh/letsencrypt-nginx-proxy-companion:latest
    container_name: nextcloud-letsencrypt
    depends_on:
      - proxy
    networks:
      - network1
      - network3
    volumes:
      - nextcloud_acme:/etc/acme.sh
      - nextcloud_certs:/etc/nginx/certs:rw
      - nextcloud_vhost.d:/etc/nginx/vhost.d:rw
      - nextcloud_html:/usr/share/nginx/html:rw
      - /etc/localtime:/etc/localtime:ro
      - /var/run/docker.sock:/var/run/docker.sock:ro
    environment:
      - NGINX_PROXY_CONTAINER_LABEL=nextcloud-proxy.nginx-proxy
      - NETWORK_ACCESS=internal
    restart: unless-stopped

  db:
    image: mariadb
    container_name: nextcloud-mariadb
    networks:
      - network4
    volumes:
      -  nextcloud_db:/var/lib/mysql
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MYSQL_ROOT_PASSWORD=dragondragon
      - MYSQL_PASSWORD=dradra
      - MYSQL_DATABASE=dragon
      - MYSQL_USER=dragonballz
      - NETWORK_ACCESS=internal
    restart: unless-stopped
  
  app:
    image: nextcloud:latest
    container_name: nextcloud-app
    networks:
      - network2
      - network4
      - network3
    depends_on:
      - letsencrypt
      - proxy
      - db
      - av
      - collabora
    volumes:
      - nextcloud:/var/www/html
      - nextcloud_app_config:/var/www/html/config
      - nextcloud_app_custom_apps:/var/www/html/custom_apps
      - nextcloud_app_data:/var/www/html/data
      - nextcloud_app_themes:/var/www/html/themes
      - /etc/localtime:/etc/localtime:ro
    environment:
      - OVERWRITEPROTOCOL=https
      - VIRTUAL_HOST=march.ofthedragon.com
      - LETSENCRYPT_march.ofthedragon.com
      - LETSENCRYPT_DNS_MODE=dns_duckdns
      - LETSENCRYPT_DNS_MODE_SETTINGS=export DuckDNS_Token=atokeneffort
      - LETSENCRYPT_EMAIL=theemailtheemailthethetheemail
      - NETWORK_ACCESS=internal
      - LETSENCRYPT_TEST=true
      - DEBUG=1
    restart: unless-stopped


  av:
    image: mkodockx/docker-clamav:alpine
    container_name: nextcloud-clamav
    networks: 
      - network2
    depends_on:
      - proxy
    environment:
      - NETWORK_ACCESS=internal
    restart: unless-stopped


  collabora:
    image: collabora/code
    container_name: nextcloud-collabora
    networks:
      - network3
    depends_on:
      - letsencrypt
      - proxy
    volumes:
      - /etc/localtime:/etc/localtime:ro
    environment:
      - VIRTUAL_HOST=data.ballz.com
      - LETSENCRYPT_HOST=data.ballz.com
      - LETSENCRYPT_DNS_MODE=dns_duckdns
      - LETSENCRYPT_DNS_MODE_SETTINGS=export DuckDNS_Token=atokeneffort
      - LETSENCRYPT_EMAIL=theemailtheemailthethetheemail
      - LETSENCRYPT_TEST=true
      - DEBUG=1
      - domain=march\\.ofthedragon\\.com
      - username=datadata
      - password=databallz
      - dictionaries=en de es it fr ja
      - NETWORK_ACCESS=internal
    cap_add:
      - MKNOD
    restart: unless-stopped


volumes:
  nextcloud:
  nextcloud_db:
  nextcloud_conf.d:
  nextcloud_vhost.d:
  nextcloud_html:
  nextcloud_certs:
  nextcloud_app_config:
  nextcloud_app_custom_apps:
  nextcloud_app_data:
  nextcloud_app_themes:
  nextcloud_acme:
  nextcloud_dhparam:
  
  

networks:
  network4:
    internal: true
  network2:
  network1:
  network3:
    internal: true
1 Like

Anyone know the answer?

1 Like