Context. The APEX Telescope Large Area Survey of the Galaxy (ATLASGAL) is the first systematic survey of the inner Galactic plane in the sub-millimetre. The observations were carried out with the Large APEX Bolometer Camera (LABOCA), an array of 295 bolometers observing at 870 microns (345 GHz). Aims. Here we present a first version of the compact source catalogue extracted from this survey. This catalogue provides an unbiased database of dusty clumps in the inner Galaxy. Methods. The construction of this catalogue was made using the source extraction routine SExtractor. We have cross-associated the obtained sources with the IRAS and MSX catalogues, in order to constrain their nature. Results. We have detected 6639 compact sources in the range from 330 < l < 21 degrees and |b| < 1.5 degrees. The catalogue has a 99% completeness for sources with a peak flux above 6 sigma, which corresponds to a flux density of ~0.4 Jy/beam. The parameters extracted for sources with peak fluxes below the 6 sigma completeness threshold should be used with caution. Tests on simulated data find the uncertainty in the flux measurement to be ~12%, however, in more complex regions the flux values can be overestimated by a factor of 2 due to the additional background emission. Using a search radius of 30 we found that 40% of ATLASGAL compact sources are associated with an IRAS or MSX point source, but, ~50% are found to be associated with MSX 21 microns fluxes above the local background level, which is probably a lower limit to the actual number of sources associated with star formation. Conclusions. Although infrared emission is found towards the majority of the clumps detected, this catalogue is still likely to include a significant number of clumps that are devoid of star formation activity and therefore excellent candidates for objects in the coldest, earliest stages of (high-mass) star formation.