Flies in a composting toilet almost always mean one thing: the pile is too wet, too fresh or too exposed, and it is attracting insects rather than breaking down. The fix is not a spray. It is to keep urine out of the solids, cover each deposit with soak material, and make sure the chamber is vented so flies are drawn up and out rather than settling on the surface.
The Centre for Alternative Technology (CAT), which has run composting toilets for years, is direct about the cause. Keeping urine separate is usually the key to successful composting, otherwise it can become anaerobic and smelly1. A wet, airless pile is exactly what flies want. Get the moisture right and most fly problems never start.
If flies are already there, the same guidance gives you two practical tools: an insecticidal strip hung inside the chamber for a persistent problem, and a simple homemade fly trap for a wooden pedestal1. Both are covered below, along with the siting and design choices that stop the problem coming back.
Keep urine out of the solids and the pile stays sweet
The single most useful thing you can do is separate urine from solids. CAT's guidance is that keeping urine separate is usually the key to successful composting, because otherwise the pile can become anaerobic and smelly1. Anaerobic means without air: the pile compacts, the smell turns sour, and flies find it. A pile that stays aerated and crumbly does not attract them in the same way.
Urine diversion is a design feature, not an afterthought. A urine-diverting seat or pedestal sends liquid forward to a separate container or soakaway and lets solids drop into the chamber. If your toilet does not divert, retrofitting a diverter is the first upgrade to consider.
The collected urine needs handling too. CAT advises that urine collected without other contamination should ideally be used within a day or so, before ammonia levels build up and it starts to smell1. Dilute it and use it on the garden, or route it to a soakaway, but do not let it stand in a container for days. If you want to use it as a fertiliser, our guide to using urine as garden fertiliser safely sets out the dilution and timing.
A dry, aerated pile is also easier to manage in wet UK weather. UK winters are now, on average, 12% wetter than between 1961 and 19902, so a chamber that takes on rainwater will turn wet and fly-prone fast. Keep the lid closed and the chamber covered.
Add soak material after every use
Soak material, sometimes called cover material, is the layer you add on top of each deposit. It does three jobs: it covers the fresh waste so flies cannot reach it, it absorbs excess moisture, and it adds the carbon that balances the nitrogen in the pile. Sawdust, wood shavings, straw, shredded paper and dry leaves all work.

The routine is simple: after each use, add a handful of soak so the previous deposit is fully covered. Keep a lidded bucket of soak beside the toilet with a scoop. If the surface looks wet or you can see the last deposit, you have not added enough.
In a shared or public toilet the routine changes. CAT's experience is that a daily or even weekly addition of soak by the operator may be better than leaving users to add it indiscriminately1. Users adding uneven handfuls leave wet patches and dry patches, and the wet patches are where flies breed. An operator adding a measured layer keeps the surface consistently covered.
The same principle applies to household food waste, which can attract flies if it sits. Somerset Council notes that some residents put food waste in compostable liners into their freezers between collections, which prevents smells, pests and vermin3. If you keep a kitchen caddy near the toilet, empty it often and keep it covered.
Two chambers alternated each year suit the UK climate
Composting in the UK is slower than in a hot climate, and a single chamber that is always in use never gets a rest. CAT's advice is that a reliable and robust approach for the UK climate is to alternate annually between two separate chambers1. One chamber takes this year's waste while the other rests and finishes composting, then you swap.
The resting chamber is where the composting actually completes. Left alone for a year, the contents break down into a useable compost and any fly larvae in it die off. When you empty it, you start again with a clean chamber.
Sizing matters. CAT gives a figure for the composting chamber of about one-third to one half of a cubic metre per person, equal to a box about 70 to 80 cm on each side1. Two chambers of that size per person is a lot of space, so plan the footprint before you build. Our guide to composting toilet chamber size per person works through the numbers.

A continuous system settles within a few months
Not every composting toilet uses two chambers. A continuous system, where waste is added at the top and finished compost is drawn off at the bottom, works too, but it needs time to establish. CAT says a system like this should settle down within a few months1. During that settling period you may see more flies than later on, because the pile has not yet built up its community of decomposers.
Once it has settled, CAT says no intervention in terms of adding worms or other decomposers should be necessary1. That is worth repeating, because adding worms is one of the most common things people try when flies appear. It is not the fix. The fix is moisture and cover.
Ventilation is what makes a continuous system work, and it is also your best fly control. CAT advises placing a metal gauze over the top of the vent to prevent other insects coming in at night, attracted by the smell1. A vent that runs vertically upwards draws air through the chamber and carries smells, and flies, up and away. Fit the gauze and check it is not blocked.
Heated dry toilets: why to avoid them

