A capsule (100) filling machine (1) comprising a transfer turret (2) arranged to transfer the capsules (100) through successive operating stations, including at least one dosing station (3) arranged to fill capsule bodies (101) of the capsules (100) with a product (P) and comprising a dosing turret (5) and a first dosing unit (10) mounted on the dosing turret (5) the first dosing unit (10) comprises a dosing cylinder (12) and a piston (13) movable within the dosing cylinder (12) at least between a first internal position (D), wherein it forms within the dosing cylinder (12), a dosing chamber (15) for holding a product dose (P1), and an ejection position (E) to push the product dose (P1) out of the dosing cylinder (12) to a respective capsule body (101) the machine (1) includes a first electrical linear actuator (6) associated with the dosing turret (5) and suitable for moving the piston (13) of the first dosing unit (10) between said first internal position (D) and said ejection position (E).