Rinse the cranberries and discard any soft or damaged berries. Measure the sugar, port, water, orange juice, star anise, cinnamon stick, and salt so everything is ready to add to the saucepan.
Combine the sugar, port, water, orange juice, star anise, cinnamon stick, and salt in a medium saucepan over medium heat. Stir until the sugar dissolves and the mixture comes to a gentle simmer.
Add the cranberries to the saucepan and stir to coat them in the hot liquid. Return the mixture to a steady simmer.
Cook the sauce for 12 to 15 minutes, stirring occasionally, until most of the cranberries have burst and the liquid has thickened slightly. If you like a softer texture, press a few berries against the side of the pan with a spoon during the last few minutes of cooking.
Remove the saucepan from the heat and let the sauce stand for 10 minutes so the spices continue to infuse gently. Remove and discard the star anise pods and cinnamon stick.
Transfer the cranberry sauce to a heatproof bowl or serving dish. Cool for about 30 minutes at room temperature, then refrigerate for 30 minutes to thicken further before serving.
Stir the sauce once more before serving. Serve chilled or let it sit at room temperature for 15 to 20 minutes for a slightly softer consistency.