Wild bees (Hymenoptera: Apoidea) play an important role as pollinators of many crops and managed populations of Osmia spp. (Megachilidae), through the installation of trap-nests, proved to be efficient in several fruit orchards. In order to optimize the trap-nest protocols, it is necessary to understand which environmental factors play a major role in the reproductive success of these bees. Here, we studied how climate, land use and vegetation affect nest occupation rate (OR, i.e. total number of colonized tunnels/total number of tunnels in the trap-nest), brood productivity (BP, i.e. total number of brood cells built in a completed nest tunnel) and parasitism rate (PR, i.e. total number of parasitized brood cells/BP) in Osmia bees nearby almond orchards in South-East Spain, a largely understudied Mediterranean area. We found that the summer solar radiation positively influenced all three parameters, while spring solar radiation positively affected OR and BP, and negatively PR. Higher abundance of pastures and forests compared with crops increased OR, though not BP, and reduced PR. Vegetation evenness and diversity of dominant plant species also positively affected OR and BP, while they were unimportant for PR. OR was not affected by climate, but BP increased with maximum temperature in the warmest month and decreased with temperature annual range. PR also increased with high temperature, as well as with precipitation. Arid conditions limited OR and BP and boosted parasitism. Overall, it seems that Osmia bees nearby almond field in this area would benefit from trap-nest installation in well solar-radiated, hot and humid sites with a diverse vegetation. Since we have also found a negative association between PR and BP in nests with at least one parasitized cell, environmental conditions which improve productivity will also likely reduce parasitism in these bees.Implications for insect conservation Optimization of trap-nesting protocols for maintaining abundant Osmia populations is crucial to an effective use of these bees as managed pollinators. In our study we suggest that trap-nests locations should be chosen also taking into account a number of local climatic and habitat factors, given their importance in affecting key traits of reproductive success in these solitary bees.