Nextcloud 15 mit OnlyOffice on a different port than 443

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:/

I have installed onlyoffice with docker.

If i do I can reach the Server
If i do (without welcome) the url get changed in

This is my nginx for onlyoffice

server {
listen 443 ssl http2;

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

    # Configuration for OnlyOffice
    location / {
            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

Hi I have a similar set up with only office document server on port 442.
I edited the /etc/nginx/conf.d file
##HTTPS host
Server {
listen 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.


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