Electric power shortage is a serious problem in remote rural communities in Egypt. Over the past few years, electrification of remote communities including efficient on-site energy resources utilization has achieved high progress. Remote communities usually depend on diesel generator (DG) networks to supply the community with reliable energy and fresh water. The main objective of this paper is to design an optimal economic power supply from a hybrid standalone energy system (HSES). The system is intended to cover the energy required for a desalination unit (DU) installed in a farm in Noubarya, Egypt. The proposed system consists of PV panels, wind turbines (WT), batteries, and DG. DU load is about 105.6 kWh/day rated power with 6.6 kW peak load operating 16 h a day. The objective of system optimization is to reach the suitable size of each component and the control strategy that provide reliable, efficient, and cost effective system using net present cost (NPC) as a criterion. The harmonization of different energy sources, energy storage and load requirements is a challenging task. Thus, the performance of various possible configurations is investigated, using iHOGA software that is based on genetic algorithm (GA). In this study the achieved optimum configuration is further improved by adapting the daily load pattern to the periods of high renewable generated energy to increase direct energy utilization rather than charging batteries. This will result in effective minimization of battery bank size.