Data hosting in Morocco: 9 decisions before choosing a cloud location

Nine decisions for data hosting in Morocco: transfers, cloud locations, backups, access, provider qualification, and reversibility.

Data hosting in Morocco: 9 decisions before choosing a cloud location

Data hosting in Morocco cannot be decided through one country selector in a cloud console. You need to locate computing, primary storage, backups, logs, keys, and administrative access. An application may run in Morocco while sending backups, support tickets, or monitoring data abroad.

Make nine decisions before selecting a provider or cloud location. They connect data types, applicable requirements, architecture, continuity, subcontractors, and reversibility. This guide provides a scoping method; it does not replace legal or sector-specific analysis.

Team in Morocco mapping data hosting locations and cloud architecture flows
Actual location includes computing, storage, copies, logs, and support access.

Quick answer: must every dataset stay in Morocco?

There is no single answer for every organization and dataset. Morocco’s Law No. 09-08 governs personal data and transfers abroad. The CNDP explains that hosting or storing personal data on servers located abroad requires review of the corresponding transfer procedure.

A specific regime applies to entities and vital infrastructures when they use cloud services for sensitive information systems or data. Decree No. 2-24-921 then requires qualified cloud providers for its defined scope. An ordinary SME should therefore neither ignore cross-border transfers nor assume that every rule designed for covered entities applies identically to all projects.

Five locations to distinguish

ElementQuestionEvidence
ComputeWhere do code and processing run?The actual region, zone, and services
Primary storageWhere do databases, files, and objects reside?Configuration and contractual commitment
CopiesWhere do backups, snapshots, and replicas go?Backup policy and destinations
OperationsFrom where do teams and subcontractors administer the service?Roles, countries, and access logs
TelemetryWhere do logs, errors, analytics, and tickets go?Tool and transmitted-data inventory

This map prevents data residency from being reduced to the address of the primary data center. It also exposes indirect flows created by support, monitoring, or managed-backup services.

Nine decisions before choosing a cloud location

1. Classify data and processing

Start with use cases: customer accounts, payroll, health, identity, contracts, technical data, application secrets, or public content. For each dataset, record purpose, data subjects, sensitivity, retention, and the impact of unavailability or disclosure.

Do not label all data “sensitive” without a definition. Separate sensitive personal data under Law 09-08, business-confidential data, and systems or data that may fall under a sector-specific or cybersecurity regime.

2. Map every flow, including copies

Trace the journey from the user device to the database and onward to backups, logs, analytics, messaging, support, and AI providers. Include test environments: copying a production export into a foreign sandbox is still a flow that needs review.

Assign an owner to each flow. A cloud landing zone in Morocco helps separate accounts, networks, logging, and policies before the first workload is deployed.

3. Determine whether a cross-border transfer exists

The CNDP describes conditions for transferring personal data abroad and states that the underlying processing must first complete the appropriate formality. The analysis should cover storage, transmission, and recipients, not only the provider’s commercial label.

Document the country, purpose, data categories, recipient, frequency, and relied-upon condition. Resolve uncertainty before production rather than waiting for an audit or customer questionnaire.

4. Identify the sectoral regime and required qualification

Morocco’s cloud decree and the DGSSI cloud-provider qualification framework cover IaaS, PaaS, and SaaS for the relevant entities and vital infrastructures. The framework addresses risk management, resource separation, deletion, administrative interfaces, third parties, and shared responsibilities.

Do not ask only whether a provider is “certified.” Verify the applicable qualification, level, named service, technical scope, and validity period. A company-wide certificate does not automatically prove that the purchased service falls within the evaluated scope.

5. Distinguish regions, local zones, and edge infrastructure

A local presence does not necessarily mean a full cloud region with every service and several independent zones. AWS documentation distinguishes Regions, Availability Zones, Local Zones, and Wavelength Zones; a Wavelength Zone is tied to a parent Region and targets low-latency use cases.

Ask where the control plane, machine images, snapshots, keys, and managed services reside. Verify the number of locations actually available. A single local deployment can satisfy a residency need for selected components while requiring a separate resilience strategy.

