1. In a mixing bowl, combine flour and salt. Gradually add warm water, mixing until a dough forms. Knead the dough for about 5 minutes, then cover and let it rest for 30 minutes.
2. While the dough rests, prepare the filling. In a skillet, melt butter over medium heat and sauté the chopped onion until translucent.
3. In a bowl, combine the mashed potatoes, shredded cheese, and sautéed onions. Mix well.
4. Roll out the dough on a floured surface to about ⅛ inch thickness. Cut circles using a glass or cookie cutter.
5. Place a spoonful of filling in the center of each circle. Fold the dough over and seal the edges by pressing with a fork.
6. Bring a large pot of salted water to a boil. Cook the perogies in batches until they float to the top, about 3-4 minutes. Remove with a slotted spoon.
7. Optional: Fry the boiled perogies in a skillet with some butter until golden brown on both sides.