I've been using a composting toilet for about 5 months and for the last 4 I've been in a constant battle with what I believe are fungus gnats. Other than that my composting experience has be absolutely perfect. I'm using a Nature's Head with lightly damp peat moss. The problem is, every time I dump and refill the toilet, within a matter of days, the fungus gnats are swarming inside the main chamber. I'm doing everything the manual told me to do, the ventilation fan is working fine, I churn it after each use, etc. I've tried varying levels of moisture in the peat moss, damp enough that white mold grew all the way up to nearly dry. No matter what the gnats congregate and reproduce in the toilet. They're getting out into my house, which is obviously very unsettling considering they're in my toilet.. They've become my nemesis. I've gotten to the point where I just take the seat off and leave the toilet outside until I bring it in to use it.
Someone please tell me I'm not the only one with this issue. I've looked online, can't find much about gnats which is compost specific. I keep my house clean, I leave little cups of apple cider vinegar/drop of dish soap all over which does attract and kill them, but never solves the root problem which is the toilet. I'm willing to try anything at this point, I'll even resort to spraying chemicals in the toilet if that's what it takes (so long as it doesn't cause the compost to smell). If nothing else I'm hoping that this winter I'll be able to eliminate them, and somehow keep them away next spring/summer. But this has been so frustrating and I'm at a lost.
You're certainly not the only one to struggle with such critters in your composting toilet. We have struggled with what I believe are fruit flies in ours, despite many efforts to exclude and eliminate them. You're right, it's definitely unsettling.
From reading about fungus gnats, it sounds like when growing plants, they can be an indicator of overwatering and that allowing the soil to dry can serve to reduce their numbers greatly. Adding a layer of sand, mulch or diatomaceous earth was also suggested.
I know something we have found helpful, although not a total solution, is more frequent emptying of our toilet chamber (bucket, in our case). Every few days, or maybe even daily, so as to interrupt their reproductive cycle and reduce the numbers.
I have a suspicion (confirmed in the article below) that the peat moss may be a carrier for fungus gnats. Whether it's the source or not, it probably does encourage them. Especially since it is damp. Could you perhaps use a different cover material and see if that helps? This article has some suggestions for natural ways to eliminate fungus gnats. Hope you find a solution! https://yourindoorherbs.com/get-rid-of-fungus-gnats-soil-home/
"Even after all this time, the sun never says to the earth, "You owe me." Look what happens with a love like that. It lights the whole sky."
Diego Footer on Permaculture Based Homesteads - from the Eat Your Dirt Summit