Turn an Old Android Phone into a DIY Backup Server with UrBackup and Linux Deploy
This step‑by‑step guide shows how to root an Android phone, install Linux Deploy with Debian Buster, configure UrBackup server, and connect clients, turning the device into a functional home backup server despite hardware and Android‑specific limitations.
This tutorial explains how to repurpose a cracked Android phone (e.g., Pixel 4a) as a backup server using UrBackup and Linux Deploy. After rooting the device (preferably with Magisk) and installing the Linux Deploy and BusyBox APKs, you deploy a Debian Buster chroot environment.
Preparation
Root the phone and ensure the boot image matches the device firmware.
Install Linux Deploy (latest from GitHub) and a compatible BusyBox version.
Gather a charging cable, an external USB‑HDD/SSD (preferred over SD cards), a USB dock with Ethernet, and an Ethernet cable.
Step 1 – Deploy Debian with Linux Deploy
Download the Linux Deploy and BusyBox APKs, install them, and note BusyBox’s install path (e.g., /system/xbin).
Open Linux Deploy, go to Settings, and configure:
Architecture: arm64 (AARCH64).
Image path: default ${EXTERNAL_STORAGE}/linux.img or an internal storage path.
Image size: at least 15 GB.
Filesystem: EXT4 (the only one compatible with UrBackup on Android).
Init system: set to sysv so cron jobs run.
Mount point: set appropriate path for external block devices.
Set the PATH variable to the BusyBox location and update the environment.
Start the deployment and wait for the Debian system to boot.
Step 2 – Install and Configure UrBackup Server
SSH into the newly deployed Debian (IP is the same as the phone, port 22) as root.
Update the system: apt update && apt upgrade -y && apt install wget Download the UrBackup server package:
wget https://hndl.urbackup.org/Server/2.4.13/urbackup-server_2.4.13_arm64.debCreate the backup directory (e.g., /mnt/backup) and set ownership to the urbackup user:
mkdir -p /mnt/backup chown urbackup /mnt/backup chgrp urbackup /mnt/backupStart UrBackup manually (systemd is unavailable in the chroot):
/usr/bin/urbackupsrv run --config /etc/default/urbackupsrv --no-consoletimeCreate a wrapper script ( /usr/bin/urbackupsrv-start) containing the above command and make it executable:
#!/bin/sh /usr/bin/urbackupsrv run --config /etc/default/urbackupsrv --no-consoletime chmod 755 /usr/bin/urbackupsrv-startLaunch the service with urbackupsrv-start. Use pkill urbackup to stop it.
Add a reboot cron job to restore permissions and restart the service:
@reboot chown urbackup /mnt/backup && chgrp urbackup /mnt/backup && urbackupsrv-startAccess the web UI at http://YOUR_SERVER_IP:55414 to finish configuration.
Step 3 – Connect Clients
In the UrBackup web UI, add a new client (Internet client behind NAT) and give it a hostname.
On each client machine, install the UrBackup client. For Linux, run:
TF=$(mktemp) && wget "https://hndl.urbackup.org/Client/2.4.11/UrBackup%20Client%20Linux%202.4.11.sh" -O $TF && sudo sh $TF && rm -f $TFEnsure the client service is running ( service urbackupclientbackend status) and start it if necessary.
Configure the client to point to the server:
urbackupclientctl set-settings \ -k internet_mode_enabled -v true \ -k internet_server -v "YOUR_SERVER_IP" \ -k internet_server_port -v "55415" \ -k computername -v "YOUR_CLIENT_NAME" \ -k internet_authkey -v "YOUR_DEFAULT_AUTHENTICATION_KEY"In the server UI, enable the client, set backup directories (semicolon‑separated if multiple), and adjust backup intervals as needed.
Restart the server ( pkill urbackup && urbackupsrv-start) and verify the client appears online.
After these steps the Android phone runs a Debian‑based UrBackup server capable of backing up multiple machines on the home network. Note that the setup uses EXT4 (no compression), cannot invoke systemd, and the Linux client does not support image backups, though file backups work fine.
Liangxu Linux
Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
