An attachment for commercial X-ray powder diffractometers is described. The device is made of four different parts that are largely independent of each other, and can be freely interchanged or replaced, and aligned independently. It can be home-built, or modified, with high flexibility according to user requirements, and has been tested on different problems concerning high-temperature phase transitions and solid-state reactions up to 1200 °C under vacuum, under inert gas or under various oxygen partial pressures. Examples are given of possible designs of the various parts.