The rapid urbanization and the constant expansion of urban areas during the last decades have locally led to increasing water shortage. Rainwater harvesting (RWH) systems have the potential to be an important contributor to urban water self-sufficiency. The goal of this study was to select an environmentally optimal RWH strategy in newly constructed residential buildings linked to rainwater demand for laundry under Mediterranean climatic conditions, without accounting for water from the mains. Different strategies were environmentally assessed for the design and use of RWH infrastructures in residential apartment blocks in Mediterranean climates. The harvested rainwater was used for laundry in all strategies. These strategies accounted for (i) tank location (i.e., tank distributed over the roof and underground tank), (ii) building height considering the number of stories (i.e., 6, 9, 12, and 15), and (iii) distribution strategy (i.e., shared laundry, supply to the nearest apartments, and distribution throughout the building). The RWH systems consisted of the catchment, storage, and distribution stages, and the structural and hydraulic calculations were based on Mediterranean conditions. The quantification of the environmental performance of each strategy (e.g., CO(2)eq. emissions) was performed in accordance with the life cycle assessment methodology. According to the environmental assessment, the tank location and distribution strategy chosen were the most important variables in the optimization of RWH systems. Roof tank strategies present fewer impacts than their underground tank equivalents because they enhance energy and material savings, and their reinforcement requirements can be accounted for within the safety factors of the building structure without the tank. Among roof tanks and depending on the height, a distribution strategy that concentrates demand in a laundry room was the preferable option, resulting in reductions from 25 to 54 % in most of the selected impact categories compared to distribution throughout the building. These results may set new urban planning standards for the design and construction of buildings from the perspective of sustainable water management. In this sense, a behavioral change regarding demand should be promoted in compact, dense urban settlements.