Nextcloud Office fails to load

I’m not a very smart dude and know just a little of Linux, docker and everything else. Please bare with me. And I really appreciate all and any help you can provide here.

I went over several post on this forum, and I lost count on how many times I tried different approaches to this from all over internet, but I don’t seem to find why I cannot have Nextcloud Office (or Collabora) to work on my setup. Hope someone here could kindly shed some light on my issue.

Here we go:

My setup:

  • Raspberry Pi 5 8GB + 128GB microSD
  • Raspberry Pi OS Bookwork Lite (no kernel) 64bit
  • Docker 26.1.4
  • Docker Compose v2.27.1
  • Proxy settings in my ATT Router
Service Ports Device
HTTPS TCP/UDP: 443 myPiname
HTTP TCP/UDP: 80 myPiname
NGINX PM Public TCP/UDP: 18000-18999 myPiname
NGINX PM Dashboard TCP/UDP: 81 myPiname
NGINX PM TCP/UDP: 8000-8999 myPiname
NextCloud Talk TCP/UDP: 3478 myPiname

Containers (compose files below):

  • NGinx Proxy Manager (latest)
  • Nextcloud AIO 29
  • Portainer (latest)
Nginx Proxy Manager compose file
version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

networks:
  nginx-net:
  nextcloud-net:

Portainer compose file (not sure if this matters)
version: '3.3'
services:
  portainer-ce:
    ports:
      - '8000:8000'
      - '9000:9000'
    container_name: portainer
    restart: always
    volumes:
      - '/var/run/docker.sock:/var/run/docker.sock'
      - './portainer_data:/data'
    image: portainer/portainer-ce

networks:
  nginx-net:
    external: true 
Nextcloud compose file
version: "3.8"

volumes:
 nextcloud_aio_mastercontainer:
   name: nextcloud_aio_mastercontainer
services:
 nextcloud:
   image: nextcloud/all-in-one:latest
   restart: unless-stopped
   container_name: nextcloud-aio-mastercontainer
   volumes:
     - nextcloud_aio_mastercontainer:/mnt/docker-aio-config
     - /var/run/docker.sock:/var/run/docker.sock:ro
   ports:
     - 8080:8080 # change the port on the left side if it's already in use on your host system.
   environment:
     - APACHE_PORT=11000  # change this port number if 11000 is already in use on your host system.
    #  - APACHE_IP_BINDING=0.0.0.0 # Without this I get WOPI host issue
    #  - APACHE_DISABLE_REWRITE_IP=1
    #  - NEXTCLOUD_TRUSTED_DOMAINS=< cloud.emburaman.com > < 192.168.1.235 > # Your domain name + proxy host IP
    #  - TRUSTED_PROXIES=< 192.168.1.235 > # proxy host IP

networks:
  nextcloud-net:
    external: true

Note that I commented the variables according to what the container logs showed me at first.

  • My Nextcloud WOPI allow list looks like this:
    192.168.1.235,172.24.0.0/16,192.168.1.0/16,104.21.73.90,127.0.0.1/8,192.168.0.0/16,172.16.0.0/12,10.0.0.0/8,fd00::/8,::1
    • 192.168.1.235 is my Raspberry Pi IP address within my home network
    • 172.24.0.0/16 range is for the Nextcloud containers

Containers as listed in Portainer

Current results

  • Nextcloud’s basic functions seems to be working fine: files, storage, notes, calendar, mail, etc.
  • Talk shows as unhealthy in portainer, but I did not get that far yet to investigate why (maybe similar issue with office?)
  • Nextcloud Office does not load documents and fails with message

Failed to establish socket connection or socket connection closed unexpectedly. The reverse proxy might be misconfigured, please contact the administrator. For more info on proxy configuration please checkout Proxy settings — SDK https://sdk.collaboraonline.com/ documentation

  • Nextcloud container logs shows no error
  • Collabora container logs shows the below:
wsd-00007-00048 2024-06-11 08:26:27.410758 -0400 [ websrv_poll ] ERR  #54: Access denied to [https://cloud.{mydomain}.com/index.php/apps/richdocuments/wopi/files/899_oc2zkvk7ikct?access_token=B4ByD1XYA1tywXOMSo7f6DdWJ0Vk0g26&access_token_ttl=0]| wsd/wopi/CheckFileInfo.cpp:105
wsd-00007-00048 2024-06-11 08:27:17.035318 -0400 [ websrv_poll ] WRN  convert-to: Requesting address is denied: {MY-PUBLIC-IP-ADRESS}| wsd/ClientRequestDispatcher.cpp:481

So up to this point, I don’t know how to solve the issue of Nextcloud Office to properly load.

Thanks for any guidance.

Hi, can you follow https://github.com/nextcloud/all-in-one/discussions/1358?

I will, thanks!

So, slap my hand here…

My issue was that in the WOPI setting, I carelessly set the my local IP with the wrong range (172.24.0.0/16 which is the range between my Docker containers) instead of whatever IP range my regular network devices were being assigned to by my AT&T router (172.71.0.0/0). Fixing WOIP to the latter made it work.

Now, heading over to make Talk work.
Cheers!

1 Like