If you have TrueNAS CORE or Scale, it could be on your local network behind a router and maybe firewall. The whole process of using a Dynamic DNS and port forwarding if not complicated is not easy either. We will in this article setup Let's Encrypt certificate with DNS challenge on TrueNAS VM or jail.
While the plugin version is easy to setup, it is also the most easy one to break with updates. In this article I am going to show how to create a pool/jail and install Nextcloud on TrueNAS CORE from ground up.