Trusted Domains in Snap install of NextCloud

Hi,
I just snap installed Nextcloud on my raspberrypi 3b+. I then bought a Domain Name from Dynadot. I am now having problems with registering the Domain Name to my raspberrypi-NextCloud Server. Im aware it is a little different when done from a snap install of NextCloud.
Please let me know if there any solutions out there, the help is much appricated.
Thanks,
John J.

sudo nextcloud.occ config:system:set trusted_domains 0 --value="{{ nextcloud_server_fqdn }}"

Make sure you forward the proper ports (80 at least 443 as well if using HTTPS) from your router to the rpi running Nextcloud.

How can I configure it to access from any IP?

Trusted domains are domains that are valid for the Nextcloud install itself, it’s not some sort of firewall like you make it sound. Am I misunderstanding? Can you please rephrase your question?