Skip to content(if available)orjump to list(if available)

This blog is running on a recycled Google Pixel 5 (2024)

BLKNSLVR

I like the idea of using old phones for infrastructure-lite applications, taking advantage of their low power requirements and built-in UPS (which, yes, has its own drawbacks which can only be mitigated to a certain degree).

I have a number of old android devices that I'd like to use for ...something cool like this, but my existing homelab infra could just add an extra VM or container to do this without any likely additional power draw. It's still cool and I want to do it though.

My only query about this cool project is why not wifi? Whilst I'm sure there's a good reason for the author (and I can understand having esoteric specific requirements because I have my own "things"), but it would negate the need for a docking->Ethernet device, which feels to me like unnecessary addition of a device that requires power. Also, bandwidth / throughput probably isn't much of a limitation given the device that's being used. I think I'm mainly interested in the author's specific reason for this requirement (I'm a BA, these questions are my bread and butter).

Comment to author: Gotta add the Pixel 5 to your homelab inventory! Also, nice site, layout and information.

qwertox

I have my Pixel 3 magnetically attached to my keyboard, to the left side, next to the tab, caps lock and other keys. It displays a webpage of a grid of buttons which do things when I press them, like inject the current timestamp at the cursor position, toggle my monitors on and off, launch certain apps.

Because I wanted an Elgato Stream Deck but then thought that I have this unused phone.

easyThrowaway

> I like the idea of using old phones for infrastructure-lite applications, taking advantage of their low power requirements and built-in UPS (which, yes, has its own drawbacks which can only be mitigated to a certain degree).

I'd love to see a..."serverization" kit for some mobile devices, like the "consolized" kits developed for the game boy advance[1]: Extract the mainboard from your phone and extend it by directly interfacing it with external storage, a better power supply and a physical network interface.

[1]https://fingercramp.com/portfolio/gba-consolizer-play-your-f...

Palomides

approximately 0% of phones can be easily opened up, or have any way to extend their hardware other than usb

dec0dedab0de

Nobody doing this sort of thing really cares about easy

cinimodev

Hey, blog author here. Thanks!

I agree that a VM or container doesn't add to the power usage for a homelab that's already running. I kinda did it for fun and being able to run it off solar. I had original plans to turn the lab off at night and then the phone could keep running from battery. But, the homelab became critical infra and has to be always on lol.

The requirement for Ethernet was just for bandwidth consistency. My WiFi network isn't the best.

rollcat

> I had original plans to turn the lab off at night and then the phone could keep running from battery. But, the homelab became critical infra and has to be always on lol.

I've rebuilt my entire setup a while ago to "tolerate" power loss.

- Everything is sliced into three zones: "always-on", "desktop", and "homelab". The latter two through a smart plug, so that power can be cut.

- Always-on includes the SOHO router/AP, a RasPi4, and my Mac mini. The router's switch has only two ports populated: the Pi, and the Big Switch.

- Desktop is things like the screen, speakers, dock, wireless charger, camera (dummy battery), cute lamp, etc. All of this can tolerate power loss at any moment.

Homelab: this is the tricky part. There's a big (52 ports!) switch that "everything else" is plugged into, including my Mac (yay 10Gig Ethernet, not sure what for). A bunch of SBCs like Pis, NVidia Jetsons, x86's, etc. Nothing important, still figuring out what to do with all of that, so I kinda don't care if the power is cut.

The important bit is the NAS (RAIDZ 3x3TB). ZFS makes you feel like you're invincible, but I've still built something to keep it clean: 1. it's powered down until required; 2. the router has a cron job to WoL the NAS 5min before all backup jobs start; 3. the NAS has its own cron job that waits for the backups to complete, then waits for all SSH sessions to terminate, then shuts itself down. You can kill the script via SSH.

What I'm planning to do is to build a simple daemon for each box, that checks in once per minute or so, to ask if it's time to shut down. Once everyone is clear, cut the power. Somewhere far down my TODO list ;) until then, you can also use an iOS shortcut to SSH to each box before asking HomeKit to throw the switch, but storing passwords is fugly and handling separate pubkeys is too much bother. So I'm mostly happy with it as-is.

_R_

On Android devices, it’s generally difficult for apps to maintain persistent background services. I’m curious how you were able to prevent Android from terminating the process, and how the Pixel 5 server managed to keep running?

cinimodev

It runs inside Termux, which has a persistent notification to keep it open in the background. I believe I also extended the max phantom process to prevent it from being killed.

varenc

> why not wifi?

