Accessing Nextcloud (snap) outside local network


I’ve just installed nextcloud on a fresh ubuntu server (20.04 LTS) installation with snaps and everything is working properly in the local network. I can access the web interface through the local IP.

The problem is that I can’t access through the public IP, however I forwarded ports 80 and 443 and added the public IP tho the trusted domains.
(It just times out)

I checked with open port check tool, and it says that the ports are closed. My ISP is not blocking the ports, previously I hosted other websites that worked.

Do you have any idea what is the problem?

have you added or listed host on DNS - Record A

on your local network you ISP provides an dynamic IP Adresse just register dyndns and set an A Record.

Have you opened the ports in both your router and the ubuntu machine?
And it’s probably best to get a dynamic dns service, so you don’t have to remember the public ips. For example, duckdns is free: