Phones that can have their battery removed tend to work fine plugged in with their battery removed, so that's an option. Also a good reason to make sure you don't buy a device that you can't open. I made that mistake with my current phone, and I definitely won't be making that mistake again if I get another smart phone.
You can use a smart plug that turns on when the battery drops below 20%. I’m going to use this kind of automation for a tablet with HomeAssistant in kiosk mode.
I guess you increase the cost of your setup by adding an intermittent power switch / timer that turns charger power on and off. With MQTT, the server itself could drive the switch, and turn the charger on when the battery is low enough, turn it off when full enough.
If you don't mind disassembling and finding connectors or soldering, you can connect a power supply with the same voltage as the battery to the battery connector on the main board.
Interesting, I’ll need to see how this affects my use case. I assumed that devices plugged into power operate on power while charging the battery, at least my laptop does.
A neat trick would be solar panels mounted on tall trees with waterproof phones attached. Set up a daemon and spread them worldwide and you have something neat.
Maybe you could have some geographic sharding going on for the right applications.
I have a pipe dream of setting up self-sufficient devices like that, and stowing them on public transport (e.g. buses, trains), and letting them travel around opportunistically connecting to open wifi hotspots.
If you have enough of them, and if you have clever enough software, you can be reasonably confident that at least one "server" will be up at any given time.
Sounds a lot like this bit from Kill Process by William Hertling:
"The little computers run a secure variant of Linux, with a single open port, protected with heavy encryption. Part of the computer board contains a sensitive accelerometer, which means I can detect when the computer is moved.
When I travel, I find coffee shops and homes with wi-fi signals and flat roofs, and I toss one of these onto the roof.
If you were to find one, pick it up, and look at it, you might not be sure what it was. If you plug a headphone into the jack, it plays pirate music stations.
Of course, that’s what it does only if it’s been moved or if the battery level drops too low. Because when the accelerometer detects motion, the code I wrote replaces my extensive software with a simple dummy music app and erases the remaining storage a hundred times over.
If it hasn’t been moved, and the battery level has never dropped too low, then it does what it’s supposed to do: operate as part of my private onion routing network with hundreds of nodes to disguise my digital trail so others can’t trace my location.”
And don’t forget the sensors they are usually packed with. Reasonably good camera, gps, accelerometers and more, it is not just a generic server. And with such amount of RAM, it could even run some small enough AI to give not so predefined sense to what the sensors may be getting.
Android supports Ethernet over USB-C, but a quick Google search seems to suggest that performance is lacking. I found this odyssey of some developer trying to reach someone at Google to get it fixed, but they keep giving him the ol' runaround. Works fine on Apple devices though.
A friend of mine used to work at a startup which ran part of their (user-facing) solution on a plain Windows desktop without power saving. I don't think the PC itself was exposed to the Internet, but it was used as a server to support a production, customer-facing platform.
It's pretty weird but, hey, "if it works don't touch it", I guess...
If there was a reliable way to keep locally deployed app running persistently, without getting killed by android OS, even newer Samsung low end phones could be used as server. Home WiFi connection auto with 5G fallback. It is too good a setup.
USB type C Ethernet adapter with power pass through should work as well. Battery acts a power backup.
Edit: Something like https://amzn.in/d/gUg2zhT
For a static blog? The limiting thing likely is the outgoing connection... Would not be surprised if you could saturate a 10 gig link if the USB link allows
If you compile it to a static site with something like Jekyll, I expect an old phone could handle pretty much any single blog in the world. And of course if you ever reach astronomical traffic, you can always add a CDN.
Why not. Put it behind cloudflare and you are good to go. Even if you don't put it behind cloudflare you should be good. There are many entry level vps that are not nearly as powerful as a podern smartphone, and people host plugin heavy WordPress on then.
Just struck me this is double the spec compared to the “servers” I was planning to rent on AWS…