A computer-controlled method for the automatic mechanical centring of a powder capillary sample onto the rotation centre of a powder diffractometer, using total scattering of the radiation beam into one-dimensional or two-dimensional detectors, and only a 90° rotation of the sample stage, is described. This method is particularly useful for situations where powder capillaries are within non-ambient experimental apparatus or loadedviaan automatic sample changer. Irregularly shaped samples, potentially subject to absorption effects, are aligned and centred on the sample's `scattering centre'.