Honestly, I wouldn’t use a standard urban trash bin as my first choice for composting food waste in a city garden. It can work as a rough DIY compost bin if you modify it carefully, but most ordinary trash bins are designed to keep waste contained, not to support healthy airflow, drainage, and decomposition. In a city garden, that difference matters a lot.
The biggest issue is compost bin ventilation. Food waste composting needs oxygen, and a sealed trash bin can quickly turn smelly, slimy, and anaerobic. If you want to try it, drill small holes around the sides and near the top, and add drainage holes at the bottom. Keep the lid on to deter pests and rain, but turn or aerate the contents regularly. Add plenty of dry brown material, such as shredded cardboard, dry leaves, or sawdust, to balance the wet food scraps.
You also need to think about contamination. Public urban trash bins are not appropriate to take over for city garden composting. They may contain glass, plastic, chemicals, or other mixed waste, and in many places it is not legal to remove or repurpose them. Even an old home bin should be cleaned well and never used if it previously held paint, solvents, or other chemicals.
For food waste composting in a small city garden, dedicated compost bins, worm farms, or bokashi systems are usually safer and easier to manage. Avoid putting meat, dairy, oily food, and pet waste into a simple bin setup, because those can attract rats and create odors. Before you start, check local composting rules with your city or community garden group, since some places have specific requirements about bin type, placement, and pests.
So, yes, an urban trash bin can be adapted for composting in a limited DIY way, but it is not the best or safest option by default. Use a dedicated system if you can, modify any bin carefully, and keep the pile balanced, aerated, and pest-free.