What happens inside a compost bin: The role of bacteria, worms—and heat

An invisible army of bacteria and fungi are hard at work, transforming your waste into soil

0:00
0:00
unmutemute
skip backwards
10
playpause
skip forward
10
Jul 29, 2025
4
min read

Table of Contents

Dont miss out on monthly updates

When you lift open the lid of your compost bin to peek in, you may see little more than scraps in disarray—coffee grounds clinging to a banana peel, wilted spinach tangled with bits of newspaper, perhaps even a trail of ants. But just beneath the surface, an extraordinary transformation is underway. An entire cast of microbes, fungi, and worms are breaking down your waste with quiet precision. You can’t see them, but they are everywhere, turning your peels and leftovers into soil.

The microbial engine

Composting starts with bacteria—the first responders.These bacteria perform two functions: decomposition and mineralisation. First, they release enzymes that decompose complex compounds like proteins, fats, and carbohydrates into simpler molecules they can absorb. Second, they convert organic compounds into inorganic minerals like nitrogen, phosphorus, and potassium. Some of these inorganic minerals further decompose to result in ions that can be absorbed by plants. Others form long intricate chains that resist decomposition to form humus. In the course of this hustle, they generate heat and create nutrient-rich material that worms can further process.

Compost piles are mini ecosystems, around which a food web spins itself.

Mesophilic bacteria, which thrive in moderate temperatures, eat sugars, starches and soft scraps, and thereby, release heat. As the temperature rises, another kind of bacteria, heat-loving thermophiles, take over. These thermophilic bacteria become active beyond 40°C, helping the compost’s core to heat up to 55–60°C. This stage is critical—temperatures above 55°C sanitise the compost by destroying any budding weed seeds and pathogens. However, be careful: temperatures beyond 60-65°C can strangle useful microbes that are breaking down your compost. Keep turning and mixing your compost pile once a week to prevent excessive heating.  

Among the microbes in your compost pile are Actinomycetes—filamentous bacteria that look like fungi. They secrete enzymes that facilitate them to break down what bacteria and fungi cannot—tough, woody material like bark, stems, and newspapers. Some kinds of Actinomycetes occur in the thermophilic stage, while others appear as the pile cools down. Their presence reveals itself as delicate greyish-white threads, appearing on the periphery of your compost pit like a spirit of the netherworld.

Fungi are another species that come for leftovers left by bacteria. Though some thermophilic fungi exist, most are mesophilic and announce their presence once the compost pit starts cooling. Whatever is too dry, acidic, or low in nitrogen for bacteria is ably digested by fungi—think cellulose, lignin, and other complex compounds found in plant fibres, present largely in brown matter.  

Compost piles are mini ecosystems, around which a food web spins itself. Bacteria and fungi form the primary rung of this web; but snails, slugs, and centipedes play their own roles in the process of decomposition. 

Also read: The science of scraps: How to get composting right

Unexpected visitors

In some home compost systems, earthworms are the final alchemists. Earthworms typically appear in the maturation phase of composting—once the pile has cooled down to below 30°C and the material is largely decomposed. They eat their way through partially decomposed matter, digesting and excreting it as vermicast—a substance rich in potassium, phosphate and nitrogen, and other micronutrients. Worms also aerate the pile naturally, supporting aerobic conditions and speeding up decomposition.

Even if you haven’t added worms to your bin, don’t be surprised if a few show up on their own to the house party once your compost matures. They know where the good stuff is, and make it even better! 

It’s important to distinguish this from vermicomposting, where specific worm species (like Eisenia fetida) are deliberately introduced and managed in controlled conditions—cool, moist, and having low acidity (i.e. avoiding vinegar-soaked and citrus foods) so as to not irritate worms and disrupt your bin’s pH balance. Vermicomposting is also much faster than traditional composting. 

Even if you haven’t added worms to your bin, don’t be surprised if a few show up on their own to the house party once your compost matures. They know where the good stuff is, and make it even better! 

But in compost systems where worms don’t participate—like hot compost piles or sealed aerobic bins—it’s microbes that continue the work until the very end. As the temperature drops and the pile enters the curing phase (where temperature drops back to 20–40°C), mesophilic bacteria, fungi, and actinomycetes return to break down whatever’s left: woody fibres, resistant compounds like lignin, and organic acids. These microbial communities quietly stabilise nutrients, reduce ammonia levels, and ensure the compost is mature, mellow, and ready to nourish.

Also read: Setting up a compost bin at home: Do’s and don’ts for feed and airflow

The stages of decomposition in thermophilic composting

Composting unfolds in phases.

  1. Mesophilic Phase (20–40°C): Begins right after scraps are added. Mesophilic bacteria multiply rapidly.

  2. Thermophilic Phase (45–70°C): The pile heats up, and thermophilic bacteria take over, and do the heavy lifting. They break down proteins, fats, and pathogens.

  3. Cooling Phase: As easy-to-break-down food becomes scarce, microbial activity slows down. The temperature drops.

  4. Maturation/Curing: Fungi and worms arrive, and humic acids form (organic compounds which play a crucial role in soil health and plant growth, which form naturally during long-term decomposition). Life becomes soil.

You’ll know your compost is done when it looks nothing like what it did at the start—dark, earthy and crumbly; smelling like a forest floor after rain.

Inside every compost bin, an ancient system of renewal is at work, which needs neither a machine nor a manual. Every time you add to your compost and stir the pile, you’re not just managing waste. You are feeding an invisible universe.

Also read: Don't dump it, compost it: Why peels and scraps shouldn't be tossed into your garden

Cover photo (desktop) by sippakorn yamkasikorn on Unsplash

Cover photo (mobile) by Jonathan Kemper on Unsplash

{{quiz}}

Written by
Harshita Kale

Harshita is a writer who grew up on stories and the sea. She is interested in gender, queerness, climate, urban systems and social justice.

Co-author

Edited By
Durga Sreenivasan

Durga is a writer and researcher passionate about sustainable solutions, conservation, and human-wildlife conflict.

Explore other topics

References

No items found.
No items found.
No items found.
No items found.
congrats
Congratulations!
You’re correct!
Arabic
Oops!
You got the wrong answer
The right answer is
Arabic

Above what temperature are weeds and pathogens killed?

Option C

You might also like

See all