How Compost Bins Work and How to Use Them

Aerobic vs. Anaerobic Systems, Choosing Your Bin, and Preventing Pests

tumbler compost bin

The Spruce / David Beaulieu

Most compost bins are designed to hasten the decomposition of organic matter through proper aeration and moisture retention. With the proper combination of air and moisture, ideal conditions are produced for the activity of aerobic organisms responsible for the high temperatures that transform the organic materials into compost.

Read on to find out how to start a compost bin, DIY compost bin ideas, and more tips for beginners.

What Is a Compost Bin?

A compost bin is a container into which you place organic waste to turn into compost (organic material) over time.

The decomposition process will eventually take place over time in a compost "pile" or "heap," even without any housing to contain the matter. However, a compost bin is worth it because it helps speed up decomposition and keeps the area neat. Some bins are continuous, meaning you can keep adding waste to them, while others create batches of compost with a set mix of ingredients you add all at once. Depending on the style of compost bin you choose, bins can also have the advantage of making it harder for rats to get at your compost. This is true of the tumbler type, for example.


Click Play to Learn Everything You Should Know About Compost Bins

Choosing the Right Bin

Select the right bin for your composting needs. You can make an inexpensive compost container out of almost any container or material. Some ideas include:

The best bin, however, is one you can easily turn or rotate consistently to control odors and make sure all the materials decompose. This is especially important for aerobic composting (more information below). A tumbler composting bin is pricey, but you can DIY one from barrels and sawhorses. You can turn compost with a rake or shovel in a non-rotating bin, it just takes more labor to do so.


If you're building a bin out of lumber and will be using the compost in a vegetable garden, don't use pressure-treated lumber: It isn't safe.

compost bin made from plastic buckets
Compost bin made from plastic buckets The Spruce / Candace Madonna

Anaerobic vs. Aerobic Composting Systems

There are two types of composting systems: aerobic vs. anaerobic. Aerobic composting is a more popular, straightforward process and anaerobic composting is a bit more complex, but the process is faster and the material has the highest nutritional value.


An aerobic system pertains to an organism that needs atmospheric oxygen to thrive. Well-designed aerobic compost bins that are well maintained promote an environment in which such aerobic microorganisms thrive. That's what most gardeners strive for, although a smaller number opt for the opposite approach, which is anaerobic composting.

Aerobic organisms are an important ingredient in good compost; without them, the material in a compost bin will not "cook" properly. If you have ever stuck your hand into a compost bin and found it hot, then that means aerobic organisms were present in sufficient numbers in that pile. That's why part of a good aerobic design is making sure that your compost bin "breathes."

The process of aerobic composting entails applying the correct mix of organic materials (yard waste and kitchen scraps), applying the right amount of water, and turning the pile occasionally with a pitchfork. The right combination of these elements will put aerobic microorganisms to work for you, breaking down the organic materials in the pile.

Aerobic compost piles are turned frequently to avoid compaction, to keep oxygen flowing freely through the pile, and to keep out anaerobic organisms. Your goal is to get the organic matter in them to heat up. By contrast, under anaerobic conditions, your goal is for fermentation to take place.


"Anaerobic," by contrast, pertains to organisms, such as bacteria, that can live in the absence of atmospheric oxygen. "Anaerobic composting" is terminology often used to refer to the results of the activity of such organisms living in a compost bin and influencing the quality of its decomposition; it also refers to the conditions under which such organisms thrive in the bin. Bokashi composting uses fermentation, an anaerobic process to break down materials.

