Put cranberries in a heatproof bowl. Cover with boiling water and stand for 10 minutes to soften. Drain, reserving 1 cup of the liquid.
Combine the chillies and onion in a food processor. Process until finely chopped. Transfer to a medium, heavy-based saucepan. Add the cranberries, sugar, salt, vinegar, port and the reserved cranberry liquid. Stir over a medium heat until the sugar dissolves.
Increase the heat to medium-high and boil gently for 30-40 minutes, or until thick and jam-like. Spoon immediately into a clean, dry jar. Seal and turn the jar upside down for 2 minutes. Turn the right way up and set aside to cool.