For the filling

For the dough

2 lb. (7 cups) unbleached all-purpose flour; more as needed

4 oz. (1/2 cup) unsalted butter, softened

2 cups warm water

Make the filling

Put the mushrooms in a small saucepan with 2 cups water and a pinch of salt; bring to a boil over medium-high heat. Lower the heat to maintain a simmer and cook the mushrooms until tender, about 15 minutes. Using a slotted spoon, lift the mushrooms out of the liquid, transfer to a cutting board, and chop them. Strain the liquid though a fine sieve lined with a damp paper towel set over a small bowl. Rinse and drain the sauerkraut in a colander, pressing on it to release as much liquid as possible.

Melt 1 Tbs. of the butter in a 12-inch skillet over medium-high heat. Add the onion and cook, stirring often, until golden, 3 to 4 minutes. Add the sauerkraut, mushrooms, and the mushroom cooking liquid. Lower the heat to medium and cook, stirring often, until the liquid has evaporated and the sauerkraut is dry, about 5 minutes. Season to taste with salt and pepper. Stir in the remaining 1 Tbs. butter and cook, stirring often, until the flavors are blended, about 2 minutes more. Let cool to room temperature before using.

Make the dough

Put the flour in a large bowl. Add the butter and, using your fingers, work it into the flour until the mixture has the texture of coarse meal. Still using your fingers, add 1-3/4 cups of the warm water, stirring until the mixture begins to come together. If the mixture is dry, you can add up to 1/4 cup more warm water, a tablespoon at a time, until it forms a cohesive yet shaggy mass. Turn the dough out onto a well-floured work surface, and then gently knead it just until soft and elastic; the dough will not be completely smooth, but it should be easy to shape, with a Play-Doh like consistency. Avoid overkneading, or the dough will become tough. (At this point you can proceed with the recipe or let the dough rest on a floured surface, covered with a clean dishtowel, for up to 1 hour.)

Roll and cut the dough

Divide the dough into 6 grapefruit-size balls (about 8 oz. each). Working with 1 piece of dough at a time on a floured work surface, and keeping the others covered so they don’t dry out, roll the dough into a 10- to 11-inch wide, 1/8-inch-thick circle. Using a floured 3-inch round cookie cutter or inverted glass, cut out circles of dough. Transfer the dough circles to a large parchment-lined baking sheet dusted with flour. Dust with a little more flour and top with another sheet of parchment so they don’t dry out. Repeat with the remaining dough, stacking the circles between sheets of floured parchment and re-rolling the scraps until all of the dough is used.

Fill the dough

Working with 1 dough circle at a time, brush off any excess flour and hold the circle in your palm. Spoon a scant 1 Tbs. of the filling into the center of the circle and fold it in half. Using your fingers, tightly pinch the edges together to seal and create a 1/2-inch border. Arrange the filled pierogi on a lightly floured surface or large rimmed baking sheet and dust very lightly with flour; loosely cover with plastic wrap or a clean dishtowel. Repeat with the remaining dough circles and filling.

Cook the pierogi

Position a rack in the center of the oven and heat the oven to 175°F. Bring a 6- to 8-quart pot of salted water to a boil over high heat. Working in batches of 10 to 12, drop the pierogi into the boiling water and give them a gentle stir so they don’t stick together or to the sides of the pot. When they float to the top 5 (after 1 to 2 minutes for room temperature pierogi, 3 to 4 minutes for refrigerated, and 7 to 10 minutes for frozen), use a slotted spoon to transfer them to a platter and keep warm in the oven while cooking the remaining batches.

Serve the pierogi

You can serve the pierogi either boiled or fried. For boiled pierogi, melt the butter in a 1- to 2-quart saucepan. Drizzle the pierogi with the melted butter. Serve hot with the sour cream on the side. For fried pierogi, melt 4 Tbs. of the butter in a 12-inch heavy-duty skillet over medium-high heat. Working in batches of 10 to 12, cook the boiled pierogi, flipping once, until golden-brown and crusty on both sides, 4 to 5 minutes per batch. Transfer to another platter and keep warm in the oven. Repeat, adding more butter as needed. Serve the pierogi with sour cream on the side.

Make Ahead Tips

The filling can be made up to 2 days ahead; cover and refrigerate. Filled pierogi can be covered and refrigerated for up to 2 hours before cooking, or frozen for up to 6 months—freeze in one layer on a parchment-lined tray, then transfer to freezer bags.