Some dry toilets use electrical elements to heat the compost, speeding up evaporation and breakdown. CAT does not recommend them: we would not recommend dry toilets that use electrical elements to heat the compost1. The reason is that heat drives off moisture and can over-dry the pile, and an electrically heated chamber is one more thing to maintain and one more thing to go wrong.
CAT's planning guidance goes further: composting toilets should not be connected to an energy source other than for purposes of ventilation or sustaining the composting process1. A small fan for ventilation is fine. A heating element is not the approach CAT recommends.
There is a safety dimension too. Any electrical appliance in a damp, enclosed space needs care, and heat sources near dry material carry a fire risk. If you are heating or drying anything in a confined space, official advice is to ensure heaters, dryers or fires are well-ventilated to avoid carbon monoxide poisoning4. Keep heaters well away from bedding, blankets, curtains and furniture and never use them for drying clothes5. For a composting toilet, the simpler answer is not to heat the chamber at all.
When flies persist: strips, traps and the chamber itself
If the basics are right and flies are still a problem, CAT offers two targeted measures. For a persistent problem, an insecticidal strip hung inside the chamber will control flying insects without affecting the other decomposers in the compost mass1. Hang it where it will not be touched and follow the maker's instructions on the packet.
For a wooden pedestal, CAT describes a simple fly trap: drill a 2-3mm diameter hole in the middle of a jam jar lid, and screw the lid down over a hole in the top of the pedestal, with a cone of clear plastic to funnel the flies up into the jar1. Flies move towards the light, go up the cone and cannot find their way back down.
| What you are seeing | Likely cause | What to do |
|---|---|---|
| A few flies on the surface | Fresh waste not covered | Cover fresh waste with soak after every use |
| Many flies, sour smell | Urine in the solids, pile anaerobic | Check the diverter, add soak, aerate |
| Flies around the vent | Vent open or gauze missing | Fit metal gauze over the vent top |
| Flies that keep coming back | Persistent problem | Insecticidal strip inside the chamber |
Keep bins and waste containers out of direct sunlight and keep their lids closed at all times to prevent access by flies or rodents6. The same discipline applies to the soak bucket and any kitchen caddy near the toilet.
Siting: distance from wells, water and flood
Where you put the toilet matters as much as how you run it. CAT gives a separation distance from a water source, and says that if the soil is sandy this could be reduced to 7.5m1. Sandy soil drains faster, so the risk of contamination travelling is lower, but a reduction is not a free pass.
For a private water supply, official advice is stricter: prevent storage and/or the spreading of manure within 50 metres of the water source7. A composting toilet is not manure spreading, but the principle is the same, and where drinking water is involved follow the stricter figure. Our guide to how far a composting toilet should be from wells and water supplies sets out the distances in full.
Flood risk is part of siting. CAT says a composting toilet is fine where no part of the installation would be rendered ineffective by entry of flood water1. In England, around one in five homes is at flood risk, rising to one in four by the mid-century because of climate change8. If your site floods, raise the chamber or move it.
Where to get help and what to check
If you are planning a composting toilet, check the rules before you build. CAT sets out what "suitable arrangements" means: waste can be disposed of on or off site, waste can be removed without carrying it through living space or food preparation areas, and no part of the installation would be rendered ineffective by flood water1. Our guide to planning permission and building regulations covers the permissions side.
For a remote site with no water and no drain, a composting toilet is often the only practical option. If you need a temporary toilet after a flood or during building work, you can hire chemical toilets from hire companies and camping and caravan stores11. For the wider picture of living without mains services, see our section on self-reliance at home and the guide to composting toilets: how they work and how to choose one.
A composting toilet uses no water for flushing, which is why it suits remote sites and homes off the mains. Any water you do use is for cleaning and handwashing. If you are setting up a rainwater supply alongside your toilet, our guides to water butts and what harvested rainwater can be used for explain the fittings and the limits.
Sources (11)
- Composting toilets, Centre for Alternative Technology, 2025-06-27
- Staffordshire's changing local climate, Staffordshire County Council, 2026
- Bins, recycling and waste services and weather, Somerset Council, 2025-08-13
- Flooding and health: safely cleaning your home, Wiltshire and Swindon Prepared, 2026-10-25
- Portable heaters, gas fires and open fires, London Fire Brigade, 2026-10-25
- Hot weather advice, nidirect, 2026-10-05
- Protecting your private water supply, Drinking Water Inspectorate, 2026-10-28
- Flood and coastal erosion risk management report, UK Government, 2025-03-31
- Summer health, NHS Inform, 2026-08-06
- Cryptosporidium public advice, UK Government, 2023-11-01
- Further support after a flood, Nottinghamshire County Council, 2026-10-29

Composting Toilet Kit Checklist
Garden Harvesting Kit Checklist
Rainwater Winter Checklist
Composting Toilet Near Wells
Composting Toilet Chamber Size
Is Harvested Rainwater Safe
Garden and Lawn Water Needs
Grey Water Disposal Off Mains
Rain and Grey Water in Garden
House With a Private Supply
Rainwater Pipe Types and Labels
Private Water Supply Visitors
Rainwater Systems in a Power Cut
Does Stored Rainwater Stagnate
Underground Tank Dig Depth