A water purification apparatus comprising: a RO-device comprising a RO-membrane, wherein the RO-device is configured to receive inlet water to be purified from an inlet path, and produce permeate water into a permeate path and reject water into a reject path, a recirculation path arranged to recirculate reject water from the reject path to the inlet water, a waste path arranged to pass reject water from the reject path to a drain; a cooling arrangement comprising a cooling device (31, 39), wherein the cooling arrangement is configured to cool the recirculating reject water in the recirculation path with the cooling device (31, 39); a feed pump arranged to receive the inlet water via the inlet path and to pump feed water via a feed path to an inlet of the RO-device; a permeate recirculation path fluidly connecting the permeate path at a recirculation point, and the inlet path; a control device arranged to the permeate recirculation path to control the flow in the permeate recirculation path; a heater arranged to heat permeate water in the permeate path upstream the recirculation point; a permeate valve arranged to the permeate path and arranged to control the flow in the permeate path between an open state and a closed state, wherein the recirculation point is is located upstream the permeate valve; an inlet valve arranged to the inlet path and arranged to control the flow in the inlet path between an open state and a closed state; a drain valve arranged to the waste path; a sensor (7, 8, 18, 28) configured to measure a property indicative of a temperature of the RO-membrane; a control arrangement configured to control the apparatus to perform heat disinfection of the RO-membrane by means of permeate water heated by the heater, wherein the heat disinfection includes passing the heated permeate water via the permeate recirculation path through the RO-membrane; and control the cooling arrangement to cool the recirculating reject water in the recirculation path in order to cool the RO-membrane to achieve a desired temperature of the RO-membrane based on the measured property indicative of a temperature of the RO-membrane after the heat disinfection of the RO-membrane is completed, wherein the control arrangement is configured to prevent fresh inlet water to reach the RO-device, using the inlet valve; prevent permeate water from being passed from the apparatus, using the permeate valve; and to prevent reject water from being passed to drain, using the drain valve, during the heat disinfection and cooling of the RO-membrane. a RO-device comprising a RO-membrane, wherein the RO-device is configured to receive inlet water to be purified from an inlet path, and produce permeate water into a permeate path and reject water into a reject path, a recirculation path arranged to recirculate reject water from the reject path to the inlet water, a waste path arranged to pass reject water from the reject path to a drain; a cooling arrangement comprising a cooling device (31, 39), wherein the cooling arrangement is configured to cool the recirculating reject water in the recirculation path with the cooling device (31, 39); a feed pump arranged to receive the inlet water via the inlet path and to pump feed water via a feed path to an inlet of the RO-device; a permeate recirculation path fluidly connecting the permeate path at a recirculation point, and the inlet path; a control device arranged to the permeate recirculation path to control the flow in the permeate recirculation path; a heater arranged to heat permeate water in the permeate path upstream the recirculation point; a permeate valve arranged to the permeate path and arranged to control the flow in the permeate path between an open state and a closed state, wherein the recirculation point is is located upstream the permeate valve; an inlet valve arranged to the inlet path and arranged to control the flow in the inlet path between an open state and a closed state; a drain valve arranged to the waste path; a sensor (7, 8, 18, 28) configured to measure a property indicative of a temperature of the RO-membrane; a control arrangement configured to control the apparatus to perform heat disinfection of the RO-membrane by means of permeate water heated by the heater, wherein the heat disinfection includes passing the heated permeate water via the permeate recirculation path through the RO-membrane; and control the cooling arrangement to cool the recirculating reject water in the recirculation path in order to cool the RO-membrane to achieve a desired temperature of the RO-membrane based on the measured property indicative of a temperature of the RO-membrane after the heat disinfection of the RO-membrane is completed, wherein the control arrangement is configured to prevent fresh inlet water to reach the RO-device, using the inlet valve; prevent permeate water from being passed from the apparatus, using the permeate valve; and to prevent reject water from being passed to drain, using the drain valve, during the heat disinfection and cooling of the RO-membrane.