Nextcloud snap + Oracle VM ubuntu

I was installing nextcloud on ubuntu, reading tutorial like this
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.