While optically pumped magnetometers (OPMs) can be attached to the head of a person and allow for highly sensitive recordings of the human magnetoencephalogram (MEG), they are mostly limited to an operational range of approximately ±5 nT. Consequently, even inside a magnetically shielded room (MSR), movements in the remnant magnetic field disable the OPMs. Active suppression of the remnant field utilizing compensation coils is therefore essential. We propose 8 compensation coils on 5 sides of a cube with a side length of approximately 2 m which were optimized for operation inside an MSR. Compared to previously built bi-planar compensation coils, the coils proposed in this report are more complex in geometry and achieved 10 times smaller errors for simulated compensation fields. The proposed coils will allow for larger head movements or smaller movement artifacts in future MEG experiments compared to existing coils.