Multi-electron systems in strong magnetic fields I: The 2D Landau–Hartree–Fock–Roothaan method. We present a 2-dimensional Hartree–Fock–Roothaan code to calculate wave functions and energies of light to heavy atoms in strong external magnetic fields, as they occur in the vicinity of neutron stars. The code enhances the previously presented HFFER II method, resulting in a very high precision for the energies with typical deviations less than 1% compared to extremely precise fixed-phase diffusion quantum Monte Carlo calculations. Despite this high precision the code is highly optimized regarding speed and reliability, which allows calculating large amounts of states in short time, even with small-scale computing clusters.