Setup nextcloud withoud bought domain

Also assuming there is a domain name that Let’s Encrypt could validate, for a one the only accessible locally one would need to us the DNS-01 challenge of the Challenge Types - Let's Encrypt.
This link maybe of uses as well How can I use Let's Encrypt to make internal certs? - #2 by Bruce5051 - Help - Let's Encrypt Community Support

And see this too Tools implementing deSEC