Make sure they're not bruised and they can't be resting against each other. Think like eggs are packed not potatoes in a sack.
Cool dry place. 6 months unless they're a sweet variety.
Or slice em and dehydrate them. They're very good at dehydrating in dishes.
Personally I hate onions.