[Docker] Collabora CODE (ARM64) Server: Failed to load Nextcloud Office

I know there are a ton of topics on this, but every instance seems to be using a reverse proxy set up. I am currently not running a reverse proxy as my Nextcloud instance is entirely local and for testing at the moment.

When I try to open the example document “Welcome to Nextcloud Hub.docx” I am treated to “Failed to load Nextcloud Office - please try again later”

Checking the server logs, I get the following:

[no app in context] Warning: Host nextcloud-collabora was not connected to because it violates local access rules

I have disabled SSL & SSL termination in Collabora’s set up, and when I navigate to the IP address & port I am treated with an “ok”. I can also log in to the Collabora admin panel.

I have also added 'allow_local_remote_servers' => true, to my config.php file.

Here is the compose file I am running:

version: '1.3'                                                         
                                                                       
services:                                                              
  db:                                                                  
    image: mariadb                                                     
    container_name: nextcloud-mariadb                                  
    restart: unless-stopped                                            
    networks:                                                          
      - proxy                                                          
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:                                                           
      - /nextcloudmaridb:/var/lib/mysql                                          
    environment:                                                       
      - MARIADB_AUTO_UPGRADE=1                                         
      - MARIADB_DISABLE_UPGRADE_BACKUP=1                               
      - MYSQL_ROOT_PASSWORD=<password>
    env_file:                                                          
      - stack.env                                                      
                                                                       
  redis:
    image: redis:alpine
    container_name: nextcloud-redis
    restart: unless-stopped
    networks:
      - proxy
                                                                       
  app:                                                                 
    image: nextcloud:apache                                            
    container_name: nextcloud-app                                      
    restart: unless-stopped                                            
    networks:                                                          
      - proxy                                                          
    ports:                                                             
      - 8088:80                                                        
    depends_on:                                                        
      - db                                                             
      - redis                                                          
    volumes:                                                           
      - /nextcloud:/var/www/html                     
      - /apps:/var/www/html/custom_apps              
      - /config:/var/www/html/config                 
      - /data:/var/www/html/data                     
      - /theme:/var/www/html/themes                  
    environment:                                                       
      - MYSQL_HOST=db                                                  
      - REDIS_HOST=redis
      - NEXTCLOUD_TRUSTED_DOMAINS=<domains>
    env_file:                                                          
      - stack.env                                                      
                                                                       
  cron:                                                                
    image: nextcloud:apache
    container_name: nextcloud-cron
    restart: unless-stopped                                                    
    networks:                                                          
      - proxy                                                          
    volumes:                                                           
      - /mnt/ssd/nextcloud/nextcloud:/var/www/html                     
    entrypoint: /cron.sh                                               
    depends_on:                                                        
      - db                                                             
      - redis                                                          
                                                                       
  collabora:                                                           
    image: collabora/code                                              
    container_name: nextcloud-collabora                                
    restart: unless-stopped                                            
    networks:                                                          
      - proxy                                                          
    ports:                                                             
      - 9980:9980
    cap_add:                                                           
      - MKNOD                                                          
    environment:
      - "domain=nextcloud-app:80"
      - "extra_params=--o:ssl.enable=false --o:ssl.termination=false"
      - "username=<collaboraadmin>"
      - "password=<collaborapass>"
                                                                       
networks:                                                              
  proxy:                                                               
    external: true

I’d be grateful for any assistance.

welcome to the forum @uninvitedguest :handshake:

Please read Nextcloud Collabora integration to understand the mechanics of the integration and follow troubleshooting steps.

The reason why almost everybody is using reverse proxy is because this is the only (good) way to host multiple applications on a single IP. Using custom ports like you do might look like a solution but doesn’t work in real life e.g. when company firewall blocks non-standard ports… the pressure from browser vendors on unencrypted applications is high so often this can be an issue as well (e.g. Password app only runs with TLS, WOPI/Collabora AFAIK too)

on the other side in a docker-compose setup it very simple to add reverse proxy see this post - and you immediately get lot of advantages - simple letsencrypt TLS certificate for all your applications, no need to bother with custom ports, in some cases even better security…