About a week after we planted the 10-gallon, the gnats showed up. Not a cloud, but enough that lifting the lid meant three or four of them drifting up past your face, and every one of them had come from the substrate. This is the most common thing that goes wrong in a new bioactive terrarium and it is also the one with the most bad advice attached to it, most of which involves spraying something into a tank full of animals you are trying to keep alive. Here is what we did instead. It took about a week and cost a few dollars.
Why a new bioactive tank grows gnats
Fungus gnats are tiny dark flies whose larvae live in damp soil and eat fungus and decaying organic matter. A freshly built bioactive tank is exactly that: wet, full of new soil and fresh leaf litter, and in its mold phase. The eggs usually arrive in the substrate, especially in bagged soil or anything collected outside that was not treated. Ours most likely rode in on the nursery plants or the first bag of substrate; we cannot say which, and that is the point of treating everything before it goes in. The adults you see are the end of the cycle; the population is the larvae you do not see.
The good news: gnat larvae and springtails eat the same thing, and springtails are much better at it. A maturing tank starves gnats out on its own. The trap just speeds up the part you can see.
Put a yellow sticky trap in the tank
A yellow sticky card, the kind sold for houseplants, hung from the top of the tank so that it touches nothing — not the glass on any side, not the litter below it. Adult gnats are drawn to yellow and they do not come back off the card. Ours went in the day we noticed them. About a week later the count on the card had climbed and then stalled, the number of adults in the tank had dropped to one, and we pulled the trap.
The trap does two things. It removes adults before they lay the next round of eggs, and it tells you what is happening, because you can count. Fewer new gnats on the card each day means the larvae are running out. Hang it clear of every surface, and that is not a detail to skip. Isopods and springtails do not fly, but they climb, and a card touching the glass or resting on the litter gives them a route onto it. Anything that walks on a sticky card stays there, and that is a sad way to lose one.
Close the lid
The standard internet advice for gnats is to dry the soil out, and that is fine for a houseplant. In a bioactive tank it is a trade. We propped the lid to add airflow and the hygrometer fell from 77 percent to 70 and sat there all week. Seventy is fine for the isopods and a little low for the millipedes, and it does nothing to the larvae, which live in the wet layer an inch down where surface drying never reaches. Once the trap had done its work we closed the lid and the tank climbed back to 77 within a day. If you want to dry the surface, do it lightly: let the top half inch go dry between mistings, which gnats dislike and the crew does not care about, and leave the wet end wet.
Let the springtails finish the job
This is the part that makes a bioactive tank different from a pot of soil. Springtails eat mold and fungus, which is what gnat larvae eat, and a booming springtail population out-competes them. Our tank had been seeded with springtails from the start, and by the time the trap came out they were visibly everywhere on the mold spots. The last few stragglers disappeared over the following week with nothing else done. If your tank has no springtails yet, adding a culture is the single most effective long-term move; keeping a springtail culture is a cup of charcoal and a few grains of rice.
What we did not do
No sprays, no neem, no hydrogen peroxide drench, no diatomaceous earth on the surface. All of those hit the cleanup crew as hard as the gnats, and a drench also resets the soil biology you spent three weeks building. The tank did the work with the trap and the lid. That is the whole method, and the reason to trust it is that the tank got there in a week without anyone getting hurt.
There is one product we would reach for if a trap and patience ever failed, and we keep it on the shelf unused: Bti, sold as Mosquito Bits or Gnatrol. It is a soil bacterium whose toxin only switches on in the gut of fly and mosquito larvae, so it kills gnat larvae in the substrate and does nothing to isopods, springtails, millipedes, or plants. Keepers generally use it as a soak or a sprinkle on the wet end. We did not need it and have not tested it in our own tank, so file it as backup, not as the first move.
Stopping the next outbreak before it starts
Treat everything that comes from outside before it goes in: freeze soil, wood, and leaves for three days or bake them at 200 to 250°F. Use a drainage layer so the bottom of the soil is not standing in water. Do not overfeed; food that molds on the surface is a gnat nursery. And keep the springtails fed and happy, because a tank with a strong crew rarely has a gnat problem that lasts. The full build order, drainage to crew, is in how to make a bioactive terrarium, and the substrate that does not bring gnats with it is in our isopod substrate recipe. Springtail cultures will be one of the first things we sell; the waitlist is here.
Questions people ask
How do you get rid of fungus gnats in a bioactive terrarium? A yellow sticky trap hung in the airspace so the crew cannot climb onto it, lid closed, and a healthy springtail population. About a week, no pesticides.
Will fungus gnats hurt my isopods or springtails? No. They compete with springtails for mold and they are annoying, but they do not harm the crew or the plants in any numbers you will see in a tank.
Do springtails eat fungus gnat larvae? Not directly. They eat the mold and fungus the larvae depend on, which starves the larvae out.
Is Mosquito Bits safe for isopods? Bti only affects fly and mosquito larvae, so keepers generally consider it safe for isopods and springtails. We keep it as a backup and have not needed it.
Where do fungus gnats come from in a terrarium? Almost always the substrate: bagged soil or untreated outdoor material carrying eggs. Freeze or bake everything first.
What we use in this tank
Two things this page leans on. The litter is the staple the crew eats; the springtails are the reason the gnats lost.
Mixed Hardwood Leaf Litter, Heat-Treated (1 gallon)
$16.99, free shipping
The fresh litter that feeds a new tank is also what feeds its first gnats, which is why ours is baked at about 200°F before it is bagged. Treated litter is the version that does not bring eggs in with it.
Springtail Culture (Folsomia candida)
Not for sale yet; 16 oz $29.99 and 32 oz $34.99 when they go live
The animals that actually ended this outbreak, by eating the mold the larvae needed. Ours are still building; the product page has the waitlist and no photo yet.