The production for self-consumption presupposes an administrative procedure with the Directorate-General for Energy and Geology prior to the beginning of the activity, whose requirements depend on the installed capacity of the UAC.
You should consult the market in order to find the most financially advantageous offer for your installation.
You can see more about this subject in our article on self-consumption and also in DL no. 162/2019, of 25 October.