It is crucial that the energy transition enfolds democratically, to increase its legitimacy and improve its outcomes. Although practitioners and scholars increasingly point to renewable energy communities (RECs) as legitimate agents for governing a democratic energy transition, RECs' democratic practices are poorly understood, which challenges assumptions about their legitimacy. We therefore analyzed how and to what extent democratic legitimacy is being pursued and met by RECs in their governance of renewable energy generation projects. Our comparative case study examined four different RECs in Utrecht, The Netherlands. We found that three out of the four studied RECs broadly meet the principles of energy democracy in the initial, developing and implementation phase of their energy generation projects. Significant differences between principles and RECs were found, which refutes the simplistic general assumption that RECs are either fully democratically legitimate or are not democratically legitimate at all. In reality, RECs face several trade-offs between democratic principles, which arise from the different legitimacy needs related to the REC's stage of maturity and the type of energy source it uses. To overcome these trade-offs and uphold legitimacy internally as well as with various stakeholders, RECs strategically organize participation and decision making in different governance spaces and prioritize certain specific legitimacy principles over others. Combining the concepts of energy democracy and democratic legitimacy has brought novel theoretical insights to the fore, and we recommend other researchers to further bridge these distinct but related fields of study.