Error: Collabora Online should use the same protocol as the server installation

I must be doing something wrong in my setup. However I need a second pair of eyes at this point.

All configuration files are at the end of the post.

As the title suggests the error is:
Saved with error: Collabora Online should use the same protocol as the server installation.

This occurs when I am setting the Collabora Online Server setting in:
Admin → Settings → Collabora Online → Collabora Online Server

The value I set that generates the above error is:
https:// code.nextcloud.homenetwork
Interesting Side Note: If I instead set http:// code.nextcloud.homenetwork it saves without any errors but does not actually work.

I access my nextcloud using:
https:// nextcloud.homenetwork

The system has been set up in the following manner:

  • Nextcloud and Collabora are installed via docker, and docker compose. The important factors I try to keep in mind here is that, both nextcloud and collabora are sharing a bridge, and the self gen ssl of collabora is used in communication between collabora container and the host NGINX reverse proxy. Although they share a bridge they do not talk to each other through the bridge.

  • NGINX on the Host machine, used as a reverse proxy for both Nextcloud and Collabora.

As far as I can tell, I am connecting to both collabora and nextcloud with ssl, and yet the collabora configuration step refuses to accept https:// protocol.

Any Ideas?

CONFIGURATION FILES

Docker Compose Configuration

version: '2.2'

services:
  collabora:
    image: collabora/code:latest
    ports:
      - '9980:9980'
    environment:
      domain: "${NEXTCLOUD_DOMAIN}"
      username: "${CODE_ADMIN_USERNAME}"
      password: "${CODE_ADMIN_PASSWORD}"
#      extra_params: "${CODE_EXTRA_ENV}"
#      DONT_GEN_SSL_CERT: 1
    cap_add:
      - MKNOD
    restart: always

  db:
    image: mariadb
    environment:
      MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD_ENV}"
      MYSQL_PASSWORD: "${MYSQL_PASSWORD_ENV}"
      MYSQL_DATABASE: "${MYSQL_DATABASE_ENV}"
      MYSQL_USER: "${MYSQL_USER_ENV}"
    volumes:
      - /mnt/nextCloud/db:/var/lib/mysql
    restart: always
    mem_limit: 3000000000
    memswap_limit: 4000000000

  nextcloud:
    image: nextcloud
    ports:
      - 7000:80
    links:
      - db
    volumes:
      - /mnt/nextCloud/html:/var/www/html
    restart: always
    environment:
      MYSQL_DATABASE: "${MYSQL_DATABASE_ENV}"
      MYSQL_USER: "${MYSQL_USER_ENV}"
      MYSQL_PASSWORD: "${MYSQL_PASSWORD_ENV}"
      MYSQL_HOST: "${MYSQL_HOST_ENV}"
      NEXTCLOUD_ADMIN_USER: "${NEXTCLOUD_ADMIN_USER_ENV}"
      NEXTCLOUD_ADMIN_PASSWORD: "${NEXTCLOUD_ADMIN_PASSWORD_ENV}"

.env File

# Collabora Environment Variables
NEXTCLOUD_DOMAIN=nextcloud.homenetwork
CODE_ADMIN_USERNAME=admin
CODE_ADMIN_PASSWORD=*Deleted for this post*
CODE_EXTRA_ENV=--o:ssl.enable=false

# DataBase Environment Variables
MYSQL_ROOT_PASSWORD_ENV=*Deleted for this post*
MYSQL_PASSWORD_ENV=*Deleted for this post*
MYSQL_DATABASE_ENV=nextcloud
MYSQL_USER_ENV=nextcloud
MYSQL_HOST_ENV=db

# NextCloud Environment Variables
NEXTCLOUD_ADMIN_USER_ENV=adminator
NEXTCLOUD_ADMIN_PASSWORD_ENV=*Deleted for this post*

NGINX Configuration

