Composting should not smell bad; foul odors are typically indicative of an imbalance within the pile. A common cause of smelly compost is excess moisture, so your pile may need more brown material and better aeration.