Position a rack in the lower half of the oven and preheat to 400 degrees . Mash the butter, thyme and 1/2 teaspoon each salt and pepper. Place the turkey in a roasting pan and fold in the wingtips.
Using your fingers, loosen the skin at the neck end. Grasp the skin with one hand and work in your other hand to loosen the skin down to the thighs and legs.
Spread the butter mixture under the skin, then, working with your hands on top of the skin, spread the butter evenly all over the meat. Season the bird with salt and pepper.
Place the onion inside the cavity, then tie the legs together using kitchen string.
Roast the turkey until it registers 170 degrees on an instant-read thermometer, about 2 1/2 hours; cover with foil during the last hour to prevent the skin from browning too quickly. Let rest for 20 minutes before carving.