Adult stem cells reside in specialized microenvironments, or niches, that have an important role in regulating stem cell behaviour. Therefore, tight control of niche number, size and function is necessary to ensure the proper balance between stem cells and progenitor cells available for tissue homeostasis and wound repair. The stem cell niche in the Drosophila male gonad is located at the tip of the testis where germline and somatic stem cells surround the apical hub, a cluster of approximately 10-15 somatic cells that is required for stem cell self-renewal and maintenance. Here we show that somatic stem cells in the Drosophila testis contribute to both the apical hub and the somatic cyst cell lineage. The Drosophila orthologue of epithelial cadherin (DE-cadherin) is required for somatic stem cell maintenance and, consequently, the apical hub. Furthermore, our data indicate that the transcriptional repressor escargot regulates the ability of somatic cells to assume and/or maintain hub cell identity. These data highlight the dynamic relationship between stem cells and the niche and provide insight into genetic programmes that regulate niche size and function to support normal tissue homeostasis and organ regeneration throughout life.