Hi all
I’ve been trying to get Nextcloud running with Collabora since yesterday.
I’m getting “Could not establish connection to the Collabora Online server.”
I’m currently running the stack in docker-compose.
I have the linuxserver swag container running as reverse proxy with the linux server nextcloud container as domain root and the official collabora/code container running as a subdomain (office.my.domain.com)
Here is my yaml file for docker (with some information removed):
version: '3'
services:
web-proxy:
image: ghcr.io/linuxserver/swag:latest
container_name: web-proxy
cap_add:
- NET_ADMIN
networks:
web_network:
ports:
- 443:443
- 80:80
environment:
- PUID=1500
- PGID=1500
- UMASK=002
- TZ=Europe/Brussels
- URL=my.domain.com
- SUBDOMAINS=office
- VALIDATION=http
- EMAIL=my@mail.com
volumes:
- host-path:/config
restart: unless-stopped
web-collabora-office:
image: collabora/code:latest
container_name: web-collabora-office
networks:
web_network:
ports:
- 9980:9980
environment:
- domain=my\.domain\.com
- server_name=office.my.domain.com
- username=my.name
- password=supersecretpassword
restart: unless-stopped
web-nextcloud-db:
image: mariadb:latest
container_name: web-nextcloud-db
networks:
web_network:
volumes:
- host-path:/var/lib/mysql
- /etc/localtime:/etc/localtime:ro
environment:
- PUID=1500
- PGID=1500
- UMASK=002
- MYSQL_ROOT_PASSWORD=supersecretpassword
- MYSQL_PASSWORD=supersecretpassword
- MYSQL_DATABASE=nextcloud
- MYSQL_USER=nextcloud
restart: unless-stopped
web-nextcloud-cache:
image: redis:latest
container_name: web-nextcloud-cache
networks:
web_network:
environment:
- REDIS_PASSWORD=supersecretpassword
command: redis-server --requirepass supersecretpassword
restart: unless-stopped
web-nextcloud:
image: linuxserver/nextcloud:latest
container_name: web-nextcloud
user: 0:1500
networks:
web_network:
depends_on:
- web-nextcloud-db
- web-nextcloud-cache
- web-proxy
volumes:
- host-path:/config
- host-path:/data
- host-path:/share/Sels/Media
- host-path:/share/Jens/Cloud
- host-path:/share/Jens/Share
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- PUID=1500
- PGID=1500
- UMASK=002
- TZ=Europe/Brussels
restart: unless-stopped
networks:
web_network:
My nginx config for Collabora looks like this:
## Version 2021/05/18
# make sure that your dns has a cname set for collabora and that your collabora container is named collabora
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name office.*;
include /config/nginx/ssl.conf;
client_max_body_size 0;
# enable for ldap auth, fill in ldap details in ldap.conf
#include /config/nginx/ldap.conf;
# enable for Authelia
#include /config/nginx/authelia-server.conf;
location / {
# enable the next two lines for http auth
#auth_basic "Restricted";
#auth_basic_user_file /config/nginx/.htpasswd;
# enable the next two lines for ldap auth
#auth_request /auth;
#error_page 401 =200 /ldaplogin;
# enable for Authelia
#include /config/nginx/authelia-location.conf;
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app web-collabora-office;
set $upstream_port 9980;
set $upstream_proto https;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}
Collabora seems to be working fine because https://office.my.domain.com/hosting/discovery shows the xml.
When I check the nginx error log for Nextcloud however I see this when I try to connect Nextcloud to Collabora:
2021/06/11 08:54:25 [error] 489#489: *1292 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 84.196.41.47, server: _, request: "POST /index.php/apps/richdocuments/ajax/admin.php HTTP/2.0", upstream: "fastcgi://127.0.0.1:9000", host: "my.domain.com"
Nginx and Collabora is still new to me so I have no idea what’s wrong with my setup.
Also went through a lot of similar topics but nothing worked for me.
Everything is also running the latest version.
So any help would be appreciated