The oven is a real answer, up to a point
We build drum roasters, so it would be convenient to tell you the oven is hopeless. It is not. For a cup or two of nuts, roasted properly and eaten within a few days, an oven produces genuinely good results and costs you nothing. Plenty of excellent roasted nuts have come out of home ovens and always will.
What follows is how to do it well, and then the four places it stops being enough. Both halves are honest.
The method
One nut, one form, one layer
Do not mix types and do not mix forms. Pecan halves and pecan pieces finish at different times, and almonds and cashews finish at different times by a wide margin. A mixed tray guarantees that something on it is wrong.
Use a heavy rimmed sheet and spread the nuts in a single layer. They can touch. They must not stack. Two layers deep and the bottom layer roasts by conduction off the hot pan while the top layer sits in air, and you have built unevenness into the batch before you start. A standard home sheet pan holds roughly a pound in a single layer — considerably less for peanuts in the shell, which are mostly air.
300-350°F, and lower than you think
The bottom of that range for thin, oily nuts — pecans, and walnuts, which have very little margin. The top of it for dense almonds and for shelled peanuts. Above 350°F you are trading control for speed on a product that gives you no warning, which is a poor trade.
Lower and longer genuinely beats hotter and shorter in an oven, for one specific reason covered below: an oven cannot back off quickly, so your only real defence against overshoot is not being close to it in the first place.
Middle rack, and learn your hot spot
Every oven has one and yours is not the same as anyone else's. It will show as a band of darker nuts in the same place every time. Once you know where it is, rotate the pan halfway through and it stops mattering.
Convection, if you have it
Use it, drop the temperature by around 25°F, and expect the roast to finish sooner. Moving air is more even than still air, which is a real gain. It also browns faster, so the last minutes get tighter rather than more relaxed. Do not use convection and the same temperature and the same timer as your still-air notes.
Stir every three or four minutes
With a spatula, dragging from the edges inward and turning the nuts over. The edges of a sheet pan run ahead of the middle, so the stir is not decoration. Three or four stirs across a fifteen-minute roast is about right, and the last one should be quick.
Watch the last few minutes through the glass
Not with the door open. Opening the oven dumps heat, the thermostat then overshoots bringing it back, and the swing lands on nuts that are already in their most sensitive stretch. Watch colour through the glass and use your nose — most nuts announce themselves aromatically shortly before they are done, and when the smell sharpens from rich toward acrid you are already past.
Get them off the pan immediately
This is the oven-specific step people skip. The sheet pan is a large piece of hot metal in direct contact with the nuts, and it will keep roasting them on the counter for several minutes. Slide the batch straight onto a cold tray or a cooling rack with air moving under it. Everything in cooling roasted nuts applies here and applies harder, because you have added a hot pan to the stored heat in the nuts themselves.