My server is a phone now

(seg6.space)

90 points | by seg6 2 hours ago

12 comments

  • thehamkercat 2 hours ago
    "My phone is a server now"

    would've been better

    --

    > built in battery backup

    Isn't it always recommended to remove battery if you plan to use a phone or a laptop as a server? ( Fire hazard )

    or is it fine to just limit the charging to 80%?

    • gerdesj 28 minutes ago
      "My phone is a server now" - OP's choice is a subtle one.

      By saying "my server is now ..." implies a change of server platform to a phone but not where it came from.

      Your offering: "my phone is a server now" implies a change of phone usage but does not indicate where the server came from.

      The article itself tells all.

      • gareim 5 minutes ago
        > By saying "my server is now ..." implies a change

        Except the original title is "my server is a phone now", not "my server is now...".

    • seg6 1 hour ago
      Some newer phones support bypass charging, which powers the phone directly instead of continuously cycling the battery. Mine doesn't support that, unfortunately, so I've limited charging to 80% to reduce battery stress.
    • daemonologist 1 hour ago
      Most phones won't boot without the battery. Obvious workaround is to connect a power supply (and large cap) directly to the BMS, but in my experience most phones will shut themselves down when they think they've drawn more than the capacity of their battery, even if the voltage is still high. You can sometimes get around that by rebooting the device every couple of hours (and there might be a software/firmware fix in some cases?), but it's a lot less annoying to just accept a small risk of a house fire.
      • embedding-shape 29 minutes ago
        > but it's a lot less annoying to just accept a small risk of a house fire.

        Agree! But do get one or two of those "small automatic fire extinguisher" or whatever they are, that you can attach on stuff, for electrical panels and what not, and put right next to it together with a traditional fire alarm, and you're good to go :)

        • nine_k 2 minutes ago
          No extinguisher can stop a lithium battery fire.

          Putting the phone into a metal box, and the box, onto something not flammable, would help.

      • hnuser123456 1 hour ago
        You could throw the phone in an ammo canister, if the wifi AP is close enough. When I was building hobby quadcopters, which requires several ~half-pound batteries that are a chemistry optimized for maximum power density, a lot of guys recommended steel ammo cans for battery storage.
        • Forgeties79 1 hour ago
          I’m also an ammo-case-for-drone-batteries guy but they aren’t running and don’t generate heat. A phone would cook right?
          • hnuser123456 1 hour ago
            Phones are very low power, likely just a slightly warm spot on the can that radiates, conducts, and convects the heat out. You could also use one of those peltier module phone coolers, to ensure the heat gets out of the phone and into the air faster.
          • johnecheck 1 hour ago
            Depends on how well the canister insulates it. Steel conducts heat fairly well; it'd get hot inside but I'd guess some airflow around the canister would probably keep it from getting hot enough to cook the electronics. (definitely don't take my word for it lol)
      • jdiff 1 hour ago
        How many phones have you tested this with?
    • yhjc2692 1 hour ago
      Afaik mobile electronics’ power circuitry is designed so that power goes straight from charging port to the processor, without constantly charging/discharging the battery, once charging is complete. Unless the system suddenly draws a lot of power (more than the charger is supplying) - which is unlikely in a smartphone.
      • rcxdude 1 hour ago
        This is true but lithium-ion batteries degrade even while not being charged or discharged, and this is worse at the extremes of the state of charge (including fully charged), and at higher temperature (and often a plugged in device is on constantly and therefore spends more time at a high temperature than it normally would), so it's still not great for the battery. A lot of devices have a mode where the batter is kept at a lower state of charge if it's been plugged in for a while to try to reduce this.
      • cfiggers 1 hour ago
        Some phones bypass the battery when plugged in, but not all do. I know it's advertised as a feature of some gaming phones because graphics-intensive gaming is one use case where you'd want to use the phone heavily while plugged in.
        • Forgeties79 45 minutes ago
          Steamdeck lets you set your preferred % and the dock does pass through charging/power, which I love because that combo guarantees the longest possible life for the battery. I turn it back to 100% for flights, otherwise leave it as 80% at all times. Mine is almost 4 years old now but I don’t feel even a hint of battery degredation yet.
    • guilhermeasper 2 hours ago
      That's what I thought when I read this. It will probably destroy this battery very quickly.

      But in other hand, it is probably a pain in the ass to remove the battery and do some workarounds to make sure the phone correctly behaves without it.

      • wanda 1 hour ago
        Couldn't you just have it charging on a time-regulated supply e.g. smart plug?
  • SturgeonsLaw 35 minutes ago
    I still think the best bang for your buck is an old desktop PC. Something like an i5 with 8GB RAM and an SSD will suit 99% of home server uses with capacity to spare.

    Even in this environment of inflated hardware prices, you can get one for a reasonable price.

    Although I do see the appeal in getting unconventional hardware to do what you want, just for the love of the game.

    • coffeecoders 28 minutes ago
      It only makes sense if we are measuring raw capability per dollar. Once you factor in noise, physical size, idle power, battery etc, I think the calculation changes.

      For a home sever that's mostly idle, it is almost like commuting in a pickup truck.

      • alightsoul 16 minutes ago
        also factoring in spare hardware. most people have more spare phones than PCs.
  • alightsoul 43 minutes ago
    FYI you can't do this on phones with locked bootloaders as well as the author did. you could use termux but if termux runs on anything lower than android 8 termux will be significantly limited and you will need postmarketos and maybe fix support for it. with termux, at best things will be slow without root, as the author mentioned rooting resulted in a speed increase.

    without root, you also can't bind to ports on any android phone, and rooting often requires an unlocked bootloader and not all android phones support bootloader unlocking. You also need an unlocked bootloader to install postmarket os.

    so you can't run a web server unless you run it through a proxy server which the author did, or containers at native speed on postmarket os because you will not be able to flash the phone with postmarket os if you have missing kernel syscalls on android nor root the phone for the speed increase on android depending on your kernel version i assume.

    so with android containers may or may not work without emulating x86, and without root chances are it will be slow specially if you are forced to emulate it as x86 because it turns out you have missing syscalls, nor root to make them faster if they exist on android. again no chances to install postmarket os nor rooting to make containers faster without bootloader unlocking.

    not all android phones can have their bootloaders unlocked unless you find an exploit. https://github.com/zenfyrdev/bootloader-unlock-wall-of-shame

  • purplemoonx 47 minutes ago
    Those saying it's said backwards clearly aren't self-hosters!

    iPhone hardware wise is like an amazing alternative to rpi (way better hardware)

    But the software makes no sense at all for a server, with screen locking due to inactivity and whatnot, not to mention energy and network priority is designed around a consumer use case on the move.

    If you run Linux on it and take advantage from the Apple hardware like the light sensors and accelerometer - maybe it makes sense for measuring wave height, sky color, attached to a buoy or oil rig or something, you can even show it on a map due to its GPS. Assuming the oil rig has WiFi or a cell phone booster.

    Idk though, maybe for something that important you just get the right stuff - cool hobby nonetheless.

  • firasd 1 hour ago
    Yeah ‘old phones’ are pretty capable devices.

    I’ve wondered for a while if they could be used as an extension to your laptop like the old 80s PCs where you would plug in hardware.

    So ‘make it a server’ is the obvious way I guess, and then you could do things like render webpages on there and then stream them as images to your actual computer (like the now shutdown Mighty app), or run ffmpeg on there to convert a video, etc

    • sejje 6 minutes ago
      I've been saving phones in my drawer for years, waiting to combine them to form a "supercomputer".

      Any day now!

    • mohamedkoubaa 1 hour ago
      A couple of old phones and a gaming laptop with a broken screen makes a beast of a cluster
  • Kuinox 1 hour ago
    I did a similar thing recently.

    I run kube in a VM, and it was ressource constrained.

    I hooked an old samsung to my pc and have let claude handle everything.

    I only had to unlock the bootloader, flash the image claude uploaded.

    It rebuilt postmarketos multiples times to enable various flag, and now there is a kube node running on it.

  • yoyohello13 1 hour ago
    I thought this was going to be a rant about QR code menus.
    • collabs 46 minutes ago
      Can you please tell me more? I'm trying to build a self hosted application (with Claude) so people can scan a QR code and place orders / send messages to the kitchen without having to flag down a server / waiter. It is supposed to save time and money for the restaurant and for the patrons and customers it is supposed to be more convenient. Do you not like this option?
      • makeitdouble 30 minutes ago
        I always wondered how actually cheaper a QR menu is, compared for instance to an android tablet you set there or pass to the client so they order.

        People immediately see the cost of a tablet, the issues with charging, building the app and updating the data, customers not understanding the interface etc.

        Yet, they don't seem to grasp all of these are basically the same for a QR code: you're now maintaining an online service just for your restaurant. People still need to understand your site. You'll be dealing with their browser, extensions, languages etc. And you still need the QR code somewhere on the table, visible, explain that it needs to be scanned (by one person ? everyone ? do they need to keep the tab open ? etc.). These will all be costs, you pay either upfront by hiring experts to make the experience good, or on the go with crappy customer experience, your staff spending more time than needed working around the system and explaining it to your customers, and those not coming back.

        There are super cheap and simplistic ways to deal with all of that, and I assume GP has seen many of these.

        PS: The weirdest experience I ever had was someone at our table scanning the code, to copy/paste it on the browser on their personal profile (default was work browser). They missed a digit in the url params and ended up opening the order menu of a table at the other side of the restaurant, and just started ordering, then waiting for a pretty long time while the other table was dealing with the mess.

      • JoshTriplett 26 minutes ago
        Every system like that I've ever used has three fundamental problems:

        1) It's optimized for the restaurant first, and the patrons second or not at all, and it shows.

        2) Someone thinks "hey, we could sell ads on this", and now it's even more a piece of garbage. (This is also what happened with all the little kiosk-tablets on the tables at some restaurants. We just set them face-down on their screen and talk to a human.)

        3) Most of them never anticipate unexpected problems. They might have an "order X" button, but they often don't even have a "call server" button. And when they do, it often doesn't work, because the other end isn't hooked up to something that gets people's attention.

        The much lower-tech and more enjoyable solution I've seen used successfully many many times is a call button on the table. Press the button if you want service. Bonus if it has a "press this other button if you want to be left alone".

  • bogzz 1 hour ago
    I plan to do this when I buy a new phone, thank you for the great writeup!

    Would have been a fun load test had you hosted your blog on the phone.

    • lucb1e 44 minutes ago
      That's a test of the software more than the hardware. I run a lot of stuff on low-powered hardware and the main problems are when the software allocates a ton of memory unnecessarily (Java software is usually the worst offender) or does a million things for each request that are either unnecessary or duplicate.

      Any efficient blog software will handle HN fine on anything that you can call a smartphone, so like maybe not a Nokia with GPRS and 6MB on-board storage, but something like the Samsung S2 from 2011 that basically shipped as a Linux box -- just need to adb push ARM binaries for PHP and a webserver

  • ekianjo 10 minutes ago
    keeping phones connected to power 24/7 is a fire hazard
  • agnishom 1 hour ago
    Shouldn't it be "My phone is a server now"?
    • an0malous 36 minutes ago
      but this way is provocative, it gets the people going
    • Waterluvian 1 hour ago
      “My daily driver is a clown car now.”
  • hackernud3s 1 hour ago
    I've never heard of Surf but I can run 10x camoufox instances on a $8 VPS no problem. I highly recommend it.
    • lucb1e 34 minutes ago
      Not having heard of that, either, I looked it up:

      > An open source anti-detect browser built for AI agents.

      Sounds legit, circumventing the locks people are trying to add to their properties in an attempt to keep costs down and the service available for people that are actually trying to use the service rather than bots roaming around. Really happy for you that you managed to run ten of those. Not a nuisance at all.

  • domeinhornMOT 1 hour ago
    [flagged]