As computing and geophysical sensor components have become increasingly affordable over the past decade, it is now possible to design and build a cost-effective system for monitoring the Earth's natural magnetic field variations, in particular for space weather events. Modern fluxgate magnetometers are sensitive down to the sub-nanoTesla (nT) level, which far exceeds the level of accuracy required to detect very small variations of the external magnetic field. When the popular Raspberry Pi single-board computer is combined with a suitable digitiser it can be used as a low-cost data logger. We adapted off-the-shelf components to design a magnetometer system for schools and developed bespoke Python software to build a network of low-cost magnetometers across the UK