Loolswd (no docker) integrate with nextcloud on separate box

I have Nextcloud behind an apache2 reverse proxy which faces the Internet (“Proxy”). Nextcloud is on a separate box on an internal LAN (Nextcloud). Proxy and Nextcloud work fine and are both on Ubuntu server 20.40 using Apache2.
I want to integrate loolwsd with Nextcloud. I have tried a few different combinations but none of them work. My problem is that I don’t understand the big picture. In particular, I don’t know if it is possible to setup loolswd on a server that is separate from my Nextcloud box and still integrate Nextcloud. For example, can I setup loolswd on Proxy using the localhost recommended proxypass config and integrate merely by supplying the Proxy subdomain name in my own WOPI server settings on Nextcloud? In other words, can my loolswd server i.e. Proxy be completely separate from the running instance of Nextcloud?
Also, I don’t understand the function of port 9980. Proxy would listen on 443 (using letsencrypt. Does that mean that 9980 is only relevant as far as the localhost config is concerned?
Any suggestions? The documentation is detailed and helpful but I can’t see exactly how it relates to my preferred setup as it seems to assume Nextcloud and loolswd are on the same box and directly face the Internet.