44 comments

[ 4.4 ms ] story [ 53.8 ms ] thread
so once you have a web server on the phone how are you able to make it available publicly on the internet? don't ISPs detect these and ban? are you using wireguard or something like that?

ive been looking to build and serve my own servers and i have been considering to use old android phones to outright racks but the part I am still struggling to figure out is how to serve it publicly without ISP catching on as they require business plans for that and its not cheap

> don't ISPs detect these and ban

No? I mean, I'm sure there are ISPs out there that do it, but that's a ridiculous thing to do.

In my experience (in Germany and Switzerland) ISPs don’t care, but they will rotate everybody’s IP once or twice a year.

Friends from other countries, India for example, have had different experiences though, where IPs were on a much more frequent rotation and required scripted solutions.

Title should be updated to include "unused android phone"
Nothing beats my toaster serving my webpages.
I have wireguard and basic home automation things running as an experiment on vacuum cleaner. Its app was deadly slow, so having 2 cores and some memory to spare he became his own savior, with Valetudo included.
This sounds like a fun project. A perfect use for an old android phone sitting in the junk drawer.
For some reason, I never buy phones that work with postmarketOS :( And I find phone naming confusing, it's difficult to find a used one locally to play with. Is it a Moto Play 2018 or a Play 2020? Trying to get that information from someone on Facebook marketplace is like pulling teeth.
All my old phones used to become BOINC nodes doing WorldCommunityGrid or seti@home, at least until we got to the point where you couldn't run the phone without a battery anymore. Came home to one too many spicy pillow'd phones even keeping them in a cool area with a rigged up fan blowing on them.
The thing that holds me back from this is always the battery. I want to have my battery removed so that it doesn't eventually become a time bomb, but it's a pain on modern phones and I'm not even sure if they boot without. The mobile hardware reuse space can suck for hobbyists.
Red Magic can be set to not use the battery when the power cable is plugged in. (it is to avoid heating issues and not degrade the battery)
In theory, you can replace the battery with a chunky enough capacitor (to get past the power-on surge) and a power source at the right voltage attached right where the battery would go. The soldering points are way too tiny for my amateur soldering skills, though.
hopefully "bypass charging" becomes more of a thing in the future. a few of the latest pixel phones use it but the only other time ive seen it is on tablets aimed at gaming
> I grabbed a few power point timer switches, and set them to only over up the charger for a hour a day. Never had another battery puffing failure - at last not in the next 2 or 3 years before I left.

[0] https://news.ycombinator.com/item?id=45021233

Don't even need postmarketOS.

Simple root, with a custom degoogled rom, and termux is all you need.

Can't you just run a Linux VM on Android these days?
"Simple root"

You don't need root if you webserver is listening on a port over 1024.

Termux plus some webserver like nginx is all you need.

Now to make it reboot resistant is another story.

Hell, even simpler. Termux + Caddy + cloudflared with a domain you own. Serving in 15 min.
As others have mentioned you have to watch the battery if you do this for real.

The battery will swell and explode if you run 24x7 on a phone.

If the device can run PostmarketOS with a mainstream kernel, then it can run any Linux distribution. (I put Arch ARM on such devices, since I like that distro.)

That's the big hurdle though - mainstream kernel support.

For most devices, even if they can be rooted and jailbroken, you're stuck with the kernel they come with. Doesn't have a new feature you need? A horrible security flaw in the network stack? You're out of luck. Most "repurpose your old phone" approaches have this problem. You can make it a server but you wouldn't want to expose it to the public Internet.

Is Arch ARM officially supported by the same team? If not, what might be the reason?
s/mainstream/mainline/

But yes, this is definitely an issue. I've been playing with a 2013-era Samsung device that came with a 3.0 kernel. It can run pmos with said kernel but there are multiple root LPE vulns. I've been looking into getting it to run a mainline kernel just for fun, but it's not going to be easy.

The main question is WHY? I already have a 3570K box running our NAS, plex, Wifi repeater admin, etc, etc, and it would be trivial to put up a web server via python or something.. If I had any need for it.
For some reason I was expecting a RasPi in a rotary phone enclosure.
I use my old phone to proxy serial data to tcp. Also gives me macros and a video/audio feed. But most relevant to this is it has a built in webserver.
It's through this link that I today discovered that a surface RT can run Linux. I think I got rid of mine already. Would have been nice to breathe some life into it
I can run a web server on a $1 microcontroller, so what?
I tried this once a few years ago.. had half a dozen Samsung Android phones running an SSH daemon with some functionality that could be remotely accessed. However, what I learned is that phones generally don't like to run 24/7 as servers. They start giving you trouble after a while, never figured out why.

But I suspect it's just the "always on" nature and the battery. The usage pattern is just entirely different than having a phone in your pocket and using when you need it.

You're welcome to try though, maybe phones got more reliable.

better of compiling android kernel with docker support and using docker
I have an old iPhone XS lying around with a broken digitizer. Basically, it's recording phantom touch events all the time, making it unusable. Though the screen itself, camera, CPU etc. are all working fine.

Any ideas what I can do with it to give it some purpose?

Inspired by this, went to look into how much performance I can squeeze and turns out Qualcomm software practices are so bad that I can’t do much but accept old software.

It sounds like Qualcomm has to do everything from scratch on their hidden Linux software for every new chip.

There is a much easier way to do this without renting a VPS or anything. If you download and install the Localtonet application from Google Play or Termux, it is very easy to do.
With proot-distro under Termux, you can also run a container with proot-docker script.

Right now you have to find a skopeo binary for your arch, but that's WIP.