A brewing unit for a coffee machine has a brewingcylinder on a second end of which an end plate is pivotal betweena closed position and an open position. A piston is axiallymovable in the cylinder away from the first end of the cylinderpast the fill opening to compact coffee introduced through a fillopening at the second end in a brewing position and from thebrewing position toward the second end in the open position ofthe end plate into an eject position to eject the used groundcoffee from the brewing chamber. A pair of gear wheels flank thecylinder at the second end. Respective coupling plates eachhaving an inner end pivoted on a respective one of the wheels andan outer end pivoted on the end plate about an actuating axis. Adrive synchronously rotates both wheels.