# Magma Private 5G: Architecture, Deployment, and Where It Fits

Magma started life inside Facebook Connectivity as a way to scale rural and underserved-market mobile cores without per-site licensed software. It was contributed to the Linux Foundation in 2021 and now lives under LF Networking. Of the open-source mobile cores, Magma is the one designed first as a distributed system rather than a single-site EPC/5GC.

That design choice is the entire reason to pick Magma over Open5GS or free5GC for an enterprise or rural deployment.

The Split Architecture

Magma has two separate planes that talk to each other over a defined REST/gRPC interface:

Access Gateway (AGW) runs at every site. It is a single Debian or Ubuntu VM/baremetal box that terminates the S1/N2 interface from the eNB/gNB, runs MME/AMF/SMF logic, and provides the UPF data plane via OVS or DPDK. One AGW per cell site or per cluster of sites. AGWs operate even when disconnected from the orchestrator — sessions stay up, new attaches work using cached subscriber profiles. Orchestrator (Orc8r) is a Kubernetes-deployed central control plane. It holds subscriber data (HSS/UDM), policy, network configuration, and metrics. It does not sit in the data path. AGWs check in periodically; the orchestrator pushes config and pulls metrics. Orc8r is a multi-tenant system — one Orc8r runs many networks, each with many AGWs. Federation Gateway (FeG) is optional, used when you need to integrate with a partner operator's HSS, PCRF, or charging via Diameter/GTP-C. Most pure private-5G deployments skip it.

This split is what makes Magma fit poor-connectivity deployments and multi-site enterprise. You operate dozens of AGWs from one orchestrator, and any individual AGW losing backhaul does not drop subscribers.

The Magma 5G Story

Magma was originally an LTE/EPC stack. 5G NSA support came first, then 5G SA. As of the 1.9 / 2.x branches, 5G SA is functional but lags LTE in maturity and feature coverage. AMF and SMF logic live in the AGW alongside the LTE MME and SGW-C. UPF is a shared data plane.

If your deployment is LTE today and migrating to 5G SA, Magma works. If you are starting fresh with 5G SA only, evaluate honestly — free5GC and Open5GS have more 5G-native traction in 2026.

Real Deployments

Magma is in production in:

  • Rural ISPs — WISPs in the US (using CBRS) and operators in LATAM, India, and Africa run Magma at hundreds of sites. The disconnect-tolerant design matters when backhaul is satellite or a microwave link that flaps.
  • Enterprise private LTE/5G — manufacturing campuses and ports where the deployment is multiple cells across a large geographic area, managed centrally.
  • Neutral host networks — venues and indoor deployments offering coverage for multiple MNOs, where Magma's federation features connect to host operator cores.

Deployments at the scale of 50+ AGWs are where Magma shows clear advantages over single-site cores.

Deployment Pattern

For a typical small enterprise:

  1. Provision the Orc8r in a public cloud (AWS or any K8s cluster). Magma provides Terraform modules for AWS. Orc8r needs Postgres, Elasticsearch, and a Kubernetes cluster — figure on $200–500/month for a small Orc8r.
  2. Install AGWs at each site. The AGW installer is a Debian package set, deployable on a small server (4 cores, 8 GB RAM is enough for a few hundred connected UEs). Two NICs minimum: one to the eNB/gNB (S1/N2), one to the data network (SGi/N6).
  3. Register the AGW with the orchestrator via a one-time hardware ID and challenge key.
  4. Configure subscribers, APNs/DNNs, policies in the NMS (the Orc8r's web UI).
  5. Point the eNB/gNB at the AGW's S1/N2 IP.

Provisioning is API-driven — Magma's NMS is a thin shell over the REST API, so you can automate fleet provisioning.

Compared to free5GC and Open5GS

  • free5GC: stronger 3GPP-aligned 5G SA. Better choice for research, R16 feature work, and 5G-native deployments. No native multi-site management.
  • Open5GS: simplest to bring up, mature LTE and 5G SA, single-site oriented. Pair it with your own orchestration if you need multi-site.
  • Magma: best when you have multiple sites, intermittent backhaul, or need a managed-services posture. Heavier to operate centrally; lighter at each site.

What to Watch For

The 1.x to 2.x transition. Magma had a leadership and contributor reshuffle after the Facebook contribution. Release cadence slowed compared to 2021. Confirm the current release status before committing to a deployment. Container vs VM AGW. The AGW is traditionally a Debian VM/baremetal install. Containerized AGW work is ongoing but not the default path. If you want a Kubernetes-native AGW, today you are still mostly on the VM track or using the experimental container builds. Postgres in Orc8r. The schema migration story across versions has been rough. Snapshot before upgrades, test in staging, and read the release notes carefully. 5G SA feature gaps. Network slicing, advanced QoS, and some SBI interactions are immature relative to free5GC. If your enterprise use case needs slicing today, validate against your specific feature list before choosing Magma.

Magma is the right tool for distributed mobile networks. It is the wrong tool for single-site labs — you would spend more time operating Orc8r than learning the protocol stack. Pick by the operational shape, not the brand.