01 -
Preheat oven to 350°F. Peel and slice potatoes to 1/8-inch thickness using a mandoline or sharp knife. Shred all cheeses and measure remaining ingredients.
02 -
In a large skillet over medium heat, cook diced bacon, stirring frequently, until crisp and deeply browned, about 7 to 10 minutes. Transfer bacon to a paper towel-lined plate, reserving 1 tablespoon bacon fat in the skillet.
03 -
Add sliced onions to the reserved bacon fat. Cook over low heat, stirring occasionally, until onions are well caramelized, deeply golden and jammy, about 30 to 40 minutes. Set aside.
04 -
In a medium saucepan, melt butter over medium heat. Whisk in flour and cook, stirring, for 1 minute until fragrant and lightly golden. Gradually whisk in warm milk and heavy cream. Cook, whisking constantly, until thickened, 3 to 5 minutes. Stir in 1/2 teaspoon salt and 1/4 teaspoon pepper. Remove from heat.
05 -
Lightly grease a 9x13-inch baking dish. Arrange one third of the potato slices in an even layer. Sprinkle with a pinch of salt and pepper. Top with one third each of caramelized onions, cheeses, and bacon. Repeat layers twice, seasoning each potato layer lightly and finishing with cheese and bacon on top.
06 -
Slowly pour the warm cream sauce evenly over the assembled potatoes, ensuring thorough coverage.
07 -
Cover dish tightly with aluminum foil and bake on the middle rack for 45 minutes. Uncover and continue baking until the potatoes are tender and the surface is golden-brown and bubbling, about 25 to 30 minutes more.
08 -
Remove from oven and let rest for at least 15 minutes to allow the layers to set. Garnish with fresh thyme leaves before serving, if desired.