In a food processor, grate the potatoes. Line a sieve or strainer with cheesecloth and transfer potatoes to the sieve. Set sieve over a bowl, twist cheesecloth into a pouch, squeezing out some moisture.
To the squeezed-out potatoes, add salt and pepper, onion, eggs, and flour (or matzo meal).