Nextcloud snap + Oracle VM ubuntu

I was installing nextcloud on ubuntu, reading tutorial like this
https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-nextcloud-on-ubuntu-20-04-pt
But when try to acess the site with public IP dont worked.

after this, I tryed .

sudo snap set nextcloud ports.http=80 ports.https=443

But not worked.
I only find solutions from oracle with their linux distribution. I’m lost.

openssl connect when I try
openssl s_client -connect localhost:myport

I remembered if the connection was going through encryption.
So I made a tunnel where I called my host:port with ssh and redirected to another local port, and it worked. I don’t know if this is nextcloud’s default, because I couldn’t find it anywhere.