Droidspaces is a container runtime that boots full Linux distributions with their own init on rooted Android phones and Linux PCs, sharing the host kernel for native speed without emulation or virtual machines.
- v7.2.0
- Published at
- 19d ago
- 2,492
- Stars
- 25,299
- Download
- Synced at
- 16d ago
Latest release
v7.2.0Nov 7, 2026, 12:43 PMREADME
Project Overview
Running a full distribution with systemd on a phone is awkward: a virtual machine drags performance down, and a chroot has no process or network isolation. Droidspaces boots containers straight on the host kernel of a rooted Android phone or a Linux PC, and every container starts its own init (systemd, OpenRC or anything else) as PID 1. Nothing is emulated and nothing is virtualized, so programs run at native speed. The whole backend is a single static binary under 400 KB, and the Android app drives it so the first container can be created without a terminal.
| Item | Value |
|---|---|
| Platform | Android (root required), Linux |
| Backend size | Single static binary, under 400 KB |
| Network modes | NAT, Gateway, Macvlan, Host, None |
| License | GPL-3.0 |
| Architectures | aarch64, armhf, x86_64, x86, riscv64 |
Containers share the host kernel, so boot is fast and
rebootplus systemd services work inside the container.
Key Features
- Real init boot: the first process in a container is the init you pick (default
/sbin/init), so systemd services, timers and logs behave as usual - Five network modes:
--netacceptsnat(default),gateway,macvlan,hostandnone; NAT gives every container an address inside172.28.0.0/16with internet access and no setup - Port forwarding:
--port=8080:80maps a host port to a container port, including equal-size ranges such as1000-2000:1000-2000and explicit TCP or UDP - Desktop and audio: a desktop through Termux:X11 or Anland, GPU acceleration via VirGL or Turnip, and sound through PulseAudio, each behind an in-app toggle
- Hardware passthrough:
--hw-accesshands the host/devto a container, while--gpumirrors only the GPU render nodes, with USB, sensors and block devices exposed on demand - Resource limits:
--memory,--cpusand--pids-limitcap memory (minimum4M), CPU quota and process count (minimum 16) - Boot-time start: on Android a container can start before unlock and keeps running after the app is closed or even uninstalled
- Scriptable output:
show,infoandcheckreturn structured data with--json, which scripts can read to track container state and kernel probes
CLI and Configuration
- One binary on both sides: Linux and Android share the same
droidspaces; on Android it lives at/data/local/Droidspaces/bin/droidspaces - Common subcommands:
start,stop,restart,enter,run,show,info,pid,scan,check,daemonandmode - Config lookup order: the file named by
--configfirst, thencontainer.confignext to the rootfs, thenContainers/NAME/container.configin the workspace - Workspace paths:
/var/lib/Droidspaceson Linux and/data/local/Droidspaceson Android - No sudo needed: when the daemon answers, commands are handed to it, so members of the
droidspacesgroup can work withoutsudo; setDS_NO_PROXY=1to let the binary handle it directly - Read-only runtime copy: the config a container booted with is visible inside it at
/run/droidspaces/container.config, for scripts only
Target Audience
- Power users running full Linux on a phone
- People turning an old phone into a home server
- Developers who need an isolated test environment
- Kernel maintainers porting support on Android
- Ops engineers experimenting with light containers
Quick Start
Android App
- Install the APK and grant root (KernelSU recommended, Magisk and APatch also work), then open it, tap Get Started and run Check Root Access
- The app installs
droidspacesand a static BusyBox into/data/local/Droidspaces/bin; reboot when asked so the SELinux rules and the boot daemon take effect - Open the Containers tab, tap +, choose Repository, pick a distribution, tap Download and then Install
- Tap Start, then switch to the Panel tab and tap Terminal for a shell
Linux CLI
- Run
sudo ./droidspaces checkto probe the kernel for the namespaces and cgroup support Droidspaces needs - Prepare a rootfs directory or an ext4 image, for example at
/srv/web.img - First start:
sudo droidspaces --name=web --rootfs-img=/srv/web.img --port=8080:80 start - Later starts need only
sudo droidspaces --name=web start, andsudo droidspaces --name=web enteropens a shell
System Requirements
| Item | Requirement |
|---|---|
| OS | Android 8.0 or newer (root required); mainstream Linux desktop distributions |
| Kernel | 3.10 or newer, best compatibility on 4.9 and newer |
| Architecture | aarch64, armhf, x86_64, x86, riscv64 |
| Kernel features | PID and IPC namespaces plus cgroup support enabled |
| Root method | KernelSU recommended; Magisk and APatch supported |
Notes
- Verify the kernel first: most stock kernels lack the required options, so run
checkor read the in-app probe result; containers will not boot without them - GrapheneOS is unsupported: it blocks the system calls container isolation relies on, with or without root
- SuSFS needs a setting change: turn off Hide sus mounts for all processes, otherwise containers fail to boot
- Passthrough is risky:
--hw-accessexposes raw block devices, and a wrongddormkfsinside the container destroys phone partitions - Respect the root boundary: root inside a container can still reach the host, so run only trusted code and use a normal user with
sudoday to day