Location-routing problem is a combination of facility location problem and vehicle routing problem. Numerous logistics problems have been extended to investigate greenhouse issues and costs related to the environmental impact of transportation activities. The green capacitated locating-routing problem (LRP) seeks to find the best places to establish facilities and simultaneously design routes to satisfy customers' stochastic demand with minimum total operating costs and total emitted carbon dioxide. In this paper, features that make the problem more practical are: considering time windows for customers and drivers, assuming city traffic congestion to calculate travel time along the edges, and dealing with capacitated warehouses and vehicles. The main novelty of this study is to combine the mentioned features and consider the problem closer to the real-world case uses. A mixed-integer programming model has been developed and scenario production method is used to solve this stochastic model. Since the problem belongs to the class of NP-hard problems, a combination of the progressive hedging algorithm (PHA) and genetic algorithm (GA) is considered to solve large-scale problems. It is the first time, as per our knowledge, that this combination is implemented on a green capacitated location routing problem (G-CLPR) and resulted in satisfactory solutions. Nondominating sorting genetic algorithm II (NSGA-II) and epsilon constraints methods are used to face with the bi-objective problem. Finally, sensitivity analysis is performed on the problem's input parameters and the efficiency of the proposed method is measured. Comparing the results of the proposed solution approach with those of the exact method indicates that the solution approach is computationally efficient in finding promising solutions.