I know there are lots of YouTube videos on this subject, and also on soldier flies, which I and the ducks prefer.
I myself don't go out of my way to raise them out of season, or separately from my birds. I started them in my big duck cage and my barn some years back. They both go dormant when it's cold here (US gardening zone 5), then resume when it warms up in the spring. They have pretty much spread themselves to all the cages and pens that have deep litter.
When I put fresh water in each duck and chicken pen now, there are a bunch of wrigglers under the empty water pan. I set the fresh water pan down on the other side of the cage, and let the birds clean up under the old water pan. There are always enough mealworms out of reach of the birds to continue the next generation!
I have to say, though, that live mealworms and soldier fly worms (which are slightly bigger and darker) in the cages are not for everyone. I am not squeamish about them, nor about the adults (little black beetles for mealworms, black flies three times as long as a housefly). None of them bite, though the black soldier flies sometimes buzz around in great excitement, almost as excited as the birds, when I bring water or food to the pens.
The best part about the soldier flies is that as their population goes up in the summer, the regular houseflies disappear. I am not a good enough biologist to have figured out why, yet.