Converting my Grandmother's Old, Broken Phone into a Server

How I converted my grandmother's old, broken phone into an almost fully functioning server.

WebLinuxBashAndroidServer/Administration

Converting my Grandmother’s Old, Broken Phone into a Server

Around January of 2025, I gifted my grandmother a new phone because her old one was laggy and its touchscreen was broken. However, the internal hardware still worked perfectly fine, so I decided to convert it into a Linux server using Termux. Termux (not to be confused with the terminal multiplexer tmux) is a powerful terminal emulator built for Android that allows you to run Linux tools like Nginx and Node.js directly through the CLI. Here is how I converted my grandmother’s old phone into a web server:

Image of me connecting to the phone through SSH

  • Step 1: First, I factory reset the phone and cleaned the storage as much as I could. I then installed the F-Droid store to download Shizuku, Canta, and Termux. I started Shizuku by enabling developer mode and sending the ADB command from my computer. With Shizuku access granted, I used Canta to remove most of the heavy Samsung bloatware. Finally, I opened Termux, installed dropbear, and wrote a quick script to execute dropbear -p 43000. This allowed me to SSH into the phone from my laptop, making it much easier to configure and run.

  • Step 2: After connecting through SSH, I installed Python, Node.js, Git, Nginx, Neovim, and Figlet using the command pkg update && pkg upgrade && pkg install python nodejs nvim git figlet nginx (pkg is Termux’s package manager, based on apt). Then, I installed pnpm, which is more disk- and memory-efficient, using the command npm install pnpm@latest --global, which allowed me to use the pnpm command locally.

  • Step 3: After installing all the dependencies, I had three uses for the phoneserver.

    1. Host an FTP server with some files
    2. Host two static Astro sites
    3. Host the dynamic JNVCKM Site v2
  • Step 4: To do this, for the first one I asked Grok AI to build me a Python web server, then added some CSS to it and made a start script. To host the two Astro sites, I did cd && git clone https://github.com/hamb1y/portfolio && git clone https://github.com/hamb1y/orangesmp-website to get both of these sites onto my server. Then I did cd ~/portfolio && pnpm install && pnpm run astro build && pnpm run astro preview --host to first go into the portfolio root directory, then install all the dependencies, then build the site, then run the site to test that it did in fact work. I did the same for both of the Astro sites. Then I made a startup script for both of those, which looks like this:

    1. Portfolio:

    pkg update -y; pkg upgrade -y; pkg install git nodejs -y; npm install pnpm@latest --global; rm -rf ~/portfolio; git clone https://github.com/hamb1y/portfolio.git; cd ~/portfolio; pnpm install; pnpm run astro build; figlet "Server Started!"; pnpm run astro preview --host;

    1. OrangeSMP Website:

    pkg update -y; pkg upgrade -y; pkg install git nodejs -y; npm install pnpm@latest --global; rm -rf ~/orangesmp-website; git clone https://github.com/hamb1y/orangesmp-website.git; cd ~/orangesmp-website; pnpm install; pnpm run astro build; figlet "Server Started!"; pnpm run astro preview --host;

However, there are a few caveats which I found out later that made this almost useless:

  • There’s no root access, which makes everything much harder.
  • It only supports arm64 Linux programs. While it’s better than Windows, many programs can’t be used because of this.
  • !IMPORTANT! - Due to no root access, it becomes very difficult to port forward from here to the outside internet or a domain name. This made this phone almost entirely useless, and I had to find this out the hard way later.