Self-described recovering attorney Lori Alper had had it with composting, and it wasn’t just the smell.

“The fruit fly problem was so awful last year that I ended up leaving the composting pail on our back deck for most of the winter,” she wrote in her blog on green living. “I need a composting vacation.”

But Alpert went back to composting, solving her problem by emptying her kitchen compost pail into her outdoor compost bin every day. That took care of the fruit flies (and the smell). “It’s amazing how I’ve reduced the amount of garbage we throw away by composting our kitchen food waste,” she concluded.

Related: How to Compost Without Attracting Pests

Many people who do indoor composting have gone through a similar phase: You may need to tinker with your system until it works for you, but once you solve the initial problems, you’ll be amazed that you ever threw away your kitchen waste.

Indoor compost anywhere

Done right, you, too, can do all your composting indoors without flies or smells.

The great thing about indoor composting is that you can do it anywhere, from a New York City apartment to the suburbs of Bozeman, MT. Plus, if you live in bear country, you won’t have to worry about attracting the big guys (and other varmints, including skunks) with outdoor compost. Here are the basics:

Find the right container. You’ll need a pail, bin or garbage can with adequate moisture, the ability to retain heat and enough air flow to decompost your organic leftovers when composting indoors. You can find a bin for indoor composting at your hardware store or gardening supply outlet; The Container Store and similar stores also offer a variety of attractive compost pails.

Go meatless.Some beginning composters throw meat scraps, grease, cooked food and dairy into their indoor compost bins, realizing their mistake only after a peculiar odor pervades their kitchen. Stick to fruit and vegetable waste, and sprinkle an inch or two of sawdust on top. Done correctly, indoor composting shouldn’t smell at all.

Mix browns and greens. You also need to mix “green” food waste with “brown” waste. Brown materials provide carbon and include things like woody clippings and paper, pine needles, dry leaves, pruned shrubbery, soiled paper, newspaper and wood chips. Greens produce nitrogen and include fruit and vegetable waste, grass clippings and coffee grounds. Some experts suggest a two to one ration of browns to greens, but a 50/50 mix is fine, too. Moisten the dry material so that it’s damp and empty the bin into your garden once you have composted soil.

Related: How to Create An Allergy-Free Garden

Worm your way into composting. Worm composting is often done in kitchens with as little as one cubic foot of space. Since the worms produce compost more efficiently through their castings (or poop), this is a good solution for composting food waste indoors. According to Seattle Tilth, a nonprofit dedicated to organic gardening and urban ecology, here’s what to do:

  • Purchase a worm bin at the local hardware or gardening supply store or make one from wood or plastic. The worm bins should be at least one foot deep with a tight-fitting lid and have holes in the bottom for drainage.
  • Fill the bottom with bedding (leaves, newspaper, straw or shredded cardboard), moistening them first so they’re damp rather than soaking wet.
  • Add about a pound of worms and then bury food scraps in the bedding (make sure there’s at least an inch or two of bedding on the top.)
  • Discourage fruit flies by keeping a sheet of newspaper or plastic on top.
  • Remember that worms get hot, too. Make sure your worm bin is in a cool, shady place: The worms will die off if the bin dries out or if it gets too hot or too cold.

Red wiggler worms, or Eisenia fetida, are ideal for indoor composting. They break down material faster than regular garden worms and are usually available at garden stores. They also produce a richer compost than compost sans worms.

Since the worms effectively do the compost stirring for you, it cuts down on that chore. Just be careful not feed them things like salt, citrus and inorganic material such as tin foil. Take care of your worms, and you’ll have good, rich compost in about five weeks.

Related: Urban Gardeners: Are You Growing Produce in Contaminated Soil?

Kathryn Olney is a freelance writer and editor who has served as a reporter and editor for California, San Francisco and Mother Jones magazines.