| ▲ | BLKNSLVR 2 days ago |
| 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. |
|
| ▲ | cinimodev 2 days ago | parent | next [-] |
| 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. |
| |
| ▲ | _R_ 2 days ago | parent | next [-] | | 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 2 days ago | parent [-] | | 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. | | |
| ▲ | leidenfrost 2 days ago | parent | next [-] | | Question, why are you glad you didnt go for the PostmarketOS route? Do you think it's not worth it? Or that android is better in any way? Just curious | | |
| ▲ | cinimodev a day ago | parent [-] | | The Pixel device I have is from a family member and it is locked to Verizon, who won't unlock the bootloader. I'm sure there's a work around, but I didn't think it was worth the effort. PostmarketOS is rad though, I have it running on an ancient Windows Surface RT. |
| |
| ▲ | indigodaddy 2 days ago | parent | prev [-] | | Is your nginx proxy also caching the site? If so then that is probably contributing to the site stability under the HN load I would think? | | |
|
| |
| ▲ | rollcat 2 days ago | parent | prev [-] | | > 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. | | |
| ▲ | youainti a day ago | parent [-] | | I think you might be interested in NUTs, Network UPS Tools. They provide a way to distribute power information about a ups across a network. https://networkupstools.org/ | | |
| ▲ | rollcat 19 hours ago | parent [-] | | Looks interesting, but my main obstacle right now is that the power switch is controlled via HomeKit - I could make my Mac an integral part of the setup (it's powered 24x7 after all), but that feels clunky. I think the way to go is to make a shortcut to gracefully shut down via Mac/iPhone. It's one tap, just requires some thinking to set up. |
|
|
|
|
| ▲ | qwertox 2 days ago | parent | prev | next [-] |
| 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. |
| |
| ▲ | BLKNSLVR a day ago | parent [-] | | Can you write up how you set that up? It sounds intriguing. |
|
|
| ▲ | easyThrowaway 2 days ago | parent | prev | next [-] |
| > 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 2 days ago | parent [-] | | approximately 0% of phones can be easily opened up, or have any way to extend their hardware other than usb | | |
|
|
| ▲ | varenc 2 days ago | parent | prev | next [-] |
| > 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 2 days ago | parent [-] | | 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 2 days ago | parent [-] | | Are you sure? Supporting 802.11ac in 2012 is pretty amazing considering that the standard was finalized in late 2013. | | |
| ▲ | Aachen 2 days ago | parent [-] | | Oh, you're right. I was quite sure but it's indeed 802.11n. Maybe I thought it was an upgrade from the other systems (laptop and phone) I had at the time because it was the first with 5 GHz, seeing new WiFi networks that no other of my devices could see, and conflated that with the new standard. That's still faster than the internet connection I have and host my website on today, but not by as much |
|
|
|
|
| ▲ | lhamil64 2 days ago | parent | prev | next [-] |
| 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 2 days ago | parent | next [-] | | 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 2 days ago | parent | prev [-] | | Limit your attack surface by using a simple stack, and limit the incentive for hacking. Countless sites operate just fine on old software. |
|
|
| ▲ | tommica 2 days ago | parent | prev | next [-] |
| 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. |
| |
|
| ▲ | koolala 2 days ago | parent | prev | next [-] |
| If you have to plug it in anyways, may as well power + ethernet. |
| |
| ▲ | bigiain 2 days ago | parent [-] | | 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 2 days ago | parent [-] | | 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. | | |
| ▲ | tracker1 2 days ago | parent [-] | | Yeah, I would guess you can go a long way with a USB battery based charger device in the middle even... Panel > Battery > Phone... which should hold more than a day's usage for the phone.. since phone batteries tend to lose a lot of life after 4-5 years. |
|
|
|
|
| ▲ | Denatonium a day ago | parent | prev | next [-] |
| IIRC, WiFi on cellphones tends to have power-saving features that cause unsolicited incoming connections to have poor performance and very high latency. I don't know if there are kernel parameters to disable this, but even if there are, you'd likely need root to toggle them. |
|
| ▲ | rendaw 2 days ago | parent | prev | next [-] |
| Are you saying the power required for wifi transmission is lower than the power required for usb? Also, what's a BA? |
| |
| ▲ | tim-- 2 days ago | parent | next [-] | | 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 2 days ago | parent | prev [-] | | 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. |
|
|
| ▲ | hugs 2 days ago | parent | prev [-] |
| i've been working on an idea for a while to use those idle old phones for... distributed web and app testing. plug it in at night... wake up having made a few bucks. problem is getting anyone to really care, though. cloud hosting is cheap. |