How to build an awesome cloud gaming platform with Anbox Cloud

Why cloud gaming?

Cloud gaming is changing the way we play. Instead of buying expensive hardware, players stream games from the cloud, like Netflix for games.

This is no longer a futuristic idea, it’s here. Services like NVIDIA GeForce Now, Sony PS Plus, and Xbox Cloud Gaming have shown what’s possible: playing high-end games on low-end devices by streaming all of your favorite games – from indie to AAA – from powerful cloud servers.

But cloud gaming isn’t just about running games in the cloud. It’s about freeing players from hardware. Your phone becomes a console. Your laptop that doesn’t even have a dedicated GPU becomes a gaming rig. And to pull that off, your platform has to nail:

  • Responsiveness: ideally zero input lag, as if you were playing locally
  • Availability: spin up sessions on demand, anywhere, as fast as possible
  • Security: isolated sessions, encrypted streams
  • Consistency: the same experience whatever the device

Building your own cloud gaming platform is hard. Games are resource-hungry and GPU-intensive. Networks are messy and unreliable. Players have high expectations.

So the question is: how do you deliver that experience reliably, at scale?

In this blueprint, we’ll cover how to build a robust, scalable, and responsive cloud gaming platform using Anbox Cloud, so you can stream Android games to any device, anywhere, with low latency, zero installs, and high scalability.

Core concepts to get straight

Before you even think about spinning up a container or a VM, make sure that the following items are in place:

1. Sessions are ephemeral, but progress is persistent

A player’s game session is short-lived. Just like for Netflix, you don’t download a full movie to keep on your machine. You don’t “install” a game. You boot into a fresh, isolated environment, stream the gameplay, then free the session. That being said, depending on the game, a player expects to be able to load back into the same position they were in when they ended their session. Make sure that you properly store your users’ progress – they’ll never forgive you if they spent hours grinding and you didn’t save it.

2. Input latency is everything

From trying multiple game streaming solutions myself, this is the most difficult part to get right. Sub-100ms round trip is your goal. Every ms counts. Stream too slow? Rage-quit. So your whole stack; codecs, transport protocols, even down to the server location, needs to be tuned for speed, not just stability. Of course, the “last mile” is beyond your control, from the end device to the Wi-Fi quality. Your role is to optimize every step preceding that.

Worse than input latency is latency consistency. Any game turns into a nightmare once latency starts spiking: frames stall, timing breaks down, and you lose the ability to predict when inputs will land. That’s why you can’t just think about speed, you also need a plan for packet loss. Retransmissions sound like a good idea, but if a packet is already late, resending it will make things worse. Forward Error Correction (FEC) solves this by adding redundancy upfront to allow the rebuild of missing data instantly. Anbox Cloud goes further with FlexFEC, a dynamic controller that adapts FEC overhead in real time based on packet loss feedback, round-trip time, available bitrate, and observed loss patterns. The result: you trade a bit of bandwidth for stability, letting the session degrade gracefully instead of stalling, giving you smoother gameplay under messy real-world Wi-Fi.

3. Modularity is good

There’s a natural boundary between:

  • Session control (your backend): user auth, matchmaking, orchestration
  • Session execution (game workload, container): the isolated runtime (Android, etc.)
  • Session delivery (streaming stack): encode + stream to the player

Keep those separate, and your system will scale and stay sane – and hopefully you will too.

What a cloud gaming platform looks like

Let’s paint the picture:

Simplified architecture diagram of a cloud gaming platform

You’re gluing all this together with automation and efficient architecture and interface design. Ideally, the player should never know what’s under the hood. Just click and play.

Building it (step by step)

Here’s how to go from nothing to a working, scalable cloud gaming platform with Anbox Cloud.

1. Preparing the infrastructure

You’ll need machines capable of running GPU-accelerated container workloads. These can be cloud VMs with NVIDIA GPUs, or bare-metal servers for maximum control and lower latency. Ubuntu 24.04 LTS is a solid base, with LXD and NVIDIA drivers installed. Anbox Cloud uses LXD containers with GPU acceleration, so everything rides on proper infrastructure underneath.

You have two options for provisioning:

  • MicroCloud gives you a quick, opinionated stack that works well for edge deployments or small clusters. It’s easy to set up and fully integrated with Canonical’s ecosystem.
  • MAAS gives you more control over bare-metal servers, especially across data centers or large-scale deployments. If you want to treat your physical GPUs like a cloud, MAAS is the way.

Whether you’re using AWS, GCP, on-prem, or your own rack of GPUs, your goal is the same: provision a pool of hosts ready to run Android containers with minimal latency and predictable performance.

2. Deploy Anbox Cloud

With infrastructure in place, it’s time to bring Anbox Cloud online.

Anbox Cloud has a control plane (API, scheduler, gateway, media relay) and execution nodes where games run in containers. You deploy the control plane using Juju, Canonical’s service orchestration tool. It works across public clouds and bare metal, and makes deploying the entire stack repeatable and clean.

Example:

sudo snap install --channel=3/stable juju
juju clouds
juju add-credential aws
juju bootstrap aws my-controller
juju add-model anbox-cloud

