Self-hosting an Android EMM: what it takes and what still depends on Google
You can self-host the parts of an Android EMM that hold your data: the console, the API and the database. You cannot self-host the whole chain when the devices run Google Play services. With the Android Management API (AMAPI), policy reaches devices through Google's cloud, the on-device agent is Google's, and apps come from managed Google Play. A deployment with no dependency on Google needs a custom agent and gives up managed Google Play. So the first question is not where the server runs. It is which of these two architectures you are choosing.
Key facts
- You can self-host an Android EMM's console, API and database. With an EMM built on the Android Management API, policy still reaches devices through Google's cloud.
- A deployment with no dependency on Google needs an EMM with its own on-device agent, and it gives up managed Google Play.
- Google does not permit a company to build an AMAPI solution only for its own in-house fleet.
- Since 1 November 2025, AMAPI device enrollment requires Android Enterprise registration and approval. A project starts with a quota of up to 500 devices.
- An AMAPI-based EMM cannot run air-gapped, because the agent on the device talks to Google.
- Self-hosting moves patching, backups, access control and upgrades to you. It does not remove that work.
What does self-hosted mean for an Android EMM?
| Self-hosted, AMAPI-based EMM | Self-hosted, custom DPC EMM | |
|---|---|---|
| You host | Console, API, database | Console, API, database, and the service the agent talks to |
| Google hosts | Policy delivery through AMAPI, the Android Device Policy agent, managed Google Play | Nothing required |
| Devices need | Google Play services and a route to Google | A route to your server |
| Works on AOSP without Google services | No | Yes |
| App distribution | Managed Google Play, plus custom app installs | Your own. No new access to managed Google Play |
| Gatekeeping | The EMM vendor needs Android Enterprise approval | On devices with Play Protect, the agent must be on Google's DPC allowlist |
| New Android management features | Arrive through Google's agent | Wait for the vendor's agent |
The background to both columns is in AMAPI vs custom DPC.
Can you build your own EMM on the Android Management API?
Not for your own fleet alone. Google's permissible usage policy restricts AMAPI to commercial EMM developers, Device Trust providers and OEMs. It lists solutions built and used only for first-party, in-house purposes as not permitted.
Since 1 November 2025, AMAPI device enrollment also requires Android Enterprise registration and approval. A project starts with a quota of up to 500 devices, granted on a business justification. In practice, a company that wants AMAPI on its own servers runs a vendor's product there.
What still depends on Google in an AMAPI-based deployment?
- The AMAPI service. Your server calls it. Google stores the policy and delivers it to devices.
- Android Device Policy. Google's agent runs on every device and reports back through Google.
- Managed Google Play. It supplies apps and holds the enterprise binding.
- Google Cloud Pub/Sub. Enrollment, status and command notifications arrive through it.
- Zero-touch enrollment, if you use it.
So self-hosted means this: your administration plane and your data at rest sit in your environment, and device control still transits Google. For many data-residency requirements, that is the part that matters. Confirm it with your compliance team before you sign, not after.
What do you have to run and operate yourself?
| Area | What you own |
|---|---|
| Compute and database | Sizing, high availability, backups and restore tests |
| Network and TLS | Admin access inbound, Google APIs outbound, certificates and their renewal |
| Identity | Single sign-on, admin roles, offboarding |
| Secrets | The credentials that let the server call Google, API keys, rotation |
| Event intake | The subscriber that receives enrollment and status notifications |
| Upgrades | Applying vendor releases on a schedule. Google publishes AMAPI changes monthly |
| Monitoring | Server health, failed API calls, last-sync age of devices |
| Audit evidence | Log retention and access reviews for your own compliance scope |
None of this is unusual for a self-hosted product. It is a standing operations commitment, and it belongs in the business case next to the license price.
Why do organizations self-host an EMM?
- Data residency. Device inventory, user identifiers and audit logs stay in a jurisdiction you choose.
- Network isolation. The admin console is reachable only from your network.
- Procurement rules. Some sectors require on-premises deployment for management systems.
- Upgrade control. You decide when a new version goes live.
Self-hosting does not make device management independent of Google, and it does not remove operational work. It moves that work to you.
What should you ask a vendor that offers self-hosting?
- How is it delivered: containers, a virtual machine image, or an installer?
- AMAPI access belongs to the approved EMM developer. How does my instance authenticate to Google, and who holds those credentials?
- What data leaves my environment, and to which endpoints?
- Can it run with outbound access limited to an allowlist?
- How are upgrades shipped, and how long is each version supported?
- How does support work when you cannot see my instance?
- Is the feature set the same as your cloud edition?
How do you manage Android devices that have no Google services?
Then AMAPI is out, and you need an EMM with its own agent. Open-source projects such as Headwind MDM take this route. Everything can run on your network, including app distribution.
The trade-offs are the ones in the table above. There is no managed Google Play. New Android features depend on the agent's developers. On any device that does run Play Protect, the agent has to pass Google's DPC allowlist. For Samsung fleets on isolated networks, Knox Mobile Enrollment Direct covers on-premises enrollment.
Can AndroidNexus be self-hosted?
AndroidNexus can run in your cloud or on your premises as part of the Enterprise plan. It is built on AMAPI, so policy delivery still runs through Google's hosted API, and devices need Google Play services.
Frequently asked questions
Can an Android EMM run fully offline or air-gapped?
Only with a custom agent on devices that do not depend on Google services. An AMAPI-based EMM cannot, because the agent on the device talks to Google.
Can I build my own EMM on AMAPI for my company's devices?
No. Google's permissible usage policy limits AMAPI to commercial EMM developers, Device Trust providers and OEMs. Solutions built only for in-house use are listed as not permitted.
Does a self-hosted EMM still need Google?
If it is built on AMAPI, yes. Your server sends policy to Google's service, and Google's agent applies it. If it uses its own agent, it can run without Google.
Is a self-hosted Android MDM the same thing?
Yes. MDM is the older and narrower term. Android Enterprise documentation uses EMM for the service that manages devices, apps and policy. The hosting questions are identical.
Is there an open-source self-hosted option?
Yes. Headwind MDM is one example. It uses its own agent, not Android Device Policy, and its documentation covers AOSP devices and closed networks.
Is self-hosting more secure than a cloud EMM?
Not by itself. It moves responsibility for patching, access control and backups to you. It is more secure only if you run those better than the vendor would.
Does self-hosting satisfy data residency rules?
It covers the data on your server. With AMAPI, policy content and device state also pass through Google's service. Whether that meets your rules is a question for your compliance team.
How many devices can an AMAPI project manage?
Google grants an initial quota of up to 500 devices on a business justification. Going beyond it means applying to Android Enterprise. This applies to the EMM vendor's project, not to each customer.
Which parts of an Android EMM can I host myself?
The parts that hold your data: the admin console, the API and the database. With an AMAPI-based EMM, Google still hosts policy delivery, the on-device agent and managed Google Play. With a custom-agent EMM, you can also host the service the agent talks to.
Is on-premises the same as self-hosted?
For this decision, yes. Both mean the vendor's software runs in an environment you control, whether that is your own data center or your own cloud account. The questions about Google dependencies, operations and support are the same.
Sources
- Permissible usage, Android Management API
- Android Management API release notes, Google
- Set up Pub/Sub notifications, Android Management API guide
- Manage Android devices with the Android Management API, Samsung Knox
- Knox Mobile Enrollment FAQ, Samsung Knox
- What is the difference between AMAPI and a custom DPC?, Jason Bayton
- The DPC allowlist, Jason Bayton
- AMAPI usage limits, Jason Bayton