Hey guys, since I got into hosting my own servers, any electronic device I see I wonder - can it become a server?

This is probably not a crazy and new idea with android phones, but I had to share it with you. If you don’t know, there’s this thing called postmarket OS, full linux experience on an android phone.

Of course, not all phones are supported, but a phone like Galaxy Note 9 is a great candidate - it supports LAN over usb, postmarket OS fully supports it (the Exinos version) and setting up a phone as a selfhosted server has it’s real perks. Pis got really expensive, not to mention they don’t have a built-in UPS (phones have batteries), they use slow SD cards, while phones have faster UFS memory, phones draw way less power.

What do you guys think? I will for sure get a used Galaxy Note 9 and explore this idea, and if all goes well, I might even buy more of them and create a cluster.

  • 4k93n2@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 hours ago

    it would probably be a great way for people to get their feet wet if they dont have a server, but maybe not a great long term solution due to possible battery issues (unless its a phone that supports bypass charging)

    most people have an old phone lying around that could be set up fairly quickly with something like syncthing for some basic file synciing, or run some services using termux along with tailscale or netbird so they can be accessed when away from home. all that would still be a bit of work but it would be a lot less daunting than all the research you have to do when youre getting into self-hosting. server/nas hardware, disks, how you are going to set them up, what OS to install etc etc

  • tachikoma@lemmy.today
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 hours ago

    I guess I’ll be the devil’s advocate today. 😈

    I’ve seen some pretty serious phone “servers”.

    I personally think that turning a phone into a device that can stay on 24/7 should be easy enough.

    Finding software that works on your phone’s hardware… that’s a whole different beast. 😬

    • Lovable Titty @lemmy.world
      link
      fedilink
      English
      arrow-up
      1
      ·
      32 minutes ago

      The only thing that keeps me worried is the battery. I would never leave it plugged in 24/7. It’s a fire hazard…

  • hexagonwin@lemmy.today
    link
    fedilink
    English
    arrow-up
    12
    ·
    12 hours ago

    if you do this, be sure to root and install ACCA to restrict battery charging and limit current for safety/longevity

  • wylinka@szmer.info
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    10 hours ago

    Old phone means old unsupported vendor version of the linux kernel vulnerable to script kiddie exploits.

    • non_burglar@lemmy.world
      link
      fedilink
      English
      arrow-up
      11
      ·
      9 hours ago

      The idea would be to put something like postmarketos or armbian on it so it actually is a supported platform.

  • tradicije@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    12 hours ago

    Thank you everyone for commenting on this, I didn’t expect this much feedback!

    I will go ahead and start this project with an old phone, not sure yet which phone, and I’ll document everything and give you an update soon!

  • uKale@lemmy.world
    link
    fedilink
    English
    arrow-up
    33
    ·
    16 hours ago

    I wouldn’t do it because of the fire hazard. Better to use hardware that is meant to run 24/7 plugged in.

    • magnue@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 hours ago

      Yep. I was going to use an old one as a security camera but thought better of putting a lithium battery permanently plugged in on a windowsill.

    • ryannathans@aussie.zone
      link
      fedilink
      English
      arrow-up
      10
      arrow-down
      3
      ·
      16 hours ago

      Newer phones have mandated removable batteries, wonder if they run without them being installed

      • 4k93n2@lemmy.zip
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 hours ago

        “bypass charging” is becoming a bit more popular now. you see it on some android gaming tablets where it bypasses the battery once a cable is plugged in, which makes sense considering how quickly the battery would run down on those. i think i saw the recent google pixel devices having this feature as well so many it will just be a thing on all phones eventually

        • ryannathans@aussie.zone
          link
          fedilink
          English
          arrow-up
          1
          ·
          24 minutes ago

          Yeah been using it on my phone, keeping it plugged in wherever possible has definitely extended the battery life

      • herrvogel@lemmy.world
        link
        fedilink
        English
        arrow-up
        12
        ·
        16 hours ago

        Most mobile devices have their power management modules configured to prevent booting unless they receive an all good signal from a connected battery. It is possible to take that signal, but not trivial.

  • Luckaneer@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    13
    ·
    15 hours ago

    I’ve seen too many spicy pillow samsungs to do this. But I have also seen that you can use a capacitor in place of the battery, so maybe worth checking that out.

  • gandalf_der_13te@feddit.org
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    1
    ·
    17 hours ago

    bad idea IMO. i did this once, the device has to be permanently plugged in, which strains the battery. after a few weeks the battery inflated. that stuff can explode and set your house on fire.

    better buy a raspberry pi. last time i checked they were $20 each.

    • FoxAlive@lemmy.zip
      link
      fedilink
      English
      arrow-up
      3
      ·
      5 hours ago

      I have 3 pi 4s that where maybe 45 dollars each when I bought them, last time unchecked they where 600 dollars. I thought about selling them, but completely forgot if I want a pi again, and go to buy one, by then they might be 400 each.

      • wry@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        3
        ·
        5 hours ago

        You can buy x86 mini PCs for less now with only a minor hit to power consumption (they use slightly more power). I used to love Pis for home labbing, but I have switched to mini PCs for it.

        • FoxAlive@lemmy.zip
          link
          fedilink
          English
          arrow-up
          2
          ·
          4 hours ago

          I have two spare 8th gen Intel PCs I saved from the garbage bin, and a old gaming desktop that I now use as the server. So if I need a spare server I’m probably going to use one of those. I can get USB to gpio so been thinking of trying trying that route more considering how often people get rid of old pcs. I have a stack of windows vista-7 era laptops I was going to take apart for scrap too which could be used.

          I bought the pis a long time ago, each time a found a project for one I was sad I didn’t have one to play with and kept buying more. They aren’t really even in use now. Ones built in to my work station and occasionally I boot into it and use raspberry pi imager to flash ubuntu or something on a USB. Its useful to have just ready on occasion. I have a hard time getting rid of them because of use cases like that, and in have a lot of hats/accessories for them like the ai camera. Even though I’m not really going to use them like I used to anymore.

          • wry@sh.itjust.works
            link
            fedilink
            English
            arrow-up
            1
            ·
            2 hours ago

            I love reusing old tech like this. People toss / sell at a loss a lot of stuff that has quite a bit of use left in it.

            • FoxAlive@lemmy.zip
              link
              fedilink
              English
              arrow-up
              1
              ·
              2 hours ago

              If you already make a recycling run to the scrap yard its worth doing. I got 120 bucks last run just off old PCs and it wasn’t even that much, you just get more when you separate it. Aluminium cases, ram, motherboard, hard drives, CPUs. The older they are often the more they are worth, and if you are into eBay selling im sure you could make a killing. I heard even DDR 3 is coming back so who knows anymore.

              Only thing you shouldn’t take is TVs you have to pay to get rid of them. Maybe don’t take appliance too. some people do, for example fridges have a few valuable components but I would not reccomend it. You end up with plastics and other junk sometimes and have to pay to get a dump run.

              A lot of it only makes sense if you can store a pile until it gets big enough to be worth a trip out.

    • BeelzebubEiNukuKoskaan@piefed.social
      link
      fedilink
      English
      arrow-up
      7
      ·
      15 hours ago

      I saw one post where a guy was using a phone as a torrent share server thing. They had an app that cycled the battery between 10% and 80%. Setting that sort of thing up would take care of the battery issue.

        • BeelzebubEiNukuKoskaan@piefed.social
          link
          fedilink
          English
          arrow-up
          5
          ·
          15 hours ago

          Of course not. I didn’t mean to say that would solve the issue completely. Theres plenty of other reasons why having a phone as a server is not the best idea, the battery is just the most flammable reason.

    • Sibbo@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      9
      ·
      17 hours ago

      That’s a very important point to consider. Unless you remove the battery, you shouldn’t use it as a server. If you still do, store it in a metal bowl or so and put it somewhere where the heat of the bowl itself cannot start a fire. And make sure that your smoke detectors are still working and not expired. Then, be aware that if the battery explodes, your apartment fills with biting toxic smoke within minutes, and that can happen in the middle of the night. So keep some clothes ready at the door that you can wear when fleeing the apartment.

      • horus_son_of_isis@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        6 hours ago

        or just buy a minipc for $130 from Ebay.

        It is frustrating though, I have several old phones that are in good shape. It would be nice to give them a job. There might be one or two that boot without a battery.

    • skeevy_scallops@feddit.online
      link
      fedilink
      English
      arrow-up
      5
      ·
      16 hours ago

      I looked at using my old Galaxy S10e to host some things and ran into this same issue. It depends on the device, but I found a video of a guy revmoving the battery and soldering in a special resistor or something to trick the phone into a) thinking the battery is installed and b) that the battery is not discharging and will stay powered on.

      It’s been a minute since I’ve seen the video, but I think he gave an explanation of how it all works. Still on my to-do list for when I need a weekend project.

  • hoshikarakitaridia@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    14 hours ago

    Lots of people chimed in regarding battery, which is a legitimate issue.

    Another thing though is ARM. Phones usually have a different processor architecture and this architecture used to be incompatible with lots of server software. I remember being pissed at because I couldn’t even host a TeamSpeak Server on it because it wasn’t compatible. Now this was a while back and I’ve heard compatibility has gotten better but still, do some research beforehand.

  • wltr@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    5
    ·
    15 hours ago

    I would be worried about the battery, as many others pointed out too. I had a somewhat similar project with old MacBooks. I thought taking the battery off would make its fan to spin at 100%, yet turned out it does not. Right now one of my servers is MacBook Pro from 2011, and it kicks. It has no battery installed, and it looks like a pretty good server to me. It starts automatically when there’s a power loss, which is ideal for a server. Can totally recommend.

  • dan@upvote.au
    link
    fedilink
    English
    arrow-up
    8
    ·
    17 hours ago

    A friend is running Linux, Nginx, Hermes Agent, and a few other things on her old phone. Definitely doable! It’s a decent idea - very small form factor, phones have pretty powerful CPUs, and a lot of people have an old phone they’re not doing anything with.

  • dihutenosa@piefed.social
    link
    fedilink
    English
    arrow-up
    5
    ·
    16 hours ago

    I’m doing that. Works fine. There’s an article in PMOS wiki about limiting the max battery voltage.

  • sit@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    6
    ·
    17 hours ago

    I had the same thought. Got an older laptop laying around and might try to fiddle with it.

    The issue that arises for me is electricity cost. A smartphone doesn’t have a fan and I trimmed for efficiency, unlike many other devices.

    What do you want to use the cluster for?

    • tradicije@lemmy.zipOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      17 hours ago

      I get that, using phones as servers is a pain because of cooling, but I was thinking maybe wire a fan to a custom made 3d printed rack, and also create a script for batteries, so the phones are not charging not stop.

      Creating a cluster could help me self host more websites I create as I want to move away from using hosting services, I do have 2 mini pcs as servers right now, but they are kinda shit.

      • dan@upvote.au
        link
        fedilink
        English
        arrow-up
        4
        ·
        16 hours ago

        Creating a cluster could help me self host more websites I create as I want to move away from using hosting services

        Just jeep an eye on electricity prices. This is probably not an issue with a phone server, but for me, hosting at home with a decent server PC costs more per month just in electricity compared to using a cheap VPS. Continuous draw of 50W 24/7 is ~37kWh per month which can cost $15 or more in California.

        I do still host some things at home, but all my sites are on VPSes. The enterprise hardware and fast, data center grade internet connection is worth it for me. Some of my VPSes are only $40/year.

          • dan@upvote.au
            link
            fedilink
            English
            arrow-up
            2
            ·
            5 hours ago

            I’ve already got solar panels on my roof. Originally they fully covered our usage, but my wife and I have two EVs now (a BMW iX and an i4) and charge them at home, so we’re back to having to pay the electricity company.

            I’ve got 1:1 net metering (grandfathered into an old plan) so don’t need batteries.

        • fozid@lem.radiantfig.fyi
          link
          fedilink
          English
          arrow-up
          2
          ·
          12 hours ago

          My always on server hosting 20+ services draws no more than 50w at peak during the night backup, but that lasts maybe an hour or so, normally runs nearer 5w-10w when the hdd’s are spun down and unmounted 22 hours a day. I use an Intel n97 CPU in a mini pc. Navidrome, immich, adguard home, Lemmy, find my device, forgejo, file browser quantum, sterling pdf, valutwarden just to name some of the services it runs easily. Paying 22p per kWh in the UK.

        • anamethatisnt@sopuli.xyz
          link
          fedilink
          English
          arrow-up
          3
          ·
          15 hours ago

          Completely depends on where you are too, my NAS uses ~30W, which means ~22kWh in 30 days, which translated into local electricity costs are 53SEK or $5.39.
          It has enough CPU (Intel Celeron J4125) to run my production loads, RAID1 16TB drives and 18GB RAM so it successfully hosts DNS, DHCP, Jellyfin, Vikunja and network shares. And I get the knowledge that it is all local and under my control.

          • dan@upvote.au
            link
            fedilink
            English
            arrow-up
            3
            ·
            14 hours ago

            Makes sense! 30W is great for your system. My home server has an older 10Gbps NIC that uses an Aquantia AQC107 chip, which has poor support for ASPM and prevents the CPU from entering lower C states. I’ve been considering swapping it out for something newer (like an AQC113), I just need to work out whether it’s actually worth it.

            Mine used to cost $0 in electricity since I’ve got solar panels, but we’ve got two EVs now (my wife has a BMW iX and I’ve got an i4) so we’re back to having to pay the electricity company again.

  • Chaser@lemmy.zip
    link
    fedilink
    English
    arrow-up
    2
    ·
    14 hours ago

    Sounds like a good idea! I read somewhere, that you can also launch Docker via Termux on Android. Just in case Postmarket OS won’t work.