# Configuration for Collabora
    server {
        listen       443 ssl;
        server_name  code.nextcloud.homenetwork;
        access_log /var/log/nginx/code_access.log;
        error_log /var/log/nginx/code_error.log;

        ssl_certificate /home/volt/certs/code.nextcloud.homenetwork.crt;
        ssl_certificate_key /home/volt/certs/code.nextcloud.homenetwork.key;

        # Default
        location / {
            proxy_pass https://localhost:9980;
        }

        # static files
        location ^~ /loleaflet {
            proxy_pass https://localhost:9980;
            proxy_set_header Host $http_host;
        }

        # WOPI discovery URL
        location ^~ /hosting/discovery {
            proxy_pass https://localhost:9980;
            proxy_set_header Host $http_host;
        }

       # main websocket
       location ~ ^/lool/(.*)/ws$ {
           proxy_pass https://localhost:9980;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_set_header Host $http_host;
           proxy_read_timeout 36000s;
       }

       # download, presentation and image upload
       location ~ ^/lool {
           proxy_pass https://localhost:9980;
           proxy_set_header Host $http_host;
       }

       # Admin Console websocket
       location ^~ /lool/adminws {
           proxy_pass https://localhost:9980;
           proxy_set_header Upgrade $http_upgrade;
           proxy_set_header Connection "Upgrade";
           proxy_set_header Host $http_host;
           proxy_read_timeout 36000s;
       }
    }


# Confiugration for NextCloud
    server {
        server_name nextcloud.homenetwork;
        listen 80 ;
        access_log /var/log/nginx/nc_access.log;
        error_log /var/log/nginx/nc_access.log;
        return 301 https://$host$request_uri;
    }

    server {
            server_name nextcloud.homenetwork;
            listen 443 ssl http2 ;
            access_log /var/log/nginx/nc_access.log;
            error_log /var/log/nginx/nc_access.log;

            ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;
            ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305: and more >>>
            ssl_prefer_server_ciphers on;
            ssl_session_timeout 5m;
            ssl_session_cache shared:SSL:50m;
            ssl_session_tickets off;
            ssl_certificate /home/volt/certs/nextcloud.homenetwork.crt;
            ssl_certificate_key /home/volt/certs/nextcloud.homenetwork.key;
            add_header Strict-Transport-Security "max-age=31536000" always;

            location / {
                    proxy_pass http://localhost:7000;
            }
    }
2 Likes

My apologies I just noticed this is the wrong section for this post, it should be in installation, however I dont have permissions to delete the post.

I have attempted the following with no success:
Changed NEXTCLOUD_DOMAIN=https://nextcloud.homenetwork

Here is a diagram that should help visualise the setup.
systemArchitecture

Also I would like to ask for a moderator to relocate this post to installation section.

1 Like

I think it´s a bug, because in my running installation it´s the same and it wasn´t before like this. But even with this error message it´s still working, so just wait for a fix

me too,it is bad

same here… any updates when they plan to address it??

just did pull and issue still present… thx

in logs I am getting:

Error	lib	ResourceLocator can not find a web root (root: /data/userapps/richdocuments, file: css/richdocuments/5946-8205-admin.css?v=db81cddf52fdb3c8ca1e4c859e214124, webRoot: , throw: true)

nextcould: cloud.example.com
collabora: collabora.cloud.example.com

Both have same certificate.

would be nice to get some updates here…

1 Like

Any news?:thinking:

Maybe,this help

Nextcloud & Collabora docker installation. Error: Collabora Online should use the same protocol as the server installation

This error means that you are accessing Nextcloud via HTTP and Collabora via HTTPS, or vice versa.

so u mean should be https, bcs i was trying with http even with not found ip show the same message!

  • Collabora uses HTTPS only unless you explicitly tell it to use HTTP.
  • Whichever protocol Collabora uses, you must use in the Nextcloud Collabora configuration.
  • You also must use the same protocol as Nextcloud. If you use HTTPS for Nextcloud, also use HTTPS for Collabora.
  • Unless you set it to ignore certificate validity, the certificate must be valid.
2 Likes

oh thank you for clear answer

maybe it is usefull for your problem.

description of my installation:

  • debian bullseye
  • Apache
  • php 8.0
  • nextcloud 24
    behind FireWall
  • OpnSense
    ReverseProxy based on apache with Let’s entcrypt (on Raspberry)

I had the same error “collabora should use the same protocol as the server” and solved this with the follow entry in the ReverseProxy config.

sorry, i can’t show you my config, because i am a new user and i am can post only four links ;(

i found this in (document-server-proxy/proxy-https-to-http.conf at master · ONLYOFFICE/document-server-proxy · GitHub) line 40 - 47

Best regards
Winux