We’ll start by caramelizing the onions. You’ll want to use a relatively large stainless-steel pan for this (12 inches works best), so the onions have plenty of room to work their magic. Heat the oil in the pan over medium-high heat. Once the oil begins to glisten, add the onions and salt. Cook the onions for about 3 minutes without stirring. At this point, they will have begun to soften. Stir the onions well, then cook for another 3 minutes undisturbed. Continue doing this until all the onions have developed colour, about 20 minutes.
Add the brown sugar, both vinegars, the dried thyme, chilli flakes, and pepper, turn the heat down to low and cook for an additional 35–40 minutes, or until the onions have turned a deep brown, occasionally stirring to ensure they don’t burn.
Taste the chutney and adjust the seasoning, adding more salt or pepper if needed. Keep in mind that the chutney will continue to thicken as it cools.
Remove the chutney from the heat and cool to room temperature.
Transfer the chutney to sterilized jars or airtight containers. Seal the containers and store them in the refrigerator. Enjoy!