In bioenergy systems, water resources play a critical role in biomass production, infrastructure construction, cooling processes, and energy generation. The current study conducts a wastewater-based biofuel supply chain (SC) based on second-and third-generation feedstock to preserve food safety and freshwater limitation. In addition, we implement a prephase to find potential locations of cultivation lands and breeding ponds under the intuitive uncertainty of expert preferences in the fuzzy formulation. The study addresses potential operational risks in the SC by employing a flexible, robust optimization model capable of adapting uncertainty sets with adjustable boundaries for each specific uncertainty. The results show a higher reliance on the production of energy from microalgae. The proposed robust approach reduces conservatism while maintaining robustness compared to classical models. The separate analysis of uncertain parameters reveals that the cultivation rate parameter has a greater impact than the climate change factor when both are fixed at a 75% confidence level.