A von Hámos spectrometer has been implemented in the vacuum interaction chamber 1 of the High Energy Density instrument at the European X-ray Free-Electron Laser facility. This setup is dedicated, but not necessarily limited, to X-ray spectroscopy measurements of samples exposed to static compression using a diamond anvil cell. Si and Ge analyser crystals with different orientations are available for this setup, covering the hard X-ray energy regime with a sub-eV energy resolution. The setup was commissioned by measuring various emission spectra of free-standing metal foils and oxide samples in the energy range between 6 and 11 keV as well as low momentum-transfer inelastic X-ray scattering from a diamond sample. Its capabilities to study samples at extreme pressures and temperatures have been demonstrated by measuring the electronic spin-state changes of (Fe0.5Mg0.5)O, contained in a diamond anvil cell and pressurized to 100 GPa, via monitoring the Fe Kβ fluorescence with a set of four Si(531) analyser crystals at close to melting temperatures. The efficiency and signal-to-noise ratio of the spectrometer enables valence-to-core emission signals to be studied and single pulse X-ray emission from samples in a diamond anvil cell to be measured, opening new perspectives for spectroscopy in extreme conditions research.