Legalising solar panels in Spain involves more than installing the modules and switching on the inverter. A grid-connected system in Andalusia needs the correct self-consumption category, technical documentation, a CIE electrical certificate, regional commissioning and—where electricity is exported—activation with both the distribution company and the electricity retailer.
The key distinction is simple: a genuinely **off-grid solar system in Spain** has no physical grid connection, so it has no CAU, grid-access contract or surplus-export contract. A house that remains grid-connected still follows the RD 244/2019 self-consumption process, even when batteries and EPS allow it to run autonomously most of the time.
## The four legal routes
- **Grid-connected without export:** an anti-export device prevents electricity entering the grid.
- **Grid-connected with simplified surplus compensation:** exported kWh reduce the monthly energy charge.
- **Grid-connected with direct surplus sale:** the owner acts as a producer and sells through the electricity market.
- **Genuinely off-grid:** panels, inverter, batteries and optional generator supply the property without a grid connection.
## Solar panel legalisation step by step
### 1. Planning and system classification
The roof or land, installed power, cadastral reference and local planning requirements are checked first. A local declaration, building licence or tax payment may apply, especially on rural land.
### 2. Technical memorandum or engineering project
A low-voltage system up to 10 kW normally uses a technical design memorandum. Above 10 kW an engineering project and completion certificate are generally required. The file includes single-line diagrams, inverter and panel power, protection devices, batteries and anti-export equipment where fitted.
### 3. Installation and CIE certificate
An authorised installer tests the system and issues the Certificado de Instalación Eléctrica, or CIE. This proves compliance with Spain’s low-voltage electrical rules.
### 4. CAU for grid-connected systems
The distribution company issues the unique Código de Autoconsumo (CAU). It identifies the generation system and supply point. The distributor owns the local network and meter; the retailer is the company chosen by the customer to issue bills. Off-grid systems do not require a CAU.
### 5. Andalusian commissioning
The file is submitted to the Junta de Andalucía, normally through PUES. Registration produces the validated CIE and registration number. Some small isolated systems may use the TECI route. The regional authority communicates grid-connected registrations to the distributor.
### 6. Distributor and retailer processing
The distributor passes the self-consumption data to the retailer, or the retailer can initiate the contracting route directly for many low-voltage systems below 100 kW. The customer must check the CUPS, CAU, power and category. A mismatch is one of the main causes of delay.
### 7. Solar export and compensation contract
To receive surplus compensation, the retailer records the self-consumption category and agreed export price. It then asks the distributor to modify the grid-access contract. Customers can usually remain with their existing retailer, but should compare export price, import tariff, fixed charges and virtual-battery conditions.
Collective self-consumption also requires an allocation agreement between participants and the relevant compensation agreement. Production is divided using agreed coefficients and the required shared-generation meter.
## How surplus compensation works
A bidirectional meter records grid imports and solar exports separately. During each billing period, usually one month, the retailer multiplies exported kWh by the agreed compensation rate and deducts the amount from the imported-energy charge.
Under simplified compensation, the credit cannot exceed the financial value of electricity bought from the grid during the same period. Fixed charges, contracted capacity, meter rental and taxes remain payable. A “virtual battery” is a separate commercial product: carry-over rules, expiry and fees depend on the retailer’s private contract.
Simplified compensation is normally the practical route for homes and small businesses and is limited to eligible renewable systems with no more than 100 kW of associated generation. Direct sale requires producer and market-representation arrangements and brings additional tax and settlement duties.
## How long does solar legalisation take?
Residential installation often takes one or two days, while the full administrative and contract chain commonly takes around four to eight weeks when the file is correct. There is no single guaranteed deadline for every authority and company involved.
Typical delays include an incorrect CAU or CUPS, incomplete CIE attachments, inconsistent power figures, the wrong self-consumption category, unaccepted retailer terms, or a grid-connection permit where the installation is not exempt. The first bill should show exported kWh and the compensation credit. If it does not, the claim should include the validated CIE, registration receipt, CAU and file number.
## Off-grid legalisation, ATS, EPS and batteries
An off-grid solar installation still needs safe electrical design, documentation and commissioning, but it cannot export electricity because there is no grid connection. An ATS automatically switches between inverter and generator. An EPS output keeps selected essential circuits powered. Neither replaces the electrical legalisation process.
| Use | Suggested battery | Turnkey price |
|---|---|---|
| Weekend cottage | 10–15 kWh LFP | €8,500–€14,000 |
| Permanent home with air conditioning | 15–25 kWh LFP | €16,000–€26,000 |
| Self-sufficient finca with pool or irrigation | 30–40 kWh LFP + ATS + EPS | €28,000–€45,000 |
## Real project: Loja, Granada
Our Loja project combines 28 Aiko 610 W panels (17.1 kWp), a 15 kW Deye hybrid inverter, 32 kWh of MTS battery storage, ATS and EPS. A comparable custom system costs approximately €27,500–€32,500, including the applicable paperwork.

## Frequently asked questions
Is solar panel legalisation compulsory in Andalusia?
Yes. A fixed installation must comply with electrical rules and complete the applicable commissioning process. A grid-connected system must also have the correct self-consumption category before surplus compensation can be activated.
What is the difference between the distributor and retailer?
The distributor manages the local grid, meter, CAU and access contract. The retailer sells electricity, issues the bill and applies the agreed export-compensation rate. Customers choose the retailer but not the distributor.
Do batteries require a solar export contract?
The answer depends on the grid connection, not the battery. A connected system that exports needs the correct contract. An anti-export system receives no credit. A genuinely off-grid system has no export contract.
How much do Spanish electricity companies pay for solar exports?
The rate varies by retailer and contract. Compare it with the import tariff, fixed charges and virtual-battery terms. Simplified monthly credit cannot exceed the value of energy imported during that billing period.
What if compensation is missing from the electricity bill?
Check that registration is complete and the retailer accepted the self-consumption category. Submit the validated CIE, regional receipt, CAU and supply details. A CAU, CUPS or power mismatch can block activation.
For a technical review or fixed quote, see our [off-grid solar installation](/instalacion-solar-aislada), [solar battery](/baterias-para-placas-solares) and [off-grid FAQ](/faq#off-grid) pages.