Given the recent surge of interest towards utilization of renewable distributed energy resources (DER), in particular in remote areas, this paper aims at designing an optimal hybrid system in order to supply loads of a village located in Esfarayen, North Khorasan, Iran. This paper illustrates the optimal design procedure of a standalone hybrid system which consists of Wind Turbine Generator (WTG), Photo Voltaic (PV), Diesel-generator, and Battery denoting as the Energy Storage System (ESS). The WTGs and PVs are considered as the main producers since the site's ambient conditions are suitable for such producers. Moreover, batteries are employed to smooth out the variable outputs of these renewable resources. To this end, whenever the available power generation is higher than the demanded amount, the excess energy will be stored in ESS to be injected into the system in the time of insufficient power generation. Since the standalone system is assumed to have no connection to the upstream network, it must be able to supply the loads without any load curtailment. In this regard, a Diesel-Generator can also be integrated to achieve zero loss of load. The optimal hybrid system design problem is a discrete optimization problem that is solved, here, by means of a recently-introduced meta-heuristic optimization algorithm known as Lightning Attachment Procedure Optimization (LAPO). The results are compared to those of some other methods and discussed in detail. The results also show that the total cost of the designed stand-alone system in 25 years is around 92M€ which is much less than the grid-connected system with the total cost of 205M€. In summary, the obtained simulation results demonstrate the effectiveness of the utilized optimization algorithm in finding the best results, and the designed hybrid system in serving the remote loads.