You don’t mention what you want Nextcloud for specifically, but it sounds like you really just want a NAS for the most part. Off the shelf brands like Synology and Qnap are great, or you can get/build a box to host FreeNAS or TrueNAS.
This streamlines what you intend to do and skips some extra steps.