As a low-cost green technology, solar steam generation using nanostructured photothermal materials has been drawing increasing attention in various applications, e.g. seawater desalination, and zero liquid discharge of industrial wastewater. However, the crystallisation of salts on the surface of photothermal materials during steam generation leads to a gradual decline in the water evaporation rate. Herein, this challenge was overcome by a novel design involving controlled water transport, edge-preferential crystallisation and gravity-assisted salt harvesting. The crystallisation sites of the salt were spatially isolated from the water evaporation surface, achieving continuous steam generation and salt harvesting in over 600 hours of non-stop operation. The study provides new insights into the design of solar steam generators and advances their applications in sustainable seawater desalination and wastewater management.