The revised Renewable Energy Directive (2018/2001/EU) contains definitions on Renewable Energy Communities (RECs) and renewables self-consumers. It entered into force in December 2018.
The directive is accessible under: https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:32018L2001&from=EN