Insight · Africa · Energy and data
Africa had 360 MW of active IT capacity in its data centres in early 2026, according to Data Centres in Africa 2026, the report published in February 2026 by the Africa Data Centres Association (ADCA) with Rising Advisory. A further 238 MW is under construction and 656 MW is planned. If every project is delivered, the continent would approach 1.2 GW by 2030, more than three times today’s capacity. Its share of global capacity, around 0.6% today, would remain of the same order.
These projects face two constraints that are largely managed through law and contract: access to reliable electricity, which the ADCA identifies as the sector’s main limit, and the rules governing where data is hosted and how it is transferred. Morocco and Kenya, two markets attracting large projects, illustrate both. The legal frameworks for self-generation of electricity and for data are examined in turn, followed by the clauses an investor or a data centre customer should check.
I. A growing market, held back by power
I.1. Capacity still concentrated
That 0.6% share compares with a continent that is home to nearly a fifth of the world’s population. South Africa still dominates, with more than 60% of operational capacity according to a study by Fortren & Company reported by Nairametrics in July 2026; Kenya, Nigeria, Egypt and Morocco are among the growing markets. Capacity estimates differ between studies: Fortren & Company counts more than 500 MW in operation, against 360 MW for the ADCA. In Morocco, the ministries of Energy Transition and Digital Transition have announced a large data centre powered by clean energy in the Dakhla-Oued Eddahab region, together with a research institute on artificial intelligence and the energy transition.
I.2. Electricity, the first constraint
A data centre draws power around the clock. The ADCA report identifies energy as the sector’s main constraint and stresses the role of long-term power purchase agreements.
In Kenya, the Microsoft and G42 project, announced in May 2024 as a USD 1 billion investment built around geothermal power, is on hold: Bloomberg reported on 10 May 2026 that the project had been delayed. According to that report, the two companies asked Kenyan public bodies to commit to buying a defined amount of computing capacity each year, and talks stalled over that guarantee. In November 2025, President William Ruto said he had been told that such a facility would need 1,000 MW, while, he said, the country had 2,300 MW. Kenya’s Ministry of Information has since said that the project has neither failed nor been withdrawn and that talks are continuing.
For an investor, this raises two legal questions: can it generate its own power, and how does the contract allocate the risk of an outage?
II. Electricity: self-generation and contractual back-up
II.1. In Morocco, self-generation can now be applied
Law No. 82-21 on self-generation of electricity, enacted by Dahir No. 1-23-21 of 10 February 2023, allows a consumer to generate its own electricity regardless of the energy source, voltage level or installed capacity. A self-generator may sell surplus power to the grid operator up to 20% of its annual output. This cap can be revised under conditions to be set by regulation (Article 12). Draft Decree No. 2.25.01, which is to set those conditions, is still awaiting approval.
For three years, without implementing texts, the law was difficult to apply. Decree No. 2-25-100, published in Official Bulletin No. 7489 of 9 March 2026 and in force since 9 June 2026, sets the conditions for building and operating self-generation facilities. Procedures depend on capacity: below 11 kW; from 11 kW to 5 MW, with a connection agreement; and from 5 MW, with an authorisation and a medium- or high-voltage connection. A facility sized to power a significant data centre will generally fall into this last category. A data centre in Morocco can therefore consider dedicated solar or wind generation, connected to the grid, under this regime.
If the project involves a connection to the national grid, it remains subject to the grid’s hosting capacity, allocated in the order in which applications are received (Article 14). That capacity is calculated each year by the transmission system operator, then approved and published by the National Electricity Regulatory Authority (ANRE) before 31 January (Article 23).
II.2. In Kenya, a licence above one megawatt
Kenya’s Energy Act No. 1 of 2019 makes electricity generation subject to a licence from the Energy and Petroleum Regulatory Authority (EPRA). Section 117, however, exempts from any authorisation generation for own use with a capacity not exceeding one megawatt (the threshold in the consolidated version published by Kenya Law; a 2023 bill proposed lowering it to 0.5 MW). Above that threshold, a plant dedicated to a data centre requires a generation licence. EPRA also approves power purchase agreements (section 10(h)).
Grid access is framed in two ways. Section 136 requires the transmission licensee to provide non-discriminatory open access to licensees and eligible consumers, against wheeling charges. For small installations, the Energy (Net-Metering) Regulations 2024 (Legal Notice No. 104 of 2024) allow renewable installations below one megawatt to export their surplus to the grid, within an aggregate cap of 100 MW over the first five years.
The Microsoft-G42 project shows another set-up: the Kenyan government was to provide land, power purchase terms and regulatory support. When the State supplies the energy, facilitates the project and may become a customer, negotiations cover its financial commitments as much as the technical design.
II.3. What the contract should provide
In both cases, several contracts interlock: the power purchase agreement, the construction contract, the hosting contracts with customers and, where relevant, the investment agreement with the State. If the project includes a connection to the national grid, an outage affects all of these contracts at once. The outage that left parts of Casablanca without power for up to about four hours on 11 November 2026 is a recent example.
Two points are therefore essential in the power purchase agreement and in the hosting contracts with customers: (i) the financial consequences, towards the national operator, of a grid interruption for a cause not attributable to the generator, and (ii) the financial consequences for the data centre towards its customers if data becomes unavailable.
III. Data: targeted localisation rules
III.1. Morocco: transfers abroad governed by Law No. 09-08
Law No. 09-08 on the protection of individuals with regard to the processing of personal data does not, as a rule, require data to be hosted in Morocco. Article 43 makes any transfer to a foreign State subject to prior authorisation by the regulator, the National Commission for the Control of Personal Data Protection (CNDP), provided that the destination State offers a sufficient level of protection.
For a Moroccan customer using a data centre abroad, the question is therefore one of transfer and its formalities. For a data centre located in Morocco, local hosting can spare Moroccan customers those formalities (although remote access from abroad, for instance for technical support, is still a transfer), which is a commercial argument. We have previously discussed the CNDP’s move to stronger enforcement.
III.2. Kenya: an obligation targeted at strategic processing
Kenya’s Data Protection Act 2019 regulates transfers out of Kenya (sections 48 and 49), and section 50 allows processing to be required in Kenya on grounds of strategic interest of the State or protection of revenue. According to the guidance note of the Office of the Data Protection Commissioner (ODPC), processing carried out on those grounds must go through a server and data centre in Kenya, or at least one serving copy must be stored there.
The Data Protection (General) Regulations 2021 (Legal Notice No. 263, regulation 26) list the strategic processing concerned: civil registration and legal identity, elections, public finance management, protected computer systems, basic education, and primary and secondary health care. The same note recommends checking whether localisation applies before any transfer.
IV. Practical implications
Before signing, an investor, an operator or a corporate customer should check five points:
- Power supply: applicable regime (self-generation in Morocco, connection or not to the national grid, power purchase agreement with the public utility), grid hosting capacity, term and price of supply.
- Consistent commitments: availability promised to customers must rest on the power supplier’s commitments and on the back-up in place.
- Force majeure and outages: covered events, notice, interaction with availability penalties.
- State commitments: payment guarantees, capacity purchases, land, their budgetary treatment and duration, and the stabilisation clauses discussed in our analysis of African economic sovereignty.
- Data: depending on customers and sectors, is localisation mandatory? Which transfer formalities apply, and before which authority?
Conclusion
The growth of data centres in Africa depends as much on available power as on demand. Morocco and Kenya both have a self-generation regime that can be applied with or without a connection to the national grid, subject to authorisation above certain thresholds. On data, localisation rules remain targeted: they require local hosting for certain processing in Kenya, without banning hosting abroad in general (where applicable, after authorisation by the national regulators).
For large projects, however, where a connection to the national grid is needed to balance the economics, the whole project in practice relies on the grid’s ability to receive the electricity produced, both in technical capacity and in actual capacity (in particular when incidents occur on the grid).
This analysis does not constitute personalised legal advice: each project must be assessed in light of its contracts and the law that governs them, and the UGGC Africa teams are at your disposal for any specific transaction.
Key takeaways
Where do data centres in Africa stand?
According to the ADCA, 360 MW of active capacity, 238 MW under construction and 656 MW planned, close to 1.2 GW by 2030 if every project is delivered.
What legal risks do these projects face?
1. Access to power: generation regime and purchase agreements.
2. Data rules: transfers and, in some cases, localisation.
3. Liability and financial consequences of grid interruptions and data unavailability.
Do Morocco and Kenya require data to be hosted locally?
Not in Morocco, but a transfer abroad requires prior authorisation and is subject to conditions. In Kenya, yes, but only for processing in the strategic interest of the State (section 50 of the Act and regulation 26 of 2021), which must go through a data centre in Kenya or keep at least one copy there.
What should be checked in contracts before signing?
Align availability commitments with those of the power supplier, check the force majeure clause and map the data subject to localisation.
Fabien Gagnerot, Of Counsel — UGGC Africa · Our Personal data practice
A data centre project to structure? Contact the UGGC Africa team