The role of species interactions in controlling the interplay between the stability of ecosystems and their biodiversity is still not well understood. The ability of ecological communities to recover after small perturbations of the species abundances (local asymptotic stability) has been well studied, whereas the likelihood of a community to persist when the conditions change (structural stability) has received much less attention. Our goal is to understand the effects of diversity, interaction strengths and ecological network structure on the volume of parameter space leading to feasible equilibria. We develop a geometrical framework to study the range of conditions necessary for feasible coexistence. We show that feasibility is determined by few quantities describing the interactions, yielding a nontrivial complexity–feasibility relationship. Analysing more than 100 empirical networks, we show that the range of coexistence conditions in mutualistic systems can be analytically predicted. Finally, we characterize the geometric shape of the feasibility domain, thereby identifying the direction of perturbations that are more likely to cause extinctions.