APKIPA: a Flutter factory on a headless server

Signed release APKs Live web previews Headless Ubuntu

APKIPA turns a headless Ubuntu server into a Flutter build machine: edit code, and a TLS-protected web preview rebuilds itself; run one command, and out comes a signed Android release APK. No laptop toolchain, no CI vendor.

The problem

Building mobile apps normally chains you to a workstation with the full toolchain, or to a paid CI service. I wanted the whole loop on a server I already run: write Flutter code from anywhere, see it live in a browser, and ship an installable, signed APK from the same box.

What runs on the server

  • Flutter 3.44 with JDK 17 and the Android SDK (API 36, build-tools 36.0.0), installed and licensed on headless Ubuntu
  • A web preview at apkipa.tayyabcheema.com behind Nginx TLS and basic auth, rebuilt automatically on save by an inotify watch loop
  • Release signing with a managed keystore: flutter build apk --release produces a 42MB APK that passes apksigner verification
  • A config toggle between the live preview and a static release build

Getting hot reload to work behind an HTTPS reverse proxy was the hard part: Flutter's debug web server cannot initialise its debug channel through the proxy, a documented limitation. I root-caused it, switched the always-on preview to static release builds, and added the inotify auto-rebuild loop so saving a file still updates the preview.

Flutter source edit and save Headless build server Flutter 3.44 · JDK 17 · API 36 Live web preview Nginx TLS + basic auth Signed release APK apksigner verified inotify rebuild

Shipping for real: Snake Game

Infrastructure is only interesting if apps ship. Alongside the pipeline I built a cross-platform Snake Game in Flutter with guest play, email and Google sign-in, and a leaderboard that keeps your high score across devices, together with the store-ready support and privacy pages every published app needs.

Snake Game gameplay on an iPhone
Gameplay: Flutter rendering the game loop on iPhone.
Snake Game sign-in screen with email and Google options
Accounts: guest play, email or Google sign-in, cross-device high scores.
Flutter Dart Android SDK Nginx Ubuntu Server inotify