ServerBox README

The project's README from github.com/madeye/ServerBox. As one markdown file: README.md.

ServerBox

Turn a used Android phone into a Linux server, no root required.

An old phone is a small, quiet, low-power computer with a battery backup and Wi-Fi built in. ServerBox puts a real Linux distribution on it and keeps an SSH server running, so you can use it like any other box on your network: host services, run scripts and cron jobs, or tinker.

ServerBox is a fork of UserLAnd by CypherpunkArmory (UserLAnd Technologies, LLC) and, like UserLAnd, is licensed under the GPLv3.

What it does

Screenshots

Apps New filesystem Server settings
Apps tab listing the Linux distributions and the coding agents Creating a filesystem with a user name and password Server settings: start on boot, SSH from the network, authorized keys

Download

Get the APK from Releases. ServerBox needs Android 8.0 or later. Every distribution is available for 64-bit ARM (nearly all current phones) and x86_64; 32-bit support varies by distribution.

Releases are signed with this certificate (SHA-256), which you can check with apksigner verify --print-certs serverbox-<version>.apk:

55:40:C1:F2:4F:5D:44:86:C5:96:EF:76:0A:8C:E9:8C:8E:68:FE:45:AF:C9:E9:54:1C:C6:3D:EF:3E:7A:76:B5

Builds from before 1.0 were signed with a different key, so Android can't update them to a release: uninstall the old build first. Uninstalling deletes its distributions and sessions.

Getting started

  1. Install ServerBox and open it.
  2. Pick a distribution on the Apps tab. ServerBox downloads it (the setup log shows each step) and opens a terminal.
  3. Open the Sessions tab for the SSH command, user and password.
  4. To connect from your computer, turn on Settings → Allow SSH from the network, then run the command shown on the Sessions tab.

Keeping the server running

Android pauses background apps to save battery, which makes a server stop answering once the screen is off. When ServerBox first runs a server it asks to be exempted from battery optimization; allow it. Some vendors add their own restrictions on top:

Keep the phone on a charger, and consider reserving its IP address in your router so the SSH address stays the same.

Building

Builds need JDK 17.

./gradlew :app:assembleServerBoxDebug
./gradlew testServerBoxDebugUnitTest :terminal:testDebugUnitTest lintServerBoxDebug

Instrumented tests (Room migrations and DAOs, the terminal's PTY) run on a connected device or emulator:

./gradlew :library:connectedServerBoxDebugAndroidTest :terminal:connectedDebugAndroidTest

./gradlew :app:assembleServerBoxRelease signs the release APK when a keystore is configured in local.properties (or the same names as environment variables); without one it builds unsigned:

KEYSTORE_PATH=/path/to/keystore
KEYSTORE_PASSWORD=...
KEY_ALIAS=...
KEY_PASSWORD=...

The distribution images are built in madeye/ServerBox-Images and published to ghcr.io/madeye/serverbox-<distro>.

Credits

ServerBox is forked from UserLAnd and its library (UserLAndLibrary) by CypherpunkArmory (UserLAnd Technologies, LLC), who hold the copyright on the original code. ServerBox's changes are copyright Max Lv. Like UserLAnd, ServerBox is released under the GNU General Public License v3; the full text is in LICENSE and the copyright notices are in COPYRIGHT.

ServerBox (madeye/ServerBox)

Searching Database…

Что это?ServerBox — приложение для Android, которое превращает старый телефон в Linux-сервер без рут-доступа, запуская Alpine, Arch, Debian, Kali или Ubuntu с постоянно работающим SSH-сервером.
Это инструмент для получения рута или он работает на обычном телефоне?Рут не нужен: Linux-дистрибутивы работают целиком в пользовательском пространстве через PRoot — как контейнер поверх нетронутого Android.
Как поднять Linux-сервер на своём телефоне?Установите APK, выберите дистрибутив на вкладке Apps (он скачается и откроется в терминале), затем посмотрите на вкладке Sessions SSH-команду, пользователя и пароль.
Мой старый телефон должен быть какой-то конкретной модели?Подойдёт любой телефон с Android 8.0 или новее; дистрибутивы собраны для 64-битного ARM (большинство современных телефонов) и x86_64, с разной поддержкой 32 бит.
SSH-сервер продолжает работать при выключенном экране?Оптимизация батареи Android обычно убивает фоновые приложения при выключенном экране, поэтому ServerBox нужно исключить из оптимизации, а на прошивках некоторых вендоров (например, Xiaomi/MIUI) дополнительно требуются настройки автозапуска и энергосбережения, чтобы сессии оставались живыми.
Там есть предустановленные AI-агенты для кодинга?Приложения Claude и Codex — это образы Debian с предустановленными Claude Code от Anthropic или Codex CLI от OpenAI, плюс Node.js, git и ripgrep. Вы просто подключаетесь по SSH и входите под своим аккаунтом или API-ключом.
Можно сделать, чтобы сервис запускался автоматически вместе с сервером?Да, положите исполняемые файлы в /etc/serverbox/autostart.d внутри дистрибутива, и они будут запускаться при каждом старте его сервера, с логами в /var/log/serverbox-autostart.log.
Может ли дистрибутив работать как настоящая ВМ вместо PRoot?На телефонах с поддержкой Android Virtualization Framework дистрибутивы могут работать и как полноценная виртуальная машина через сопутствующее приложение.
Можно ли внутри Linux-дистрибутива получить доступ к файлам из памяти телефона?Да, общее хранилище телефона смонтировано как /sdcard внутри каждого дистрибутива, и ServerBox запрашивает доступ к папке, когда программа впервые в нём нуждается.
Creator
madeye
Size
41.5 MB
Stars
264
Age
22d
Commits · 90 Days