I use Wireguard VPN with DuckDNS. No need to buy a domain, I just made a name for local use like nextcloud.rudee.com. Even though domains are not expensive (can be 10-20$ a year, but there are also free otions like rudeenextcloud.duckdns.org). You might need reversy proxy like Nginx Proxy Manager unless you want to type IP:PORT