Dukoi Turns an Old Android Phone Into a Server

Old Android phone server running Dukoi

Dukoi is a free, open-source tool that turns a spare handset into an Android phone server you can deploy apps to in about two minutes. Its creator, a founding AI engineer at AGI Inc. working on a mobile personal agent, built it during weekend experiments with a phone left over on a desk.

The goal was a server that feels quick and tidy, without a Termux setup where a screen timeout can get your process killed.

Setup and deploys

You install the Dukoi APK on a spare phone. The app runs four checks that keep Android from killing the server, and each one turns green only when Android confirms it. Then you install the command-line tool on a laptop and pair the two over the same Wi-Fi.

Pairing takes a shell installer from dukoi.com plus dukoi pair. The computer finds the phone and displays a six-digit code, you approve it on the handset, and the two exchange keys. Nobody types a password, and all control traffic remains on the home network.

Running dukoi deploy inside a Node or static site folder ships the project. The heavy lifting happens on the laptop: it compiles the TypeScript, installs production dependencies and bundles the folder before sending it over Wi-Fi, so the phone never runs npm. A small Hono API goes live in about six seconds.

Zero-downtime releases and rollbacks

Each deploy becomes a numbered release, and the phone holds on to the latest five. The new version starts beside the old one, and Dukoi gives it up to ten seconds to respond on PORT. Only once it is healthy does traffic move over. A crashing build leaves the old release serving users.

A bad push can be undone with dukoi rollback, which returns to the previous release in about a second. The DATA_DIR sits outside the release folders, so rolling back code leaves data intact.

Keeping apps alive on Android

Android aggressively stops background apps to save battery, which is why most phone server experiments die overnight. Dukoi runs as a foreground service and watches every child process. Anything that dies is restarted within seconds, with a log line giving the reason. When the phone reboots, the apps that were running start again on their own.

Logs stream live to the terminal with dukoi logs, to the phone screen, and to a local web dashboard on the computer with restart and rollback buttons. Because a phone that stays plugged in all day can wear out its battery and swell, Dukoi also watches the battery and helps cap charging at 80 percent.

Android phone server versus a $5 VPS

The creator compares the hardware head to head. A $5 monthly VPS offers 1 vCPU, 1 GB of RAM and 25 GB of disk. Set that against a 2019 flagship sitting in a drawer: eight cores, 6 GB of memory, 128 GB of storage, a draw of just 2 to 5 watts and a battery that rides out power cuts.

The creator also wrote a benchmark, dukoi bench, to see what a phone does under load. On a Nothing A024 with 12 GB of RAM and Android 16, it handled 4,544 requests a second over Wi-Fi, with 99 percent of responses finishing within 13 ms. Ten minutes into a sustained test at 39 ยฐC, throughput through a public tunnel settled at 2,690 requests a second.

Databases, public URLs and agents

The phone can host databases next to your apps. Creating a Redis database launches Valkey 9.1, which uses roughly 10 MB of memory. Creating a Postgres database launches PGlite, a build of Postgres 18 that runs inside the phone’s Node runtime. Dukoi then supplies the right connection variable, REDIS_URL or DATABASE_URL, and restarts the app.

For phones behind carrier-grade NAT, dukoi expose creates a public HTTPS link in seconds, with no router configuration. You can also point your own domain through Cloudflare.

The tool is built for coding agents too. Installing the command-line tool teaches Claude Code, Codex and Cursor how to use it. Every command supports –json, and dukoi mcp lets any MCP client talk to the phone directly. That means you can ask an agent to build a Telegram bot that sends a morning weather report and deploy it to the phone.

What a spare phone can run

With hosting free and deploys this quick, an Android phone server suits small projects that nobody would spin up a cloud server for.

Suggested uses are small and personal: an MCP server that gives an AI assistant memory on hardware you own, a private file drop, a webhook inbox for testing Stripe or GitHub, a cron runner and an uptime monitor that alerts you when a site goes down.

Dukoi is free, open source at thisuxhq/dukoi on GitHub, and live at dukoi.com. A benchmark from one phone says little about every device, but anyone with an old handset in a drawer can try it at no cost.

Source: Sanju's Space

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.