The tension between humans and the environment is an ancient one. Yet the need for sustainable living is greater than ever. ‘Designer ecosystems’ may help to achieve sustainability by building the best attributes of natural ecosystems into engineered ones. But so far designer ecosystems fail to match the complexity and efficiency of their natural counterparts. Past agroecological systems that purposely employed natural complexity for human benefit – from ancient Hawaiian fish ponds to the Biosphere 2 project – highlight the promise but also the pitfalls of designing complex systems. Avoiding the pitfalls is essential and will only be possible if we apply recent insights into the power of biodiversity and landscape heterogeneity to regulate ecosystems. Our lab harnessed eight such sources of natural complexity (species richness, insurance effects, complementarity, habitat heterogeneity, food web topology, refugia, metapopulation dynamics and biological control) to build an indoor ecosystem that runs on kitchen waste alone to grow fish and plant crops. The stable and efficient functioning of this prototype shows that there is a promising future for designer ecosystems so long as we heed past and present lessons on working with complexity.