Boil the potatoes, but make sure not to make them to soft.
Let the potatoes cool down a bit.
Cut the potatoes in slices.
Peel and cut the onion in slices.
Preheat the oven at 220 degrees Celsius.
Place a layer of potatoes, onion slices and some bacon in an oven form.
Sprinkle some salt and pepper on top.
Continue until the potatoes are all used.
Pour evenly the heavy cream over the gratin.
Divide the cheese in 2 so you have 2 lids. Place them over the gratin.
Place in the middle of the oven for 30 minutes.
Take out and let rest 10 minutes before serving.