One of the most promising avenues for the detailed study of temperate Earth-sized exoplanets is the detection of such planets in transit in front of stars small and nearby enough to make possible their thorough atmospheric characterisation with next generation telescopes like the James Webb Space telescope (JWST) or Extremely Large Telescope (ELT). In this context, the TRAPPIST-1 planets form an unique benchmark system that has gathered the interest of a large scientific community. The SPECULOOS survey is an exoplanet transit survey, that targets a volume-limited (40 pc) sample of ultracool dwarf stars. We define the SPECULOOS target list as the sum of three non-overlapping sub-programs incorporating the latest type objects (T_eff < 3000K): Program1: 365 dwarfs that are small and nearby enough to make possible the detailed atmospheric characterisation of an `Earth-like planet with the upcoming JWST, Program2: 171 dwarfs of M5-type and later for which a significant detection of a planet similar to TRAPPIST-1b should be within reach of the exoplanet transit survey TESS, and Program3: 1121 dwarfs later than M6-type that aims to perform a statistical census of short-period planets around ultracool dwarf stars. Our compound target list includes 1657 photometrically classified late-type dwarfs. 260 of these targets are classified for the first time as possible nearby ultracool dwarf stars. Our general observational strategy is to monitor each target for 100 to 200hr with our telescope network, by efficiently using the synergy with TESS for our Program2 and a fraction of the targets of Program1. We expect to detect up to a few dozens temperate, rocky planets, a handful of them being amenable for atmospheric characterisation with JWST and other future giant telescopes which will improve drastically our understanding of the planetary population of the latest-type stars.