Nextcloud 15 mit OnlyOffice on a different port than 443

Hello,
I have successfully installed Nextcloud with nginx, mariadb, php7.2. Now I am trying to integrate onlyoffice. I have used the docker for it. My problem is, I musst run Nextcloud and Onlyoffice on a different port from 443 because this one is used at all.

I can reach my nextcloud on https:/apps.mydomain.de:8443/nextcloud

I have installed onlyoffice with docker.

If i do https://onlyoffice.mydomain.de:8443/welcome I can reach the Server
If i do https://onlyoffice.mydomain.de:8443 (without welcome) the url get changed in https://onlyoffice.klimaflex.de/welcome

This is my nginx for onlyoffice

server {
listen 443 ssl http2;
server_name onlyoffice.mydomain.de;

    # Include SSL configuration
    include /etc/nginx/snippets/ssl.conf;

    #
    # Configuration for OnlyOffice
    #
    location / {
            proxy_pass https://192.168.1.8:4433;
            proxy_redirect off;
            proxy_set_header Host $http_host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header X-Forwarded-Host $server_name;
            proxy_set_header X-Forwarded-Proto $scheme;
    }

}

If I try to set up onlyoffice in nextcloud I everything seems ok. But wenn I try to open a file I get an error
Fehler beim Anschließen (Im Dokumentenservice ist ein Fehler aufgetreten: Error while downloading the document file to be converted.)

Will it be possible to run only office on a different port than 443?
I also have tested colloborate online without look.

Please can some one give me a littel assist at this issue. I have spend hours of searching the internet without any success.

Thanks a lot
Andreas

Hi I have a similar set up with only office document server on port 442.
I edited the /etc/nginx/conf.d file
Under
##HTTPS host
Server {
listen 0.0.0.0:442 ssl;
listen [::]:442 ssl default_server;
server_tokens off;
root /usr/share/nginx/html;
then all the lets encrypt stuff Basically a copy of the default settings just changing the port number, and also left the default settings inplace below it. (Not sure if that matters, I’m a noob)

In the nextcloud settings for onlyoffice connection URL I simply added the :442 on the end.

I beleive the nginx service needs a restart to load the changed configuration.

proxy_pass https://127.0.0.1:4433;

port 4433 must match the port in the docker run command of the onlyoffice container.

https://www.c-rieger.de/nextcloud-and-only-office-nginx/