To more easily peel the onions: Trim the ends off of each onion and place them in a heat-proof bowl. Pour boiling water over them and let them sit for a minute. Then drain, rinse with cold water and remove the peels. Place the peeled onions in a bowl, sprinkle with the salt and toss to distribute the salt. Cover with a towel or loosely with plastic wrap and let them sit at room temp overnight. Don't let them sit longer than 14 hours or so or the amount of "crunch" will be compromised. Rinse well and drain thoroughly.
To make the brine: Place all remaining ingredients in a medium saucepan and bring to a boil until the sugar is dissolved.
While the brine is simmering, pack the onions into sterilized mason/Kilner jars (plan on using either 4 pint sized jars or 2 quart sized jars). Pour the hot brine over the onions (I pour it through a sieve to collect the spices) and then distribute the spices among the jars. Stick a butter knife or other long object down into the jars to ensure there are no air bubbles. Wipe the jar rims down with a clean, damp cloth. Place the canning lids on the jars (or rubber rings if using) and screw/snap shut while hot to create a vacuum seal. Let the onions cool and then place them somewhere at room temp to mature for at least 3-4 weeks before eating, preferably 6-8 weeks for best flavor. Once opened store them in the fridge where they will keep for 3+ months.
If canning the onions via boiling water bath for long-term storage (note: they will lost much of their crunchiness): Pack the jars as described above and wipe the rims. Stick a butter knife or other long object down into the jars to ensure there are no air bubbles. Place the lids on the jars and screw them on. Process them in a boiling water bath canner. For pint-sized jars in altitudes up to 1000 ft, process for 10 minutes (see chart in blog post for higher altitudes).Remove the jars from the canner and let them sit undisturbed for 24 hours. Check to make sure the lids are airtight. Then store them in a cool, dark place where they will keep for up to a year. Once opened store them in the fridge where they will keep for 3+ months.
For those interested in canning them via the water bath method for long-term storage, note that there's a significant tradeoff: They will store longer, yes. But they will also lose a lot of their "crunch", which is a huge part of their enjoyability. For the best results simply pack the onions in jars and pour the hot vinegar over them; the heat from the vinegar is usually sufficient to create a vacuum as it cools seal the lids (a seal adequate for a few weeks' storage at room temp during the maturation period while the flavors are developing). At the conclusion of the maturation period and once opened, store them in the fridge where they will keep for 3+ months.