ABSTRACT We study the statistics of dwarf galaxy populations as a function of environment in cold dark matter (CDM) and warm dark matter (WDM; sterile neutrino model mass $M_{{\rm s}}=7.1~{\rm keV}$; half-mode mass $M_{{\rm hm}} = 6.3\times 10^8$ ${\rm M}_\odot$; and thermal relic equivalent mass $m_{{\rm th}} = 2.8~{\rm keV}$) cosmogonies, using the Evolution and Assembly of GaLaxies and their Environments (EAGLE) galaxy formation model in two counterpart simulations. We measure the abundance of dwarf galaxies within 3 Mpc of DM haloes with a present-day halo mass similar to the Milky Way, finding that the number of galaxies $M_{*}\gt 10^7$ ${\rm M}_\odot$ is nearly identical for WDM and CDM. However, the cumulative mass function becomes shallower for WDM at lower masses, yielding 50 per cent fewer dwarf galaxies of $M_{*}\gtrsim 10^{5}$ ${\rm M}_\odot$ than CDM. The suppression of low-mass halo counts in WDM increases significantly from high- to low-density regions for haloes in the $[0.5,2] \times M_ {\rm hm}$ range. The fraction of haloes hosting resolvable galaxies ($M_*\gtrsim 10^{5}$ ${\rm M}_\odot$ ) also diverges from overdense to underdense regions for $M\gt 2M_ {\rm hm}$, as the increased collapse delay at small densities pushes the collapse to after the reionization threshold. However, the stellar mass of WDM haloes at $[0.5,2]\times M_ {\rm hm}$ is 30 per cent higher per unit halo mass than CDM haloes in underdense regions. We conclude that the suppression of galaxies with $M_{*}\gtrsim 10^5$ ${\rm M}_\odot$ between WDM and CDM is independent of density: the suppression of halo counts and fraction of luminous haloes is balanced by an enhancement in stellar mass–halo mass relation.