Today, the use of electrical energy storage has a significant role in flatting the load curve, peak shaving, increasing reliability and also increasing the penetration of distributed generation, reducing carbon emissions, and reducing network losses. In this article, a three-echelon power supply chain is investigated considering energy storage as a new level in the power supply chain. The model in this article is an integrated model of locating and capacity planning of distributed energy storage with the aim of maximizing profit and reliability, which is modeled with two different approaches. The first model is modeled from the point of view of the distribution network as the owner of the energy storage and the second model is modeled from the perspective of the electricity subscribers as the owner of the energy storage. Finally, the model is solved by GAMS software and the results of sensitivity analysis are presented. According to the obtained results, the presented model is the most sensitive to the changes in demand and production, and the owners of energy storage should be sensitive to the changes in production and demand in different seasons of the year in order to get the maximum profit.