You can read on here about requirements and installation. In my opinion it would be a cleaner installation on a member server. This makes problem solution much less complicated if issues arise.
https://learn.microsoft.com/en-us/azure/active-directory/hybrid/how-to-connect-install-prerequisites
--please don't forget to upvote and Accept as answer if the reply is helpful--