For the next steps (attaching your Ubuntu Pro subscription, deploying Anbox Cloud itself), follow the official documentation

3. Upload a game

You can now push any Android APK into the platform. Anbox Cloud will wrap it into an image, launch a container, and stream the session.

It’s as easy as:

amc application create <path/to/application_content>

Follow the full documentation here: https://documentation.ubuntu.com/anbox-cloud/howto/application/create-application/ 

4. Start a game session

Once the application is uploaded, you can spin up a container, expose a WebRTC stream, and get a session URL back.

That’s the first playable experience, running end to end.

From prototype to production

Once you’ve proven that a single game can stream end-to-end, the challenge becomes scaling it into a real platform. Your backend is now the brain of the operation: it decides when to start sessions, assigns users to containers, tracks play time, and cleans up when sessions end.

Authentication, orchestration, matchmaking, all of this sits outside Anbox Cloud but plugs directly into its API. Whether you build with Django, Node.js, or Go, your backend isn’t just about launching sessions. It needs to handle dropped users, idle timeouts, reconnects, and the glue logic that makes your platform production-grade.

The frontend is the player’s window into all of this. It doesn’t have to be flashy, just fast and responsive. Click “play,” get a session, and stream immediately. A web client works well, but any modern stack with WebRTC support can deliver. The key is adaptation: touch on mobile, mouse and keyboard on desktop, and controller support for those who expect it. Don’t overengineer on day one but make sure to get the stream stable, then evolve.

UX & scale considerations

Now comes the part that separates a demo from something players actually want to use.

Startup time is the first killer. Users don’t wait. If it takes ten seconds to boot a container, you’ve already lost them. Keep popular games “warm” by preloading and caching aggressively. Reuse layers wherever possible so that “click to play” really means play, not fetch and wait.

Video quality is the second test. Networks fluctuate, especially on mobile. Bitrate and resolution need to adapt seamlessly. Video quality can’t drop when someone switches from Wi-Fi to 4G or vice versa. Adaptive streaming and fallback modes inform the player that their session is still active.

And then there’s latency, which you already know, is everything. Keep it under 100ms round trip and more importantly consistent, or it starts to feel broken and unusable. That’s why TURN server placement, fast negotiation, and regional hosting aren’t luxuries, they’re survival.

Finally, when things go wrong, hide the plumbing. Reconnects shouldn’t feel like crashes. The game should feel continuous even when the network isn’t.

Sessions are ephemeral, but the experience should feel solid. Each player isolated, every stream encrypted, containers wiped clean at the end. That’s how you earn trust while scaling.

Why this works

This architecture isn’t magic, it’s modular. You’re not building a streaming platform from scratch. You’re assembling it from parts that are built to scale: Anbox Cloud for the Android runtime and streaming layer, LXD for containers, Juju for orchestration, MAAS or MicroCloud for infrastructure that works wherever you need it.

It’s fast, securely maintained, scalable, and you stay in control. You can improve it, and own the experience.

That’s what players expect. That’s what your stack needs to deliver.

FAQ

Can I use this for non-gaming apps?
Yes. Any Android app works: productivity, education, even legacy enterprise tools. If it runs on Android, it runs here. And it streams just the same.

How scalable is this?
It scales horizontally. Add GPU-backed hosts, and you scale linearly with demand. No need to re-architect anything.

Can I run it on-prem instead of cloud?
Absolutely. That’s where MAAS or MicroCloud come in: same stack, just closer to your users or in your own data center.

Is it really better than using VMs?
For cloud gaming, yes. Containers start faster, use less memory, and are easier to manage at scale. If you’re thinking VMs are more “practical”, you’re probably building the wrong kind of platform.

Conclusion: Why Anbox Cloud?

Because building cloud gaming from the ground up is hard, and you shouldn’t have to.

Anbox Cloud gives you the core building blocks: native Android containers, real-time streaming with WebRTC, GPU acceleration, and full automation capabilities. It scales horizontally with LXD and Juju, runs securely in isolated containers, and streams to any browser or device.

You’re building a seamless gaming experience, assembling a production-ready platform, using open tools you control. With Anbox Cloud, you get the foundation.

The rest is yours to define. Focus on the player experience, your unique features, your business logic, not the infrastructure. When it works right, players won’t ask how it works, they’ll just play.

Got a project idea? Connect with our team to explore it together.


Android is a trademark of Google LLC. Anbox Cloud uses assets available through the Android Open Source Project.

Talk to us today

Interested in running Ubuntu in your organisation?

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

Boost your Android development with remote app testing via Anbox Cloud

In today’s hectic app development cycles, speed is key. But as teams scale and spread worldwide, and app complexity increases, traditional testing workflows...

Canonical’s Anbox Cloud brings new development and testing features to improve in-vehicle infotainment

Support for AAOS (Android™ Automotive OS) enables improved testing and seamless scalability to make Android Automotive development easier. London, 9 September...

Implementing an Android™ based cloud game streaming service with Anbox Cloud

Since the outset, Anbox Cloud was developed with a variety of use cases for running Android at scale. Cloud gaming, more specifically for casual games as...