Docker provider
Run Android redroid sessions as Docker containers on one or more Linux (x86_64 or arm64) hosts or Apple Silicon Macs without Kubernetes.
The provider-docker service implements the same Provider contract as
provider-emulator, running each Android session as
Docker containers (redroid, the device agent and an optional sing-box VPN
sidecar) directly against the Docker Engine API on a Linux (x86_64 or arm64)
host or an Apple Silicon Mac inside a Lima VM. To scale across multiple Docker
hosts, run one provider-docker per host and list all of them under providers
in the api config.
For a ready-to-run setup with local storage, disabled auth and preconfigured Chromium + Holtdroid WebView builds, see Docker Compose.
listen: ":8080"host: "" # empty: DOCKER_HOST or unix:///var/run/docker.socknetwork: holtdroid # Docker bridge network shared with api; empty auto-detectshostName: "" # prefix for slot IDs and Inventory card name; empty: Docker daemon nameslots: 2names: [] # optional human labels for slots 1..N (e.g. [Fox, Owl])image: ghcr.io/holtdroid/holtdroid-session:mainimagePullPolicy: IfNotPresent # IfNotPresent | Always | NeveragentPort: 18580tunnelPort: 18581redroid: images: # Android version → image; the newest is the default "15": ghcr.io/holtdroid/holtdroid-redroid:15 screens: [] # built-in presets; see Emulator provider → Screens fps: 60 gpu: /dev/dri/renderD128 # empty: software rendering (guest mode) dataSize: 8Gi shell: allowlist # allowlist | full | off privileged: false # true: run Android container privileged args: [] # extra redroid boot argumentsresources: # Android container limits limits: { memory: 3Gi }agentResources: limits: { memory: 1Gi }vpn: locations: [] # same format as provider-emulator; empty disables VPN sidecarstateFile: /var/lib/holtdroid/docker-state.json # optional; empty keeps mutable state in memoryhostCgroup: /sys/fs/cgroup # mounted read-only into agent for device load metrics; empty disables| Key | Meaning |
|---|---|
host |
Docker Engine endpoint (unix:///var/run/docker.sock, tcp://…, http://…). Empty uses DOCKER_HOST or unix:///var/run/docker.sock. |
network |
Docker bridge network that session containers join so the api (and optional ssh-gateway) can reach them by container IP. When empty, provider-docker inspects its own container and joins its user-defined bridge network (falling back to bridge). |
hostName |
Machine name shown on the Inventory page (Slot.group) and prefix of slot IDs (<hostName>-1, …). Defaults to Docker’s daemon name. |
slots |
Fixed number of concurrent sessions on this host (default 2). |
names |
Optional labels shown for slots 1..N instead of <hostName>-1, <hostName>-2, … |
image, imagePullPolicy |
Session agent image (ghcr.io/holtdroid/holtdroid-session:main) and pull policy (IfNotPresent, Always, Never), applied to the redroid and sing-box images too. Missing images are pulled asynchronously while the UI shows provisioning progress. |
agentPort, tunnelPort |
Ports the agent listens on inside the session network namespace (defaults 18580 and 18581). |
redroid.images |
Android version → redroid image map (ghcr.io/holtdroid/holtdroid-redroid:<version>). Supports Android 11–16 on x86_64 and Android 12–16 on arm64; the newest configured version is the default. |
redroid.gpu |
Host DRI render node (default /dev/dri/renderD128). If the configured node does not exist on the Docker host (headless servers, arm64 hosts or VMs), provider-docker logs a warning and falls back to androidboot.redroid_gpu_mode=guest automatically; set "" to request software rendering explicitly. |
redroid.privileged |
false (default): drops all capabilities except the set Android needs (plus MKNOD for dynamic /dev/block/loopN nodes), applies Docker’s default seccomp profile plus userfaultfd, sets cgroupns: private, maps /dev/null to /dev/kmsg and sets device_cgroup_rules for loop and binder devices directly — no NRI plugin needed. true: runs the Android container privileged. |
redroid.shell, screens, fps, dataSize, args |
Shared with provider-emulator. |
resources, agentResources |
Memory and optional CPU limits (limits.memory, limits.cpu) applied as Docker container limits. Leave cpu unset so busy sessions can borrow idle cores. |
vpn |
Same vpn section as provider-emulator. When locations are configured, provider-docker starts a sing-box container on network, uploads the rendered config.json into it via the Docker archive API before starting, and joins both android and agent to its network namespace (network_mode: container:<vpn>). |
stateFile |
Optional JSON file persisting maintenance holds, lastActivity timestamps and in-place swapped artifactRefs across restarts (Docker container labels are immutable). Running sessions themselves always survive restarts through their container labels. |
hostCgroup |
Host cgroup v2 directory mounted read-only at /host/cgroup in the agent container so the session Device card shows Android’s container CPU and memory usage. Set to "" to disable. |
Container layout
Section titled “Container layout”Each session is a group of containers labelled holtdroid.managed-by=holtdroid-provider-docker and holtdroid.session=<id> plus a named /data volume holtdroid-data-<id>:
- Without VPN:
holtdroid-session-<id>-androidjoinsnetworkand owns the network namespace;holtdroid-session-<id>-agentjoins it vianetwork_mode: container:<android>. - With VPN:
holtdroid-session-<id>-vpn(sing-box) joinsnetworkand owns the network namespace; bothandroidandagentjoin it vianetwork_mode: container:<vpn>.
Stopping or reaping a session removes all containers and the /data volume carrying its session label.
Host requirements and security
Section titled “Host requirements and security”- Linux
x86_64orarm64withCONFIG_ANDROID_BINDERFSin the kernel (grep -w binder /proc/devices), or Apple Silicon macOS via Lima (deploy/docker/lima-holtdroid.yaml). Onarm64,provider-dockeradvertises nativearm64-v8aonly (Android 12–16_64onlyimages). - Docker Engine 25+ (Engine API v1.44+).
- Docker socket = root on the host.
provider-dockerneeds access to/var/run/docker.sock, and Android containers still share the host kernel. Run sessions on a dedicated host for trusted users — see Emulator security.