Nextcloud does not open Onlyoffice from external network

Guys, I access my NC externally normal, browse the folders and everything.
However, when I open an Onlyoffice file it doesn’t load, locally it opens normal.
Help me please.

onlyoffice external error

installed by snap
ubuntu server 20.04 LTS

Note: I used the Google translator.

Hi, I hope this helps you. This is from my nginx reverse proxy. My onlyoffice document server is in a docker on unRaid, my Nextcloud sits in a docker on the same ip, bridged.

They connect through my router running a reverse proxy. This is not the official nginx file from Onlyoffice which I though was a bit lengthy. Mine works 100% from what I can see ( only installed yesterday). I didn’t bother with Community server.

Blockquoteserver {
listen 80;
server_name documents.********.com;

    return 301 https://$server_name$request_uri;


server {
listen 443 ssl http2;
server_name documents.*******.com;

    access_log /opt/var/log/nginx/documents.access.log;
    error_log /opt/var/log/nginx/documents.error.log;

    client_max_body_size 10G;
    underscores_in_headers on;

    ssl_certificate /tmp/home/root/******.com/fullchain.cer;
    ssl_certificate_key /tmp/home/root/******.com/aussiepor                                                                                                             >

    ssl_stapling on;
    ssl_stapling_verify on;

 #************Access Control  ********************
  include /opt/etc/nginx/nginx_whitelist_internal;

    location / {
            proxy_headers_hash_max_size 512;
            proxy_headers_hash_bucket_size 64;
            proxy_set_header Host $host;
            proxy_set_header X-Forwarded-Proto $scheme;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

            add_header Front-End-Https on;
            # whatever the IP of your cloud server is


Thanks for the answer.
I do not use Nginx, I installed it by snap.
I use the apache that was installed automatically by the snap.
on my local network onlyoffice works normal, but on the external network it does not open.



I have no experience with snaps. I tend to use dockers or install manually.
How are you connecting from external? I assume you may have a VPN? I haven’t used Apache since converting to nginx quite a while ago. If its a VPN there may be a network rule that is limiting the VPN network from being recognised.