Place the capon, breast-side up, in a large roasting pan and pat the outside dry with paper towels. Sprinkle the cavity generously with salt and pepper. Place the lemons and thyme inside the cavity. Tie the legs together with kitchen string and tuck the wings under the body. Brush the capon with half of the melted butter, then sprinkle with 1 tablespoon salt and 1 teaspoon pepper. Place the onions around the capon, pour the rest of the melted butter over the onions and sprinkle the onions with 1 1/2 teaspoons salt and 1/2 teaspoon pepper. Place the capon in the oven and roast for 1 1/2 hours, until the juices run clear when you cut between the leg and the thigh.
Remove the capon from the oven and cover the pan with aluminum foil. Allow the capon to rest for 20 minutes, then carve it and serve warm with the onions.