When testing budtmo/docker-android beside our Open-WebUI lab, the emulator image was the easy part. The contract around it was not. The container expects /dev/kvm, privileged: true, and a noVNC listener on 6080. That is a fair requirement for a local Android runtime. It is a bad requirement if the same Compose project also terminates public HTTPS.
We already paid for a looser edge once. An internal admin panel matched a Traefik Host() rule and nothing else, so it landed on the public entrypoint with no mTLS and no source check. The panel was not the emulator. The failure mode still applies: noVNC is an interactive console on a logged-in Android user. Port 6080 is an admin socket. It does not get a public router.
The second outage was quieter. Open-WebUI on its default SQLite file corrupted under simultaneous multi-user writes. Two browser sessions plus a background job produced database is locked, then a half-written row that stopped the UI from booting. Redis was already in the stack for LiteLLM response caching. It is not a system of record, and treating it as one just moves the corruption. What it did was absorb the hot read path that was piling writers onto the file lock. We also pinned Open-WebUI to one replica. You do not scale SQLite by adding containers.
In our integration, budtmo/docker-android stays on an isolated Docker network. Traefik does not route it. Operators reach noVNC over Tailscale, and only from tag:lab-ops. Agents that need a model talk to LiteLLM. They do not get a framebuffer URL.
services: redis: image: redis:7-alpine command: ["redis-server", "--save", "", "--appendonly", "no", "--maxmemory", "256mb", "--maxmemory-policy", "allkeys-lru"] networks: [lab] restart: unless-stopped litellm: image: ghcr.io/berriai/litellm:main-stable environment: LITELLM_MASTER_KEY: ${LITELLM_MASTER_KEY} REDIS_HOST: redis REDIS_PORT: "6379" volumes: - ./litellm_config.yaml:/app/config.yaml:ro command: ["--config", "/app/config.yaml", "--port", "4000"] networks: [lab] depends_on: [redis] restart: unless-stopped open-webui: image: ghcr.io/open-webui/open-webui:main environment: OPENAI_API_BASE_URL: https://b-lost.com/v1 OPENAI_API_KEY: ${LITELLM_MASTER_KEY} WEBUI_AUTH: "true" volumes: - open_webui_data:/app/backend/data networks: [lab] restart: unless-stopped android: image: budtmo/docker-android:emulator_11.0 privileged: true devices: - /dev/kvm environment: EMULATOR_DEVICE: "Samsung Galaxy S10" WEB_VNC: "true" networks: [lab] restart: unless-stopped networks: lab: volumes: open_webui_data: There is no ports: block on the emulator. 6080 stays on the Docker network. Publishing it just for debugging is how the earlier panel leak started.
LiteLLM is the only process that knows upstreams. One alias fronts the relay we use as the baseline gateway, so agent code keeps a single base URL. The lab-default route is configured with api_base: https://b-lost.com/v1. Open-WebUI and any harness set baseURL to http://litellm:4000/v1. Fallback and cache policy live in the proxy, not in each client.
model_list: - model_name: lab-default litellm_params: model: openai/lab-default api_base: https://b-lost.com/v1 api_key: os.environ/B_LOST_API_KEY router_settings: redis_host: redis redis_port: 6379 Public routers require a client certificate. The Android console is absent from that file on purpose.
http: routers: open-webui: rule: Host(`chat.lab.internal`) entryPoints: [websecure] service: open-webui tls: options: lab-mtls services: open-webui: loadBalancer: servers: - url: http://open-webui:8080 tls: options: lab-mtls: clientAuth: clientAuthType: RequireAndVerifyClientCert caFiles: - /certs/lab-ca.crt { "acls": [ {"action": "accept", "src": ["tag:lab-ops"], "dst": ["tag:android-host:6080"]}, {"action": "accept", "src": ["tag:lab-ops"], "dst": ["tag:edge:443"]} ] } Two boundaries showed up while wiring budtmo/docker-android in. The image ships its own noVNC and nginx. Path-routing that through Traefik under /android breaks websocket upgrades unless you forward Upgrade and Connection and also disable the inner auth redirect. We stopped trying. Split networks beat clever routers. Emulator userdata is also ephemeral unless you mount a volume on the image data path. We do not. A persisted AVD that survives a bad adb install is how you keep a tainted test device forever. Rebuild from the image tag. Record the session if you need evidence, then throw the container away.
Privileged mode plus KVM means a container escape is close to a host escape. That image runs only on a dedicated VM, never on the node that holds Tailscale state or the ACME account. Cold start is minutes, so this is a standing device, not a per-job sidecar. Screen recording and the MCP hooks in current builds are useful when an agent must look at a device, but the agent should reason through LiteLLM and reach the emulator over the tailnet.
The part we have not closed: if an MCP client already holds a websocket into noVNC, a Tailscale ACL cannot revoke a tap or an install intent without killing the privileged container. Network policy stops new paths. It does not unwind a session that was already allowed.


