Combine flour and salt in a bowl
Add eggs, sour cream, and water
Mix until a dough forms
Knead the dough until smooth
Cover and let the dough rest
Boil potatoes until tender
Mash the potatoes
Mix potatoes with cheese, onion, salt, and pepper
Roll out the dough on a floured surface
Cut the dough into circles
Place filling in the center of each circle
Fold the dough over the filling
Pinch the edges to seal
Boil the pierogies in salted water until they float
Remove and drain the pierogies
Pan-fry in butter until golden if desired
