Skip to main content
Infrastructure & Cloud

Hosting in Morocco or abroad: a decision grid for your data and your cloud

Law 09-08, Law 05-20, the Bank Al-Maghrib directive: what the texts require, the criteria that separate offers, and a method for deciding batch by batch.

8 min readThe Corevia team

A Casablanca distribution company is replacing its ERP. The vendor offers a hosted edition in a cloud region in Paris. Three weeks after the quote is approved, the compliance officer asks whether payslips, customers’ bank details and contracts signed with a public body may leave the country. Nobody has the answer, and the project stalls for a legal review that would have taken a day at the outset. We see this scene in most of the migrations we support. Three questions settle almost everything: which data, under which regime, and how do you get out again. This is the grid we use.

The CNDP step for any personal data that leaves the country

Law 09-08 on the protection of individuals with regard to the processing of personal data has been the reference text since 2009. Article 43 sets the rule: a data controller may transfer personal data to a foreign state only if that state ensures a sufficient level of protection, and the CNDP draws up the list of those states. The list sits in deliberation no. 236-2015 of 18 December 2015. It names thirty-two countries: nearly all of the European Union, the United Kingdom, Switzerland, Norway, Iceland, Liechtenstein and Canada. The United States is absent.

Two consequences. Even towards a listed country, the transfer must be notified to the CNDP, and the notification procedure the Commission published in 2025 provides a dedicated form, the F-118. Towards an unlisted country, Article 44 opens only exceptions: the express consent of the individuals, contractual or judicial necessity, an international agreement, or an express and reasoned authorisation from the CNDP where contractual clauses or internal rules guarantee sufficient protection. A SaaS whose data, backups or support pass through the United States therefore falls under Article 44.

In April 2022 the CNDP announced with Microsoft an accelerated procedure for Moroccan Office 365 customers, while recalling that transfers abroad remain subject to prior authorisation and that a CNDP authorisation never replaces those the DGSSI or a sector regulator may require.

What Law 05-20 actually requires on hosting

Law no. 05-20 on cybersecurity was enacted by dahir no. 1-20-69 of 25 July 2020. It covers first the “entities”, meaning state administrations, local authorities, public establishments and companies and any other legal person governed by public law, then the critical infrastructures, designated sector by sector after an opinion from the DGSSI. Article 11 fits in one sentence: sensitive data must be hosted exclusively on national territory. Article 14 extends the rule to critical infrastructures, and Article 49 punishes hosting sensitive data outside the territory with a fine of 200,000 to 400,000 dirhams.

Two clarifications. A private company that has not been designated a critical infrastructure is outside Article 11; Law 09-08 and its sector regulator continue to apply to it. And sensitive data is defined through the classification in decree no. 2-21-406 of 15 July 2021: each organisation concerned analyses the impact an incident would have on the confidentiality, availability or integrity of its assets, and systems rated class A or B are deemed sensitive.

Decree no. 2-24-921 of 22 October 2024, published in the Official Bulletin in February 2025, settles the cloud case. For its sensitive systems or data, an entity or critical infrastructure must use a provider qualified by the DGSSI. Level 1 covers hosting and operating sensitive systems and requires a company under Moroccan law whose infrastructure is installed on national territory. Level 2 covers processing and storing sensitive data and adds majority Moroccan ownership, storage and administration exclusively from Morocco, and operations staff of Moroccan nationality. The framework set by order no. 3-17-25 of 1 August 2025 spells out the rest: encryption in transit and at rest, keys known only to the customer at level 2, reversibility with documented formats or APIs, notice of any change of subcontractor, and an agreement governed by Moroccan law.

A transition is provided for. Where no equivalent qualified offer exists, an unqualified provider remains possible after a risk analysis covering localisation, reversibility and the supplier’s legal regime, with migration as soon as a qualified service becomes available. Organisations already in the cloud have twenty-four months from entry into force, which came with the publication of the order in August 2025. At the time of writing we found no published list of qualified providers.

Banks and insurers add a layer of their own

