Organs consist of multiple cell types that ensure proper architecture and function. How different cell types coexist and interact to maintain their homeostasis in vivo remains elusive. The skin epidermis comprises mostly epithelial cells, but also harbours Langerhans cells (LCs) and dendritic epidermal T cells (DETCs). Whether and how distributions of LCs and DETCs are regulated during homeostasis is unclear. Here, by tracking individual cells in the skin of live adult mice over time, we show that LCs and DETCs actively maintain a non-random spatial distribution despite continuous turnover of neighbouring basal epithelial cells. Moreover, the density of epithelial cells regulates the composition of LCs and DETCs in the epidermis. Finally, LCs require the GTPase Rac1 to maintain their positional stability, density and tiling pattern reminiscent of neuronal self-avoidance. We propose that these cellular mechanisms provide the epidermis with an optimal response to environmental insults.