Context. As endpoints of stellar evolution, white dwarfs (WDs) are powerful tools to study the evolutionary history of the Galaxy. In particular, the multiplicity of WDs contains information regarding the formation and evolution of binary systems. Aims. Can we understand the multiplicity of the local WD sample from a theoretical point of view? Population synthesis methods are often applied to estimate stellar space densities and event rates, but how well are these estimates calibrated? This can be tested by a comparison with the 20 pc sample, which contains ≃ 100 stars and is minimally affected by selection biases. Methods. We model the formation and evolution of single stars and binaries within 20 pc with a population synthesis approach. We construct a model of the current sample of WDs and differentiate between WDs in different configurations, that is single WDs, and resolved and unresolved binaries containing a WD with either a main-sequence (MS) component or with a second WD. We also study the effect of different assumptions concerning the star formation history, binary evolution, and the initial distributions of binary parameters. We compile from the literature the available information on the sample of WDs within 20 pc, with a particular emphasis on their multiplicity, and compare this to the synthetic models. Results. The observed space densities of single and binary WDs are well reproduced by the models. The space densities of the most common WD systems (single WDs and unresolved WD-MS binaries) are consistent within a factor two with the observed value. We find a discrepancy only for the space density of resolved double WDs. We exclude that observational selection effects, fast stellar winds, or dynamical interactions with other objects in the Milky Way explain this discrepancy. We find that either the initial mass ratio distribution in the Solar neighbourhood is biased towards low mass-ratios, or more than ten resolved DWDs have been missed observationally in the 20 pc sample. Furthermore, we show that the low binary fraction of WD systems (∼25%) compared to Solartype MS-MS binaries (∼50%) is consistent with theory, and is mainly caused by mergers in binary systems, and to a lesser degree by WDs hiding in the glare of their companion stars. Lastly, Gaia will dramatically increase the size of the volume-limited WD sample, detecting the coolest and oldest WDs out to ≃ 50 pc. We provide a detailed estimate of the number of single and binary WDs in the Gaia sample.