6. Set access, encryption, and key rules

Specify who administers the platform, from which country, and with which privileges. Require strong authentication, limited roles, approval for sensitive operations, and usable audit logs. Support should not receive permanent data access by default.

Decide who controls keys, how they rotate, and what happens when an account is suspended. The guide to secrets management in Morocco complements this decision for API keys, deployment credentials, and pipelines.

7. Design backup, recovery, and restoration tests

A local backup is useful only if it is isolated, restorable, and aligned with business objectives. Define covered data, frequency, immutability where appropriate, destination, encryption, retention, and restoration permissions.

Set a recovery point objective and recovery time objective, then test them. The cloud disaster recovery plan explains how to turn copies into a verified recovery procedure.

8. Govern subcontractors and changes

Request the list of companies that host, operate, maintain, or support the service. The contract should require notice when a subcontractor, location, or region changes. A generic clause allowing processing “wherever necessary” prevents meaningful control of data flows.

Review telemetry as well: logs may contain identifiers, IP addresses, request fragments, or error data. Minimize their content, set retention, and separate technical observability from business data.

9. Prove reversibility before signing

List what must be recovered: data, files, versions, logs, configurations, images, managed keys, network rules, and documentation. Ask for formats, timing, costs, limits, and exit assistance. Test an export before volume and dependencies grow.

The DGSSI framework explicitly addresses return, deletion, and reversibility within its scope. Even outside that regime, those requirements are sound contractual discipline. The Cloud DevOps in Morocco guide lists further evidence to request before handing over production.

A minimum decision architecture

  1. Inventory processing, data, owners, and criticality.
  2. Map every compute, storage, copy, support, and telemetry location.
  3. Qualify transfers and formalities with legal and compliance owners.
  4. Compare equivalent service scopes, not only displayed countries.
  5. Test security, restoration, export, and deletion through a pilot.
  6. Record the decision and review the map after every major change.

Kanteek’s Cloud & DevOps service covers architecture, migration, observability, and recovery; Consulting & Strategy helps frame responsibilities, risk, and the target roadmap.

Common mistakes to avoid

  • assuming that every company must host every dataset in Morocco;
  • confusing billing country, provider headquarters, and actual data location;
  • ignoring backups, snapshots, logs, and support tickets;
  • treating an edge zone as a complete multi-zone region;
  • accepting permanent or unlogged support access;
  • relying on a certificate without checking its scope;
  • planning an export without testing completeness and reuse;
  • failing to review the decision after adding a SaaS provider or subcontractor.

Checklist before the pilot

  • data categories and purposes documented;
  • countries and zones for every component confirmed;
  • backups, replication, and telemetry included;
  • CNDP formalities and sector rules reviewed;
  • provider qualification and scope checked where applicable;
  • administrators, subcontractors, and access locations listed;
  • keys, logs, and permissions configured;
  • restoration and reconciliation tested;
  • export, deletion, and provider change demonstrated.

FAQ about data hosting in Morocco

Does Moroccan law require every company to keep all data in Morocco?

No single blanket rule should be presented for every organization and dataset. Personal data transferred abroad follows Law 09-08 and CNDP procedures. Additional rules may apply depending on the entity, sector, and sensitivity.

Is a backup abroad a data transfer?

If it contains personal data and is stored on foreign servers, it belongs in the transfer analysis and related formalities. Automated copies must be included in the data map.

Does a Local Zone guarantee that everything stays in Morocco?

Not automatically. Check active data, snapshots, managed services, the control plane, support, and logs separately. Guarantees depend on the service and its configuration.

How do you verify a qualified cloud provider?

Consult DGSSI publications and verify the level, validity, named service, and exact scope. Request traceable references instead of relying on a marketing statement.

What should the first deliverable be?

A flow-and-location matrix covering processing, data, countries, providers, subcontractors, backups, access, legal basis, retention, recovery objectives, and exit strategy.

Choose a provable architecture

A data hosting in Morocco project becomes defensible when location, access, copies, continuity, and exit can all be demonstrated. To build the map and test a cloud architecture without relying on a generic sovereignty promise, contact Kanteek.