For credit institutions, Bank Al-Maghrib issued directive no. 4/W/2022 of 19 May 2022 setting minimum rules for outsourcing to the cloud. It requires a data classification that defines, for each class, the eligible hosting locations. It makes any outsourcing of a significant function subject to the central bank’s prior approval, and requires a register of outsourced functions stating the hosting country and region, a tested exit strategy and notification to the CNDP of the processing concerned. Its risk analysis names judicial requisitions under foreign law and the provider’s ability to let the bank manage its own keys.

For insurance, we have not identified an ACAPS circular devoted to the cloud at the time of writing. Law 09-08 applies in full to policyholder data, and it is wise to consult the Authority before committing to a migration.

Six technical criteria that separate the offers

  • Latency. Measure it from your own sites, at peak hours, towards each candidate region.
  • Reversibility. Get the export format, the return deadline, the egress cost and the proof of deletion in writing. Test the export before signing, on a real volume.
  • Off-site backup. The copy must live with another provider or in another account, with separate credentials. For sensitive data within the meaning of Law 05-20, it stays in Morocco.
  • Encryption and keys. Encryption at rest protects nothing if the provider holds the keys. Ask who can decrypt, where the keys are stored and whether you can revoke them yourself.
  • Certifications. An ISO 27001 certificate is read together with its scope: site, services covered, date. An Uptime Institute Tier distinguishes the design (Design) from the built facility (Constructed Facility), and only the second attests to the actual building.
  • Local support. Who picks up at three in the morning, in which language, with what access to your systems? Support delivered from abroad must be documented and supervised.

Four models, and what each one settles

The data centre in Morocco

This is the only model that satisfies Article 11 of Law 05-20 without debate and avoids any transfer formality. inwi runs a Tier III certified centre at Technopolis Rabat, with ISO 27001 certification on its hosting services. Orange Maroc runs a Casablanca site certified Tier III Design and Constructed Facility. N+ONE Datacenters holds Uptime Institute Tier III certifications for its Nouaceur and Settat sites. Atlas Cloud Services in Benguerir has announced Tier III and Tier IV certifications. The weak point remains the depth of the managed services catalogue.

International public cloud in a nearby region

The nearest regions are in Spain and France: AWS (Aragon, Paris), Microsoft Azure (Madrid, Paris), Google Cloud (Madrid, Paris). Those countries are on the CNDP list, which reduces the formality to a notification. The model does, however, rule out the sensitive data of entities and critical infrastructures, and it exposes you to the extraterritorial laws of the provider’s home country. A variant appeared in April 2026: Oracle opened a public cloud region in Casablanca, hosted at N+ONE, with a second region announced in Settat. What remains to be checked, offer by offer, is whether it obtains DGSSI qualification.

A Jelastic-style PaaS

A platform such as Jelastic, taken over by Virtuozzo in 2021, is installed at a Moroccan or European hosting provider and runs containerised applications. You choose the host, hence the jurisdiction, and you keep standard formats that make reversibility real. The model suits web and line-of-business applications built in-house, less so the packaged software that demands a specific infrastructure.

Hybrid, which is the general case

Almost every organisation ends up hybrid: sensitive data and core systems in Morocco, elastic workloads, test environments and office collaboration in a European region. Hybrid works when the flows between the two worlds are inventoried, encrypted and measured.

Classify your data, then decide batch by batch

Five steps, before any tender.

  1. 1Inventory the applications and, for each one, the categories of data: personal, sensitive within the meaning of Law 05-20, regulated by a sector supervisor, or ordinary.
  2. 2Qualify the regime of each batch: mandatory national hosting, transfer to a CNDP-listed country with notification, transfer subject to Article 44, or complete freedom.
  3. 3Add the technical constraints: acceptable latency, RTO and RPO, volume, and dependencies on other systems, which often set the location by pulling others along.
  4. 4Assign each batch to a model, and write down why. The document serves the regulator, the auditor and the CIO’s successor.
  5. 5Plan the exit before the entry: tested export, independent backup copy, reversibility clause, return deadline. Replay that test once a year.
  • Hosting
  • Sovereign cloud
  • Data localisation
  • CNDP
  • Law 05-20
Back to insights

A project, an audit, an emergency?

Describe your situation in a few lines. We come back within one business day with an initial read and the questions that matter.

contact@coreviatechnologie.com