I'm not the author but can speculate. WiFi is higher latency and a bit probabilistic. Like the slowest 1% of requests to the server may take an additional 1000ms or so. And if I was running a blog from a phone I'd want it to be impressively fast. Also an old Android phone may not be able to use modern WiFi standards and it could struggle with the traffic from being on the HN homepage.

Aachen

Old phone? It's a Pixel 5 from five years ago. My first Android ever in 2012 already supported 802.11ac with speeds faster than any internet connection I've ever had

TheBicPen

Are you sure? Supporting 802.11ac in 2012 is pretty amazing considering that the standard was finalized in late 2013.

lhamil64

One issue I have with doing this is what about security? Many older android phones don't get updates anymore (I'm not sure if a Pixel 5 is still supported, it might be) so I'd be concerned about security vulnerabilities going unpatched especially if the phone is exposed to the internet.

ryukafalz

This is one of the longstanding issues with Android, yeah. Pixel 5 went EOL in 2023, though did get some extra (probably security) updates last year.

OEMs and SoC manufacturers have been getting better about upstreaming stuff recently from what I've heard (thank you Qualcomm!), but as far as stock OS images go I wouldn't expect manufacturers to support them for one moment longer than they have to.

This is part of why efforts like PostmarketOS are so helpful. Ironically, if this was an even older Pixel 3a, you could run it with modern software: https://wiki.postmarketos.org/wiki/Google_Pixel_3a_(google-s...

monkeyelite

Limit your attack surface by using a simple stack, and limit the incentive for hacking. Countless sites operate just fine on old software.

tommica

I've had this dream of doing it in Elixir, and use it's capability to easily connect nodes securely together, to add more processing power into the system through by just slapping more phones at it.

ethagnawl

This sounds a lot like the GRiSP project: https://www.grisp.org/

koolala

If you have to plug it in anyways, may as well power + ethernet.

bigiain

I laughed at "Having a website that is fully offgrid". I _guess_ not being connected to the electrical grid while still being connected to the internet qualifies as "offgrid", but it kinda feels wrong to me.

nine_k

Why, consider a device, like a mobile phone, which is not connected to power grid (solar-charged instead) and uses radio to access the Internet (typically 4G). I think it would be as off-grid as it gets. Quite a bit of off-grid equipment, like weather stations, traffic cameras, etc do exactly that.

rendaw

Are you saying the power required for wifi transmission is lower than the power required for usb?

Also, what's a BA?

tim--

