The transition towards zero and net-zero buildings necessitates identifying sustainable and effective renewable energy systems to reduce the impacts of operational energy. This study analyses the environmental impacts of multiple microgrids that consist of a photovoltaic plant and a hybrid hydrogen/battery energy storage system in a grid-connected building. To this end, a three-step simulation process was proposed. The first step involved modelling th. The transition towards zero and net-zero buildings necessitates identifying sustainable and effective renewable energy systems to reduce the impacts of operational energy. This study analyses the environmental impacts of multiple microgrids that consist of a photovoltaic plant and a hybrid hydrogen/battery energy storage system in a grid-connected building. To this end, a three-step simulation process was proposed. The first step involved modelling the energy consumption of the building during operation. Following that, the size of components was optimised. Lastly, a comparative life cycle assessment was conducted to evaluate different self-sufficient ratios (SSR). The results show that as SSR increase, the optimised capacities of all components generally increase, although this relationship is complex, particularly as the system approaches full renewable capacity. The climate change impact initially decreases to its lowest values but then increase again towards achieving full self-sufficiency. Furthermore, the results highlight the importance of considering multiple environmental impact categories when designing renewable energy systems. A sensitivity analysis reveals that countries with carbon-intensive electricity grids can reduce climate change impacts by increasing their renewable energy penetration. However, for countries with a high proportion of renewable energy, a higher SSR may not lead to a lower climate change impact but rather exacerbate it.••A three-step simulation process to analyse environmental impacts of micro-grids.••Optimisation of capacity and load coverage breakdown for different SSRs.••Conducting multiple LCAs under various SSRs with different optimised components.••Sensitivity analysis to investigate potential impact of different grid mixes.Life cycle analysisBuilding energyRenewable energy systemOptimal sizingEnergy storage systemHydrogenEBt energy stored in the BESS at time tEHt energy stored in the HESS at time tPB_charget charge power of BESS at time tPB_discharget discharge power of BESS at time tPH_charget charge power of HESS at time tPH_discharget In recent years, climate change and global warming have emerged as critical global issues. The building sector is a major contributor to the total energy consumption (35 %) and global energy emissions (38 %). To address this problem, the concept of “zero energy” and “net-zero energy” buildings has been introduced. A net-zero energy building (NZEB) produces as much energy as it consumes over a year, while a zero energy building (ZEB) goes a step further and consumes zero energy from external sources on an annual basis. The integration of solar and wind energy into building design can facilitate the construction of ZEBs or NZEBs, thereby reducing reliance on the grid. Although the costs of these technologies have decreased dramatically over the past few years, one of the main challenges of renewable energy is its intermittency, which leads to a mismatch between energy supply and demand [4,5]. Therefore, an energy storage system (ESS) is essential to achieve a reliable and stable energy supply [6,7]. Storage capacity and discharge time are two main characteristics of energy storage technologies. Batteries are the most well-known electrochemical energy storage devices and have been widely used in transportation, electronics, and power grid applications. As a mature technology, the battery energy storage system (BESS) is flexible, reliable, economical, and responsive for storing energy [8,9]. However, with the increasing penetration of renewable energy and the gradual phase-out of grid.