Circadian clocks coordinate behaviour, physiology and metabolism with Earth's diurnal cycle. These clocks entrain to both light and temperature cycles, and daily environmental temperature oscillations probably contribute to human sleep patterns. However, the neural mechanisms through which circadian clocks monitor environmental temperature and modulate behaviour remain poorly understood. Here we elucidate how the circadian clock neuron network of Drosophila melanogaster processes changes in environmental temperature. In vivo calcium-imaging techniques demonstrate that the posterior dorsal neurons 1 (DN1 ps), which are a discrete subset of sleep-promoting clock neurons, constantly monitor modest changes in environmental temperature. We find that these neurons are acutely inhibited by heating and excited by cooling; this is an unexpected result when considering the strong correlation between temperature and light, and the fact that light excites clock neurons. We demonstrate that the DN1 ps rely on peripheral thermoreceptors located in the chordotonal organs and the aristae. We also show that the DN1 ps and their thermosensory inputs are required for the normal timing of sleep in the presence of naturalistic temperature cycles. These results identify the DN1 ps as a major gateway for temperature sensation into the circadian neural network, which continuously integrates temperature changes to coordinate the timing of sleep and activity.