I am running Nextcloud 24.0.3 and the Collabora/CODE separate containers in Docker & connecting them using an internal docker network. Using the Nextcloud Office app, I can successfully connect them together (I get the green check in the admin settings page), However whenever I attempt to open a .odt file it says: “Document loading failed. Failed to load Nextcloud Office - please try again later”
Here is my docker-compose stack:
version: "3"
services:
nextcloudapp:
image: nextcloud:apache
restart: unless-stopped
container_name: nextcloudapp
hostname: nextcloudapp
volumes:
- data:/var/www/html
environment:
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=********
- MYSQL_HOST=nextclouddb
- REDISHOST=nextcloudredis
- APACHE_DISABLE_REWRITE_IP=1
depends_on:
- nextclouddb
- nextcloudoffice
- nextcloudredis
networks:
- frontend
- backend
nextcloudoffice:
image: collabora/code
container_name: nextcloudoffice
hostname: nextcloudoffice
restart: unless-stopped
cap_add:
- MKNOD
environment:
domain: "files.example.com"
networks:
- backend
nextclouddb:
image: mariadb
container_name: nextclouddb
hostname: nextclouddb
restart: unless-stopped
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=********
- MYSQL_USER=nextcloud
- MYSQL_PASSWORD=**********
- MYSQL_DATABASE=nextcloud
volumes:
- db:/var/lib/mysql
networks:
- backend
nextcloudredis:
image: redis:alpine
container_name: nextcloudredis
hostname: nextcloudredis
restart: unless-stopped
networks:
- backend
nextcloudcron:
image: nextcloud:apache
container_name: nextcloudcron
restart: unless-stopped
volumes:
- data:/var/www/html
entrypoint: /cron.sh
depends_on:
- nextclouddb
- nextcloudredis
networks:
- backend
volumes:
data:
db:
networks:
frontend:
external:
name: proxy-apps
backend:
(The proxy-apps external network contains my nginx-proxy-manager container that I am using as a reverse proxy & generating SSL certificates for nextcloudapp)
Currently I am just trying to connect the two containers internally (which seems more secure), however some tutorials (e.g: https://www.youtube.com/watch?v=BAc15RHfwEA) have suggested to also put the Collabora/CODE container available externally on it’s own domain with an SSL certificate. Is this necessary/the solution to my problem? (As I said this seems less secure so would rather not do it, as only my internal NC instance needs access to this container)
TL;DR How to make Collabora/CODE container work for NC 24, even though it successfully connects.
This is the successful connection to the Collabora/CODE container