Can't get OnlyOffice to work inside nextcloud reddit / selfhosted ---------------------------------------------------------------------- No_Lawfulness420 · 2023-10-10 11:44 Hello fellas, my selfhosted journey started years ago and at some point i switched to docker and took use of the linuxserver images when possilbe. Recently I switched from exposing my ports to Cloudflare tunnels. It works quite well so far, but OnlyOffice stopped working in Nextcloud. Here is my docker-compose.yml: services: swag: image: linuxserver/swag:latest container_name: swag cap_add: - NET_ADMIN environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} - URL=${URL} - SUBDOMAINS=wildcard - VALIDATION=dns - DNSPLUGIN=cloudflare - DOCKER_MODS=linuxserver/mods:universal- docker|linuxserver/mods:universal-cloudflared|linuxserver/mods:swag- auto-proxy|linuxserv er/mods:swag-auto-reload|linuxserver/mods:swag- dashboard|linuxserver/mods:swag-cloudflare-real-ip - DOCKER_HOST=dockerproxy - CF_ZONE_ID=${CF_ZONE_ID} - CF_ACCOUNT_ID=${CF_ACCOUNT_ID} - CF_API_TOKEN=${CF_API_TOKEN} - CF_TUNNEL_NAME=${URL} - CF_TUNNEL_PASSWORD=${CF_TUNNEL_PASSWORD} - FILE__CF_TUNNEL_CONFIG=/config/tunnelconfig.yml extra_hosts: - "${URL}:127.0.0.1" volumes: - $HOME/swag:/config restart: unless-stopped dockerproxy: image: tecnativa/docker-socket-proxy:latest container_name: dockerproxy environment: - CONTAINERS=1 - POST=0 volumes: - /var/run/docker.sock:/var/run/docker.sock:ro restart: unless-stopped nextcloud: image: linuxserver/nextcloud:latest container_name: nextcloud environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} volumes: - $HOME/nextcloud:/config - /mnt/raid1/nextcloud:/data labels: - swag=enable depends_on: - mariadb restart: unless-stopped mariadb: image: linuxserver/mariadb:latest container_name: mariadb environment: - PUID=${PUID} - PGID=${PGID} - TZ=${TZ} volumes: - $HOME/mariadb:/config restart: unless-stopped documentserver: image: onlyoffice/documentserver:latest container_name: documentserver volumes: - $HOME/onlyoffice/logs:/var/log/onlyoffice environment: - JWT_ENABLED=true - JWT_SECRET=${JWT_SECRET} - WOPI_ENABLED=true labels: - swag=enable restart: unless-stopped * OnlyOffice is reachable under [documentserver.mydomain.com](https://documentserver.mydomain.com) * Nextcloud is reachable under [nextcloud.mydomain.com](https://nextcloud.mydomain.com) * I can edit the test files directly in OnlyOffice. * I can use the OnlyOffice Demo-server inside Nextcloud. But as soon as I configure OnlyOffice-Connctor to use my OnlyOffice- Server there is an error. The screen shows: documentserver.mydomain refused to connect. On mobile there is the following error: ...could not be loaded because: net::ERR_BOCKED_BY_RESPONSE Would be awsome if someone can help. I think this is a quite special setup with cloudflare tunnels tho. I can happiely provide more logs, if someone can tell me where to find usable one. ---------------------------------------------------------------------- thekrautboy · 2023-10-10 11:54 Why not ask in /r/Nextcloud and maybe /r/Cloudflare? ---------------------------------------------------------------------- No_Lawfulness420 · 2023-10-10 13:04 Thx for the advice. Crossposted to r/CloudFlare now. ---------------------------------------------------------------------- g-nice4liief · 2023-10-10 15:04 Try pointing to the docker container name ---------------------------------------------------------------------- No_Lawfulness420 · 2023-10-10 15:06 It fails because Nextcloud insists on SSL and I can't find any way to turn this off. ---------------------------------------------------------------------- YippieYieYay · 2023-10-11 15:51 I don't remember exactly the details, but I had the same issue. I don't use cloudfare, and I use traefik to handle the ssl part, and I had to do 2 things: add an option to the onlyoffice container to re-add https to the requests to onlyoffice: `- "traefik.http.middlewares.oo- header.headers.customRequestHeaders.X-Forwarded-Proto=https"` and ensure that requests with the path "/apps/onlyoffice" were redirected to the nextcloud container. If I remember right, the issue was that teh return from onlyoffice to teh nextcloud instance wasn't routed properly, or maybe was not using https but plain http (and so extcloud never got it) as I said I don't remember everything, it was a long time ago, sorry I can't help more. ---------------------------------------------------------------------- RichEO · 2023-10-22 06:35 Try setting the "ALLOW_PRIVATE_IP_ADDRESS" flag