This protocol collection explains how to build a low-cost, lightweight system to implant 1 Neuropixels 1.0 probe or 2 Neuropixels 2.0 probes into mice, record during freely moving behavior, then recover the probes for future use. This protocol enables recording from mice after following the Assembly and Implant surgery protocols, or after any chronic electrode implantation. This protocol first explains how to build enclosures for spatial tasks, construct a frame to mount the enclosures and related hardware, and wire and code an Arduino to operate poke detectors, pinch valves to dispense reward, and floor-mounted doors. Second, it explains how these procedures can be used specifically to build an X-maze for mice. Third, it explains how to integrate recording by building a headfixation apparatus for easy headstage attachment and a pulley-operated counterweight to counteract the headstage weight and enable easier running. The X-maze is derived from the H maze, originally published in Seigle & Wilson, 2014 (https://elifesciences.org/articles/03061) with a detailed protocol published in Wirtshafter, Quan, & Wilson, 2021 (https://bio-protocol.org/e3947). See full collection for more details.