Short answer: yes, but I wouldn’t just wheel a standard city trash bin into a community garden and start tossing in food scraps. A typical urban trash bin isn’t designed for composting. It usually lacks airflow and drainage, and a tight lid can trap moisture, create odors, attract rodents, and turn scraps into a slimy mess instead of healthy compost. If the bin is made from cheap or degraded plastic, it may also crack or be difficult to clean properly.
That said, a sturdy trash bin can sometimes be adapted as a small compost bin or collection bin if you manage it carefully. You’d need to drill ventilation holes, add drainage holes, keep a secure lid, layer food scraps with plenty of browns like dry leaves or shredded cardboard, turn or mix the contents regularly, and watch moisture closely. Avoid meat, dairy, oily foods, and pet waste unless your system is specifically designed to handle them. It’s also important to check local rules and get agreement from other community gardeners, since odors, pests, and mess can become shared problems.
For most community gardens, a dedicated compost bin, tumbler, or worm bin is a safer and more effective choice. Urban trash bins can be useful for collecting or transporting food scraps to the compost area, but I wouldn’t rely on a standard one as the main composting system unless it has been properly modified and is managed consistently.