You can produce the most sustainable detergent with chestnuts yourself. Because they are 100% natural, they pollute neither the sewage nor the environment with (chemical) additives. Besides, the local trees with the chestnuts are right in front of my door and in contrary to conventional detergents they do not have to be produced or delivered. And a nice side effect is that I can spend time outside.
Chestnuts contain saponins, a saponaceous material that foams and cleans. Per washing cycle you need approx. 5-7 chestnuts, which you first chop and then pour over with hot water. I use approx. 300 ml of hot water from the tab. You can observe the reaction immediately; the liquid turns milky, because the saponins dissolve from the chestnut. Usually, I start the brew in the morning before work, because it should steep a couple of hours. Thus, I can wash in the evening. I prefer my laundry scentless, but you can also add natural fragrance oil or organic orange peels in a bag.