Finely slice the onions and dice the pancetta. Add the pancetta to the pan and let it cook for 5 minutes. Then add the onions, cook for about 10 minutes. Add few cubes of butter and all the herbs. Deglaze with white wine and let it cook for 2 minutes.
Thinly slice the potatoes with a mandoline (the thinner level) and optionally cut every slice with a smaller circle, so that the potatoes will have the same cooking time and the shape of the gratin will be better.
Let's start layering all the ingredients. Grease a cast iron skillet with softened butter and then place a third of the potatoes, overlapping each other to fill the pan. Season the potatoes with salt and pepper and then half of the onions. Add the soft cheese and parmigiano reggiano and a little bit of heavy cream.
Repeat for at least three layers of potatoes. Shape the last level perfectly, season and put all the parmigiano on top. Cover everything with parchment paper and aluminum foil.
Bake it at 360F for 1 hour. Then remove the foil and bake once again at 430F for 30 minutes until a beautiful crunchy crust has formed.
Wait 10-20 minutes before serving.
