NextCloud integration within HA

I tried adding NextCloud into the same Pi that I have HA in; however the letsencrypt didn’t function normally because my router won’t allow two of the same 443 port forwarding as it says there is a conflict.
So if we can have NextCloud within HA, it would be encrypted and won’t need two different server setups.

Or if not that then, if possible a tool that will help me get NextCloud in the same Pi separately

I run Nextcloud and Home Assistant on the same Pi 4, but they’re both Docker containers. It is encrypted communication on both, using an Nginx reverse proxy, though the certificates are self-issued. If that sounds like something you’d like to do, I have a tutorial on setting it all up, even the certs.