Using CODE Remotely (ARM64)

I have my Nextcloud setup working on two separate addresses:
lanname.local/nextcloud, port 80
publicname.ddns.net/nextcloud, port 443

I have the following app installed:

It works just fine when doing lanname.local, but it always says “Document loading failed Failed to load Nextcloud Office - please try again later” when using publicname.ddns.net.
I have forwarded ports 9980 to 9990 on my router; ufw is currently not running.
I wouldn’t mind tinkering with the settings but the documentation only works on a self-hosted installs. I had even worse luck trying to do a self-hosted install.

If it makes a difference, I am not using docker or a VM to run my Nextcloud instance.