Having a place you can legally install panels is for the upper class. Do you own a house?
Never owned a place, had solar panels installed in the last three places I lived in, the first two were apartments, currently renting a house. None of the owners had problems with us installing solar panels.
https://www.dw.com/en/boom-small-solar-devices-plugged-into-...
Owning a house does not require belonging to the "upper class" in Europe.