Onlyoffice: Frontend tries to access 127.0.0.1 despite different Nextcloud configuration

Hi everyone,

so I was following this tutorial to setup onlyoffice using docker: https://decatec.de/home-server/nextcloud-online-office-mit-onlyoffice/ (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;
    server_name my-domain.com;
    [ssl-foo]
    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_pass    https://127.0.0.1:4433;
        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 my-domain.com, the certificate is valid, and it’s configured properly in Nextcloud (set to https://my-domain.com). 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:

https://127.0.0.1:4433/cache/files/3426957769/Editor.bin/Editor.bin?md5=xxxxx&expires=1567759383&disposition=attachment&ooname=output.bin

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 https://my-domain.com/cache/... 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?

Thanks

Geexor