Onlyoffice: Frontend tries to access despite different Nextcloud configuration

Hi everyone,

so I was following this tutorial to setup onlyoffice using docker: (German)

TL;DR is that it was configured to run on port 4433. Since I didn’t want to use a self-signed certificate, I added an nginx proxy for it:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;
    ssl_prefer_server_ciphers on;
    add_header Strict-Transport-Security max-age=31536000;
    proxy_set_header X-Forwarded-For $remote_addr;
    server_tokens off;

    location / {
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_ssl_session_reuse off;
        proxy_ssl_verify off;

        access_log      /var/log/nginx/onlyoffice.access.log;
        error_log       /var/log/nginx/onlyoffice.error.log;

This seems to be working fine so far. I can access it at, the certificate is valid, and it’s configured properly in Nextcloud (set to If I try to open a document, it loads up the Onlyoffice interface, but then it aborts with an "Unknown error". The reason being is, it’s trying to access the following URL through the JS frontend:

That obviously won’t work, since I’m not running Nextcloud and Onlyoffice on my local machine. This seems to be the configured port in the docker server, but I’m expecting the proxy URL here, so instead.

However, I can’t find any option to configure that URL in docker. Can you tell me where I can configure that or what I did wrong?