With a good mix of greens and browns, moisture and air, the bacteria work so fast that the inside goes above about 45 °C and often reaches 55-65 °C. That heat speeds up the process and helps kill weed seeds and many harmful microbes.
When the temperature drops, turn the heap so the material from the outside moves to the centre and heats up again.

