New sample environments and techniques specifically designed for in situ powder X-ray diffraction studies up to 1000 bar (1 bar = 105 Pa) gas pressure are reported and discussed. The cells can be utilized for multiple purposes in a range of research fields. Specifically, investigations of gas–solid reactions and sample handling under inert conditions are undertaken here. Sample containers allowing the introduction of gas from one or both ends are considered, enabling the possibility of flow-through studies. Various containment materials are evaluated, e.g. capillaries of single-crystal sapphire (Al2O3), quartz glass (SiO2), stainless steel (S316) and glassy carbon (Sigradur K), and burst pressures are calculated and tested for the different tube materials. In these studies, high hydrogen pressure is generated with a metal hydride hydrogen compressor mounted in a closed system, which allows reuse of the hydrogen gas. The advantages and design considerations of the in situ cells are discussed and their usage is illustrated by a case study.