Anaerobic composting is less labor-intensive (because there's no turning of the pile), but it produces an offensive smell. This could get you into trouble with the neighbors if you garden in an urban or suburban environment. In turn, properly maintained aerobic compost bins don't stink.


Choose a spot far away from your home that gets partial sun for your outdoor compost bin. Too much sun dries out the compost and hinders proper decomposition.

What Items to Compost

Not all food scraps qualify as good composting material. That's because some items can attract wild animals and pests. There's brown matter (dry or woody) and green matter (moist and somewhat fresh) to compost, or not compost, and it can get confusing. Here's a reference list:

Do compost:

  • Fruit and vegetable peels and eggshells
  • Brown paper products (unwaxed cardboard, newspaper, paper towels, coffee filters)
  • Houseplants and yard waste (free from disease/pesticides)
  • Coffee grounds
  • Hair and fur
  • Nutshells
  • Wood shavings/sawdust

Never compost:

  • Animal and seafood byproducts (meat, bones)
  • Dairy (including fats such as oil, butter, and grease)
  • Plants treated with pesticides; diseased plants
  • Pet and human waste
  • Foam, plastic, glass, and metal containers


It helps to add wood chips, sawdust, cardboard, or straw on top of fresh food scraps to deter insects. If you don't have any brown matter, just add food scraps in small amounts, not big clumps. Smaller amounts of scraps put into the bin at one time help with decomposition, as well.

What Attracts Rats to a Yard

Some properties are susceptible to rat invasions. You'll want to keep these and similar critters away, as rats can carry diseases. Where you live will determine what type of rat you must worry about. In cold climates, the Norway rat (Rattus norvegicus) is king. In warm climates, you have to worry about house rats (R. rattus).

The compost bin may not be the only rat magnet on your property. Look at some other things in your landscaping that can attract these rodent pests, so that you can take action. As an example, let's consider a landscape in the southwestern United States, where house rats can be a problem. Having any of the following in your yard could trigger an invasion of house rats for you:

  • Palm trees
  • Yucca plants
  • Tall ornamental grasses
  • Honeysuckle vine
  • Italian cypress trees
  • Bougainvillea vines
  • Thick ground covers
  • Shrubs with dense foliage that provides cover, such as oleander bushes
  • Bird food
  • Cat food
  • Dog food
  • Dog feces
  • Fruits
  • Vegetables
  • Nuts
  • Lumber piles
  • Brush piles
  • Storage boxes

It's always best to clean up storage areas of food and waste and any piles of garbage or materials you have around the yard as part of your annual maintenance. And if you have one of these plants in your landscaping and suspect it's attracting house rats, then, short of removing the plants, you should at least keep them well-trimmed.

You can also set out traps to catch the rats. But if you have children and/or pets that go outside, always be careful when using traps or poisons.

extensive shrubbery around a compost bin
The Spruce / Kara Riley

How to Keep Rats Out of Your Compost Bin

Focus on the compost bin itself, which rats can target to use as shelter, as well as for food. If your compost bin is drawing rats, it may be that you're not following accepted best practices for making compost. For example, suburban homeowners shouldn't be including meat in the kitchen scraps that they're putting in the compost pile: It attracts rats. And if you suspect a rat infestation, even fruit and vegetable scraps should be turned under (rather than leaving them exposed on top of your compost bin, giving rodents easy access to them).

A compost bin that's well designed will break down organic matter such as fruits and vegetables quickly, giving rats less of an opportunity to exploit the situation. The best compost piles, furthermore, are very hot in their centers (ideally between 135 degrees Fahrenheit and 160 degrees Fahrenheit); this heat would probably discourage rats from entering. One factor in getting a compost heap to heat up is keeping it moist, and this moisture, too, will cut down on rat invasions (rats seeking shelter would prefer some nice, dry compost).

There's one other measure you can take to keep rats out of compost bins, and that is to block their access:

For example, some types of compost bins can be closed up more tightly than others, making them cleaner. If you have a rat problem, you should probably seek out this kind of compost bin and remember to batten down the hatches whenever you're not present. Alternatively, you could rig up some sort of fencing that would envelop the compost bin. But there are two things to keep in mind here:

  • House rats can slip through relatively small holes in the fencing. You'll need to use a wire mesh with holes that are less than 1/2 inch big.
  • Your mesh fencing must be placed underneath bins that have no bottoms, otherwise, the rats will just tunnel under.
keeping the compost bin lid tightly shut helps prevent rat break-ins
The Spruce / Kara Riley
Article Sources
The Spruce uses only high-quality sources, including peer-reviewed studies, to support the facts within our articles. Read our editorial process to learn more about how we fact-check and keep our content accurate, reliable, and trustworthy.
  1. Compost Bins. UF/IFAS Extension.

  2. Morrell, Jeffrey J. Potential For Introduction Of Preservative Treated Wood In Wood Waste Recycling Streams And Its PreventionRecycling Materials Based on Environmentally Friendly Techniques, 2015. Intech, doi:10.5772/59327

  3. Compost Bins. UF/IFAS Extension.

  4. What Should You Be Composting in Your Backyard? Conservation Law Foundation.

  5. Ecology and Transmission. Centers for Disease Control and Prevention.

  6. Compost Fundamentals, Compost Needs. Washington State University, Whatcom County Extension.

  7. Rodent Exclusion Methods. USDA National Institute if Food and Agriculture.