A homelab that keeps running when the power cuts.

Your old Android phone has a battery, mobile data and a Linux kernel. Droidspaces runs full Linux distributions on that kernel as containers, with systemd or OpenRC as PID 1. No emulation, no virtual machine.

Release v6.6.0, GPLv3. 2,278 stars and 89 contributors on GitHub.

The Containers screen of the Droidspaces app, listing Alpine, Docmost and OpenWRT containers, each running, with stop and restart buttons
The Systemd Services screen of a container, with 20 units running, listing act_runner (the Gitea Actions runner), chrony, containerd and cron, each running with stop and disable buttons

Set it up once. Forget it.

Droidspaces is an alternative to Docker and LXC, built for a phone. Your services run the way they would on a Linux server, and after the first setup nothing needs you.

  1. Your phone boots.

    After an update, a reboot or a flat battery.

  2. Droidspaces starts your containers.

    From init.rc or a boot script, before you unlock the phone, while /data is still encrypted.

  3. The init system starts your services.

    systemd or OpenRC brings up every enabled unit. No app to open, no command to type.

  • Gitea
  • Jellyfin
  • Docmost
  • Tailscale
  • Trilium
  • VS Code server
  • Cloudflare Tunnel
  • ntfy
  • Uptime Kuma
  • Immich
  • Nextcloud
  • Vaultwarden
  • Pi-hole
  • Home Assistant
The app's built-in terminal inside an Ubuntu container showing fastfetch output and systemctl status with systemd as PID 1 and services such as docker, gitea, jellyfin and ssh running

A real Linux, not an emulation.

Each container gets its own PID, mount, UTS, IPC, cgroup and network namespace on the phone's kernel, behind NAT by default. systemd boots as PID 1 in 150 to 750 ms.

  • systemd
  • OpenRC
  • runit
  • s6
  • PID namespace
  • Mount namespace
  • Cgroup v1 and v2
  • journald

It sits on your network like a server.

Each container has its own monitor daemon, detached from the app, so closing or uninstalling the app stops nothing. Inside a container you run services the way you would on a Linux server, including nested containers: Docker, Podman and LXC itself.

  • NAT networking
  • Host networking
  • Port forwarding
  • OpenWRT as a gateway
  • Docker
  • Podman
  • Flatpak
  • bwrap
Container settings with port forwarding, DNS servers, and switches for Android storage, hardware access, GPU access, Termux:X11 and VirGL
The Home screen showing the backend installed with the daemon running, four containers, kernel version, SELinux enforcing, Android 15 and aarch64
Home: backend state, kernel and architecture.
Container info for Ubuntu 24.04: distribution, hostname, uptime of 8 days, IP addresses, CPU and RAM usage, disk usage, users and a terminal button
Container info: addresses, CPU, RAM, disk and users.
The Panel screen with uptime, IP addresses, CPU and RAM for four containers
Panel: uptime and usage for every container.

Run it from the app.

Install, start, stop and edit containers, open a terminal inside one, and watch its CPU, memory and addresses. The phone's hardware is one switch each.

  • Turnip on Adreno
  • VirGL
  • Termux:X11
  • PulseAudio
  • USB
  • Sensors

What each approach costs.

Linux on Android has several routes: PRoot, chroot, LXC or Docker through Termux, and Droidspaces. Each one pays for something. This is the bill.

DroidspacesLXC via TermuxDocker via TermuxchrootPRoot
TechnologyNamespacesNamespacesNamespacesPath redirectionSyscall hooking
PerformanceNativeNativeNativeNativeModerate
Boot time150 to 750 ms on systemd750 to 2000 ms on systemdNo initNo initNo init
Init supportFullFullNoneNoneNone
PersistenceA monitor process per containerLowLowLowLow
Hardware accessOne switchManual setupManual setupManual setupNone
GPU accessOne switchManual setupManual setupManual setupModerate
Termux:X11One switchManual setupManual setupManual setupModerate
Privileged modeFull, configurable (nomask, nocaps, noseccomp)Manual setupYes (--privileged)FullNo
Run at bootYes, from init.rc or service.dNoNoNoNo
Portable rootfs.imgYesNoNoNoNo
Binary size400 KB10 MB or more50 MB or moreNone needed10 MB or more

Get it running.

The APK carries the runtime and the app. Linux gets a static tarball.

Android

  • Kernel 3.10 or newer
  • Root through KernelSU, Magisk or APatch
  • A kernel built with the documented configuration
  • aarch64, armhf, x86_64 or x86

Linux

  • Kernel 3.10 or newer
  • Root, or a running droidspaces daemon
  • No custom kernel
  • aarch64, armhf, x86_64, x86 or riscv64