Preheat the oven to 400°F and let it fully heat while you prepare the potatoes.
Thinly slice 2 pounds of Russet potatoes into ⅛-inch slices. A mandoline helps create even slices, but a sharp knife works well too.
Use some of the butter to coat the bottom and sides of a 9 × 13-inch baking dish.
Melt the remaining butter in a saucepan over medium heat. Whisk in the flour until smooth, then slowly add the milk while whisking. Cook until the sauce thickens, then stir in the shredded cheddar until melted and smooth.
Add a layer of potatoes to the prepared dish. Season with salt and pepper, then add some onion and cheese sauce. Repeat the layers until all the ingredients are used, finishing with cheese sauce on top.
Cover the dish with foil and bake at 400°F for about 1 hour, or until the potatoes are tender and the sauce is bubbling. Remove the foil, then broil briefly until the cheese is golden and lightly browned.
Remove the dish from the oven and let it rest for about 10 minutes. This allows the sauce to thicken and the layers to settle.
Sprinkle chopped fresh chives over the top and serve the potatoes warm.