I am guessing a business analyst (https://en.wikipedia.org/wiki/Business_analyst). Basically, someone who facilitates creating and communicating stakeholder analysis across a business. The idea is that a BA would have a thorough understanding of everything across a business. Think of them as a product owner in scrum, except there is a bit more overlap working with different parties both internal and external to the business.

You will likely find a BA (or someone with a similar role under a different name) in most large organisations (and likely in quite a lot of medium ones, too).

BLKNSLVR

As per tim (thank you tim), yes, Business Analyst. I ask annoying questions to make sure everyone understands what the actual problem is rather than everyone making their own assumptions where there's ambiguity.

An additional device just to facilitate wired network usage over wifi usage felt like unnecessary additional complextiy and probably higher power usage. The blog author replied, however, saying that wifi was a bit flaky, explaining the design choice.

pbd

The power efficiency is fascinating - modern phones are basically ARM servers optimized for battery life. Pixel 5 probably draws <5W under load vs 50-100W for a typical x86 server. For a personal blog, that's 400-800 kWh/year savings. The environmental impact of reusing vs recycling electronics is under appreciated.

SchemaLoad

For a static site you can get a lot better by dumping it on S3 or Github Pages. Your site uses 0W while not being used since the server was already running, and it consumes no resource usage while not being requested. But yeah an x86 server at home for a static site is awfully inefficient.

holri

Depends. If you reuse otherwise wasted electronic it is efficient in avoiding extracting resources / energy building new hardware and avoids recycling energy or waste polluting earth. A big picture analysis of reusing old hardware would be very interesting.

tonyedgecombe

>Your site uses 0W while not being used since the server was already running

You are paying for it to be available (or in the case of GitHub Microsoft is as an incentive).

SchemaLoad

If you put it on AWS S3 (not subsidised), and your website is 1GB, which would be huge for a static blog, it'll cost you $0.27 per year to store / have available. The price is so incredibly small that numerous companies offer it as a completely free service.

zokier

Of course it depends on what you consider typical, but x86 can do pretty low power stuff too; n100 systems can idle <10w and 20-30w at full load.

Aachen

50-100W for equivalent work as a phone from 2020 can do would have been the case with CPUs from at least a decade ago. I should hope that one doesn't burn ~75W to host a few static files if it can also run on a Pi or phone or laptop that draws <20W idle

That's not to say it's not a good idea to make use of the super efficient "Pi" you already have at home in the form of (several, probably) old smartphones! Just that you'd not use it for the same purpose as a gaming desktop that can't idle below 50W

eadmund

> 400-800 kWh/year savings

The average all-sector U.S. price per kWh is 13.20 cents (source: https://www.eia.gov/electricity/monthly/epm_table_grapher.ph...). Even at the high end that’s a savings of $105.60/year, or $8.80/month.

The U.S. poverty line for 2025 is $15,650 for a single person (source: https://aspe.hhs.gov/sites/default/files/documents/dd73d4f00...). $105.60 is less than one percent of that.

Sure, energy efficiency is great and I would rather have $105.60 than not have it, but it doesn’t really matter in the grand scheme of things.

pbd

well recycle is worth chasing as well in this scheme of things.

fsflover

It's not just the money but also the CO2 footprint, https://news.ycombinator.com/item?id=45111385

fuckaj

[dead]

donkeybeer

Neat, I have been wondering if its possible to use the usb of a phone with suitable adapters to run keyboards, mice and ethernet, for the same end goal. This shows that its indeed possible. I think I should try going back to that idea again.

tracker1

Seems completely reasonable given how many people are doing similar with RPi and other similar boards and chips. A Pixel 5 is more powerful than a lot of them, with the screen often being the biggest power drain. I'm curious what tweaks can be done to minimize power use overall as I'm assuming heavy loads could heat up the phone a bit.

Looking at the underlying block arch (Hugo), seems to be written in Go an should be pretty good for serving the content overall.

Aside: I've become a pretty big fan of SSG, and have been wanting to build a desktop mostly markdown based blog editor that then publishes to Cloudflare infrastructure... Just been lazy about actually picking it up (thinking Tauri/Rust + React/MUI for the app) with git integration and optionally direct or github action for push. I can't recall the name, but MS actually had a nice gui blog editor that integrated with a few engines a couple decades ago, but long since abandoned.

hamdingers

Pedantry: A _reused_ Google Pixel 5. It was not broken down and reconstituted.

Reduce, Reuse, Recycle is in order of environmental impact, so reusing is an upgrade!

IshKebab

No but it was reused as a whole. "Recycle" is completely correct. Pedantry failed.

https://en.wiktionary.org/wiki/recycle#:~:text=To%20reuse%20...

robertlagrant

Reused as a whole sounds like reuse.

treve

Recycle is definitely grammatically correct. It's just a different word for re-use.

Infinity315

I thought recycle was the breaking down of the device into its constituents (mostly to recover precious metals or other base materials). In contrast, reuse is where the device is kept mostly intact and used for other purposes such as this. Just breaking things down requires considerable amounts of energy through the sheer logistics of it relative to just reusing it.

account42

There is quite a bit of room between reusing something for its intended purpose and recycling something at the material level. TFA is at neither extreme - the phone is kept intact but it's employed for a much more limited purpose that only really uses some of the phone's components.

Clamchop

Ironically, this is semantics, not grammar.

readthenotes1

How is that ironic? Since the thread is about definitions, I am surprised that we are in a situation where grammar is expected and definitions not

mcny

My number one concern is how do I avoid the spicy pillow problem... If I could have phones run off of USB without a battery, I would love to do that.

daemonologist

The worst part of the spicy pillow problem is that even if you remove the battery cell and solder a power supply to the BMS, Android will eventually decide "I must be out of battery by now" and shut itself down. You have to root the device to override this and it is supremely annoying.

Of course if the thing could just run directly off wall power like you suggested, this wouldn't be a problem.

SchemaLoad

I'm told that most phones have power usage spikes that exceed the power delivered by the charger, and they use the internal battery as a capacitor to soak up those spikes.

fainpul

To a certain degree, that might be true. However, small batteries like they are found in phones have relatively high internal resistance (voltage drops as current draw increases). They can't deliver huge currents like capacitors. A beefy enough power supply should be able to handle power spikes even without a battery installed.

BLKNSLVR

My small army of old android devices are plugged into a USB 'charging station' (multiple USB charging ports off a single plastic device) which in plugged into a smart switch. The smart switch turns on for a couple of hours overnight, to keep the phones charged at least minimally.

Most of the devices also have a custom ROM and are rooted, and using the ACCA app I restrict charging to a maximum of 80% battery capacity.

I had a Samsung Note 5 (released in 2015) that only went spicy maybe 6 months ago. I have a Samsung S9 and a Nokia 6.1 that are both still going strong with fairly recent versions of LineageOS. Both are 2018 phones, so around 6.5 years old (old for phones, but shouldn't be 'electronically' old).

joecool1029

> Most of the devices also have a custom ROM and are rooted, and using the ACCA app I restrict charging to a maximum of 80% battery capacity.

I used this method too but then LineageOS merged the functionality in a few years ago and it works perfect.

I have a Nokia 6.1 as well but my oldest continuous use device is a Oneplus 8T used to provide hotspot to a location 24/7/365.

chmod775

https://www.instructables.com/Power-an-Android-Phone-Without...

You can also buy dummy batteries for certain models online.

rollcat

For simple live streaming, the standard setup is a mid-range/DSLR camera, a dummy battery, and an HDMI capture card. (I have a Sony ZV-1 and Camlink 4K.)

AuthAuth

Put it in a fireproof box and if it dies it dies.

rollcat

My 2002 TiBook's original battery is buried in sand, in a bucket. It should probably get recycled.

cinimodev

My concern too. I go check on it about once a week. I definitely need to find something safer.

joecool1029

Don't run it empty or get it super hot. Gas generation and cell degradation really seems to skyrocket if cells drop below 3V, so don't run them flat. Doesn't seem to ever happen on devices kept on around the clock and powered so long as they aren't in crazy hot conditions.

mcny

I have tried this with devices that remained on all the time. The display or camera being on all the time also seems to cause spicy pillows?

erremerre

The easiest way is with a programmable plug, it does not have to be smart, just set it up to charge the phone for 1 or 2 hours at the cheapest, or available by solar, the rest of the day the phone will use battery as usual. Is the battery cooked? Then set it to be half an hour every 4 hours or so.

pbhjpbhj

Somewhere a Google exec is demanding to know why they allow such reuse of Google's property ... and is there some way they can serve ads on it.

walthamstow

This message was sent from a Pixel 5 still in great condition!

It's the best phone I've ever had, it's the perfect size and has a fingerprint reader on the back. Everything I've tried since it has been a regression.

slavik81

It's a good phone, but think I need to replace the battery on mine. It's getting to the point that I have to recharge a couple times per day.

JohnLocke4

This post was made from a refurbished Pixel 5 I scored for ~$250. Just like you, this is easily the best phone I have ever had. I really like the 2020 design philosophy as is it doesn't include features meant to be technologically impressive rather than practical (eg. under-screen finger print reader). Here is to many more years of 2-3 days of use on a charge and good-but-not-great pictures

indigodaddy

Looks like you can get a pixel 5 used for like $100-150 now? A quick look yields that most are in poor condition. Would be nice to find one barely used or even new/refurbished these days.. is it possible?

walthamstow

Funnily enough I was just in the market for a sealed new Pixel 5 on Ebay UK last week. The going rate seems to be about £200

I'd probably buy at that price, but I'm not sure what the battery condition will be like after 5 years doing nothing.

walthamstow

Not to mention the plastic body. Metal dents, plastic bounces!

rollcat

Similar. I'm going to hold on to my iPhone SE2 (same year, size, mass, touch ID, etc) until it dies.

TheBicPen

How does DNS work with a setup like this? I assume that ISPs generally don't want people hosting servers on residential connections.

rollcat

NAT is the hard problem. I'm tracking this one: https://github.com/tailscale/tailscale/issues/11563

You can also talk to your ISP (or their competition). My friend negotiated something like +5€/mo for a static IP. We can play Factorio together, yay!

disiplus

I have a fiber 2.5 gbit connection without static IP. But I run a script on the router that updates the DNS settings when the IP changes, you just have to have a DNS provider that allows you to do that and change ttl.

nick49488171

Plenty of dynamic DNS solutions. TP-link even has one you can set up from their app (not a endorsement, don't know if it is good or bad)

sct202

A similar VPS from Digital Ocean (8GB RAM, 4vcores, 160gb storage) is $48/mo so this seems really cost effective. I'm not really sure how much more performance the vcores have vs a mobile chip but for a blog web server it's probably not a huge issue.

Quizzical4230

Here is a blog I wrote if anyone is interested in using Cloudflared & Termux without modifying the OS!

https://mitanshu7.github.io/html/SSH_into_Android_with_Termu...