LOUPE, the Lunar Observatory for Unresolved Polarimetry of the Earth, is a small, robust spectro-polarimeter for observing the Earth as an exoplanet. Detecting Earth-like planets in stellar habitable zones is one of the key challenges of modern exoplanetary science. Characterizing such planets and searching for traces of life requires the direct detection of their signals. LOUPE provides unique spectral flux and polarization data of sunlight reflected by Earth, the only planet known to harbour life. These data will be used to test numerical codes to predict signals of Earth-like exoplanets, to test algorithms that retrieve planet properties, and to fine-tune the design and observational strategies of future space observatories. From the Moon, LOUPE will continuously see the entire Earth, enabling it to monitor the signal changes due to the planet’s daily rotation, weather patterns and seasons, across all phase angles. Here, we present both the science case and the technology behind LOUPE’s instrumental and mission design. This article is part of a discussion meeting issue `Astronomy from the Moon: the next decades’.