Pumpkin wash, clean, quarter and remove seeds. Cut pumpkin into small cubes. Peel onions and ginger. Onions in fine columns cut, ginger finely dice. Thyme wash, dab dry, pluck leaves from the stalks.
Pumpkin, onions, ginger, sugar, vinegar, 250 ml water, thyme, peppercorns, chili flakes and 1 teaspoon salt in a pot. Bring to the boil while stirring, cover and simmer over low heat for about 1 hour. Stir in between.
When the pumpkin is soft and the mixture is boiled down thickly, season with salt and pepper. Pour hot into glasses, seal them airtight and store in a cool place.