Black soldier fly larvae stay alive and healthy when you maintain the right balance of temperature, moisture, food, and space. They’re hardy creatures, but neglecting any one of these factors can cause die-offs surprisingly fast. Whether you’re raising them for composting, animal feed, or fishing bait, the principles are the same.
Keep the Temperature Between 27°C and 35°C
Temperature is the single biggest factor in keeping BSFL alive and growing. The larvae thrive best around 30°C (86°F), where they grow fastest and have the shortest time to maturity. They can tolerate a range from roughly 27°C to 36°C, but survival drops sharply above 40°C (104°F), where only about a third of larvae make it. Below around 15°C, they slow down dramatically and stop eating.
If you’re raising them indoors, a warm room or a heat mat under the bin works well. Outdoors, place the bin in a shaded spot during summer to prevent overheating, and bring it inside or insulate it when nighttime temperatures drop. The larvae themselves generate heat as they feed, especially in dense colonies, so a thick, active colony in a well-insulated container can stay warm even in cooler conditions. Monitor the substrate temperature, not just the air temperature, since microbial activity in the food waste adds extra heat.
Aim for 60% Substrate Moisture
BSFL need a moist environment but can drown in waterlogged substrate. Research consistently points to 60% moisture content as the sweet spot for the best growth. Larvae can survive in substrate moisture up to about 80% without significant die-offs, but above 90% survival rates drop. On the dry end, larvae cannot develop at all at 40% moisture.
In practice, the substrate should feel like a wrung-out sponge: damp to the touch but not dripping. Vegetable scraps naturally run around 60% moisture, which is one reason they work so well as feed. If your bin gets too wet from rain, juicy food waste, or condensation, add dry material like shredded cardboard, coconut coir, or rice bran on top of the substrate. These absorb excess water and help prevent the anaerobic, foul-smelling conditions that come with waterlogging. A bin with drainage holes at the bottom also helps, since the larvae produce liquid waste (leachate) that needs somewhere to go.
You can check moisture levels with an inexpensive soil moisture meter, or just use the squeeze test: grab a handful of substrate and squeeze. A drop or two of liquid should appear between your fingers. If water streams out, it’s too wet. If nothing appears, add water or wetter food scraps.
Feed the Right Amount of the Right Food
A single BSFL eats between 25 and 500 mg of food per day depending on its size and age. For a practical feeding target, research identifies around 90 mg per larva per day for mixed food waste (vegetables and protein) and up to 175 mg per larva per day for grain-based feeds. Overfeeding is a more common mistake than underfeeding: uneaten food rots, attracts mold and other insects, and creates odors.
BSFL will eat almost any organic waste. Vegetable scraps, fruit peels, coffee grounds, grains, and even small amounts of meat and fish are all fair game. A mix of vegetables and protein sources tends to produce good growth. Avoid overly acidic or salty foods in large quantities. Research on substrate pH shows that larvae perform best when the starting pH is between 6.0 and 10.0. At very acidic levels (pH 4.0 and below), larval weight drops significantly. In practice, this means go easy on citrus peels and pickled foods.
Chop or blend food waste into small pieces before adding it to the bin. Smaller particles are easier for the larvae to consume and break down faster, which reduces the chance of food sitting around long enough to mold. Feed in thin layers rather than dumping a large pile in one spot.
Don’t Overcrowd the Bin
Stocking density matters more than most people realize. Research identifies 5 larvae per square centimeter as the optimal density for healthy growth on mixed food waste. That works out to roughly 32 larvae per square inch, or about 5,000 larvae per 1,000 cm² (roughly a 12 x 12 inch bin floor). At the recommended density, larvae can move freely through the substrate, access food without intense competition, and grow to full size.
At high densities of 15 larvae per square centimeter, larvae can’t move freely, feeding becomes inefficient, and stress increases. You’ll notice slower growth, smaller larvae, and higher mortality. If your colony is growing and you’re running out of space, split them into a second bin rather than letting them pack in.
Manage Airflow and Prevent Mold
BSFL bins need ventilation. The larvae breathe through spiracles (small openings along their body), and the microbial activity in decomposing food consumes oxygen. A sealed container with no airflow creates anaerobic conditions that smell terrible and can suffocate the colony. Drill or punch ventilation holes in the lid and upper sides of your bin, covered with fine mesh to keep out other flies.
Mold can appear when food waste sits uneaten for too long, especially in warm, humid conditions. The larvae themselves are surprisingly resistant to mold, and an active colony often out-competes fungal growth just by consuming food quickly. The best prevention is simply not overfeeding. If you do see mold forming, reduce the amount of food you’re adding and mix the substrate to improve airflow. Leaving the lid off for a few hours can help dry things out, or add dry material like shredded cardboard to absorb excess moisture.
Short-Term Storage in the Fridge
If you need to keep BSFL alive but dormant for a few days (for use as animal feed or fishing bait, for example), refrigeration works. Store them at 10°C (50°F) for the best results. At this temperature, larvae enter a sluggish, low-metabolism state and can survive for up to 6 days with less than 15% losses. Lower fridge temperatures of 6°C or 8°C also work but result in slightly higher mortality.
Place the larvae in a ventilated container with a small amount of their substrate or frass (their waste material). Don’t seal them in an airtight bag. When you’re ready to use them or return them to active rearing, bring them back to room temperature gradually. They’ll resume normal activity within an hour or so as they warm up.
Recognize the Prepupal Stage
BSFL go through several growth stages, and the transition to the prepupal stage catches many people off guard. When larvae reach their final instar, their skin darkens from creamy white to dark brown or black. At this point, they stop eating entirely, empty their digestive tract, and instinctively try to crawl away from the food source to find a dry spot to pupate.
This migration behavior is normal, not a sign that something is wrong with your bin. If you’re raising larvae for composting or feed, this is your harvest window. Prepupae will metamorphose into pupae within 7 to 10 days if left alone. If you want to keep your colony going, let some prepupae pupate and emerge as adult flies to lay new eggs. Provide a dry area with crevices or crumpled cardboard near the bin where migrating prepupae can settle. Adults don’t bite, sting, or eat, and they live only long enough to mate and lay eggs.

