Do I need a building permit to install solar panels?
No, normally no building permit is needed to install the solar panels themselves in Spain. If it should be required that you build to a stationary foundation to attach the solar panels to, a building permit may be required.