The residential sector plays an important role to mitigate climate change due to its high energy consumption. Polygeneration systems are a suitable alternative enabling efficient use of natural resources with low environmental impact. However, their deployment depends, among other factors, on the economic cost and the legal restrictions. This work analyses the potential reduction of greenhouse gases emissions, expressed in CO 2 -equivalent emissions CO 2 eq , in residential buildings installing polygeneration systems and considering the current Spanish self-consumption regulation. This is achieved through a multiobjective optimization, applying a Mixed Integer Linear Programming model, considering economic, environmental and legal aspects. Obtained results provide interesting replicable lessons, and show the interest of collective installations, in which remarkable CO 2 eq emissions reductions, above 65% with respect to conventional systems, can be achieved at an affordable cost. Technologies such as photovoltaic, reversible heat pumps, biomass and thermal energy storage are competitive when properly integrated. Furthermore, the sale of renewable electricity to the grid under a net-billing scheme, with suitable electricity sale prices, is an appropriate approach, aligned with the European climate and energy policy. Nevertheless, the current Spanish self-consumption regulation is mostly appropriate for small-medium size residential buildings.