You would be given a safety risk warning page by your browser if you did the self signed certificate that you’d need to tell it to connect anyway, so that likely isn’t the issue. Looking at ports, how are you trying to connect to the server? If you did not assign a certificate at all, you would want to use port 80, port 443 if you did install a certificate.
For instance, my Nextcloud is on ip 192.168.50.30 With that in mind I would be using:
No certificate: http://192.168.50.30:80 Certificate: https://192.168.50.30:443
Does this look like what you are typing in?
As two additional questions, what is the output of “docker container ls” typed into the terminal? And what operating system did you install on the pi, was it raspbian?
We can get the port list another way. From the terminal on the raspberry pi run the command "nmap localhost". Let us know what that shows, but I would expect to see either 80, 443, or both.
As a side note, if you did not give the nextcloud container a certificate when you made it, you cannot use https:// on the browser, as it has no way to talk using that security mechanism. It is only capable in that case of using http:// and port 80. You will need to disable forced https to access the site (this is fine on the local network if every device is trusted, and only encrypted vpn service in like zerotier is used imo). This might be your problem here, especially if you are seeing both ports listed as open on the pi.