Electro-optical detection has proven to be a valuable technique to study temporal profiles of THz pulses with pulse durations down to femtoseconds. As the Coulomb field around a relativistic electron bunch resembles the current profile, electro-optical detection can be exploited for non-invasive bunch length measurements at accelerators. We have developed a very compact and robust electro-optical detection system based on spectral decoding for bunch length monitoring at the European XFEL with single-shot resolution better than 200~fs. Apart from the GaP crystal and the corresponding laser optics at the electron beamline, all components are housed in 19 chassis for rack mount and remote operation inside the accelerator tunnel. An advanced laser synchronization scheme based on radio-frequency down-conversion has been developed for locking a custom-made Yb-fiber laser to the radio-frequency of the European XFEL accelerator. In order to cope with the high bunch repetition rate of the superconducting accelerator, a novel linear array detector (KALYPSO) has been employed for spectral measurements of the Yb-fiber laser pulses at frame rates of up to 2.26~MHz. In this paper, we describe all sub-systems of the electro-optical detection system as well as the measurement procedure in detail, and discuss first measurement results of longitudinal bunch profiles of around 400~fs (rms) with an arrival-time jitter of 35~fs (rms).