An airfreight container with automated instruments for measurement of atmospheric gases and trace compounds was operated on a monthly basis onboard a Boeing 767-300 ER of LTU International Airways during long-distance flights from 1997 to 2002 (CARIBIC, Civil Aircraft for Regular Investigation of the Atmosphere Based on an Instrument Container, http://www.caribic-atmospheric.com). Subsequently a more advanced system has been developed, using a larger capacity container with additional equipment and an improved inlet system. CARIBIC phase #2 was implemented on a new long-range aircraft type Airbus A340-600 of the Lufthansa German Airlines (Star Alliance) in December 2004, creating a powerful flying observatory. The instrument package comprises detectors for the measurement of O3, total and gaseous H2O, NO and NOy, CO, CO2, O2, Hg, and number concentrations of sub-micrometer particles (>4 nm, >12 nm, and >18 nm diameter). Furthermore, an optical particle counter (OPC) and a proton transfer mass spectrometer (PTR-MS) are incorporated. Aerosol samples are collected for analysis of elemental composition and particle morphology after flight. Air samples are taken in glass containers for laboratory analyses of hydrocarbons, halocarbons and greenhouse gases (including isotopic composition of CO2) in several laboratories. Absorption tubes collect oxygenated volatile organic compounds. Three differential optical absorption spectrometers (DOAS) with their telescopes mounted in the inlet system measure atmospheric trace gases such as BrO, HONO, and NO2. A video camera mounted in the inlet provides information about clouds along the flight track. The flying observatory, its equipment and examples of measurement results are reported.