Hey y’all, I was reading this self hosting user survey at selfh.st and noticed that some people said they self-host on a mobile phone.

I have an Android phone here I could use and I can picture setting up the phone and then just leaving it plugged in, in a corner somewhere. That seems like a good use for all that computing power but I’m not sure how to get started.

I found this article showing how we can use a phone for a web server:

https://www.digitalocean.com/community/tutorials/host-a-web-server-on-android

But is there any way to host other apps / services on a phone? Does it have to be rooted first?

Any pitfalls or other tips you can share when to doing this?

Thanks!

  • notfromhere@lemmy.one
    link
    fedilink
    English
    arrow-up
    14
    ·
    8 months ago

    Check out Termux. It lets you install nearly any linux software on your Android device. Probably a good place to start to get your toes wet.

    • perishthethought@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      8 months ago

      Yah, this app is mentioned in the article I found too, but I didn’t realize it’s able to run these other services, not just apache / a web server. Thanks!

  • knF@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    8 months ago

    Hello, that’s perfectly possible, actually I was selfhosting on android until recently. You can find more info in this post: https://lemmy.world/post/5342541

    Unless you need some heavyweight lifting and you’re ok with installing directly the applications (no docker, sorry), that’s a good portable homeserver.

    My only suggestion: buy an ethernet adapter as the WiFi connectivity will drop sometimes.

    Keep us posted!

  • r3df0x ✡️✝☪️@7.62x54r.ru
    link
    fedilink
    English
    arrow-up
    6
    ·
    8 months ago

    Leaving a mobile device plugged in constantly will fry the battery. If you never plan to use it for its intended use again, that might not matter and it could be a good way of recycling and old device. There might be a setting to limit the maximum charge of the battery. If so, limit it to around 80% and that might extend it.

      • density@kbin.social
        link
        fedilink
        arrow-up
        1
        ·
        8 months ago

        timer plugs are so freaking useful. once you have a couple you start noticing things you could do with them. just regular digital non-smart outlet timers. don’t get the analogue ones, they ticktickticktick.

      • bartolomeo@suppo.fi
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        This is smart, and with the timer you can try to keep the charge between 20 and 80%.

    • perishthethought@lemm.eeOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      8 months ago

      Does anyone know how long the battery might last in this scenario? Any articles testing this sort of thing? I just searched and couldn’t find any facts, just suggestions / concerns.

      • knF@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        8 months ago

        Based on my personal experience at least one year on a 5 years old mobile. It can last longer but I decommissioned it because I got a NUC.

        I had setup a charge limiter (between 20% and 80%) with Magisk, initially it was through an automation in homeassistant but the battery usage was very high.

        In terms of charge cycles it was one or two per day max

        • perishthethought@lemm.eeOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 months ago

          Thanks. I’m wondering if maybe I could just use something simple like a lamp timer, to control when juice comes through to the phone’s charger/cable. I could enable that only for like 6 hours a day and keep it “off” otherwise.

          • knF@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            8 months ago

            That’s a possibility for sure. My suggestion would be first to test the capability of the device before buying anything. Once you’re satisfied with it, you can take the next steps and buy additional hardware. In my experience a USB-C -> ETH port was a great purchase as I was experiencing shaky WiFi connection possibly due to battery saving settings.

  • MostlyGibberish@lemm.ee
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    8 months ago

    I’ve always been hesitant to host any services on a device with a non-removable battery. Having a battery constantly charging and discharging isn’t great for it and could potentially be a fire hazard. I know modern devices have gotten much smarter about how they charge, so maybe it’s not as much of an issue anymore, but still something to be aware of depending on how old your phone is or how you modify the firmware.

    Personally, with how cheap you can find a mini PC or SBC, I would just save up a bit (maybe even sell the device you’re planning to host on) and keep an eye out for deals. You’re going to get a lot more freedom and power with those devices, and not have to try to hack around the limitations of a mobile OS.

    • TCB13@lemmy.world
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 months ago

      with how cheap you can find a mini PC or SBC,

      Be careful with SBCs as they can be a money grab. When you sum it all, SBC + charger + cables + case you’ll end up with a price similar to an HP Mini i5-8th gen that is 10x more powerful and stable.

    • Showroom7561@lemmy.ca
      link
      fedilink
      English
      arrow-up
      4
      ·
      8 months ago

      I’ve always been hesitant to host any services on a device with a non-removable battery. Having a battery constantly charging and discharging isn’t great for it and could potentially be a fire hazard.

      I once had a phone that was being used as an NVR, and for a while it worked like a charm.

      Except for the fact that since it was being run unattended, I hadn’t noticed the swelling battery pack. I only noticed it when i realized that my glass screen protector had popped off due to the bending of the phone… I did replace the battery, and the phone still works to this day, but I’ll never use a phone as a server/NAS every again.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    8 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    NAS Network-Attached Storage
    NUC Next Unit of Computing brand of Intel small computers
    NVR Network Video Recorder (generally for CCTV)
    SBC Single-Board Computer

    4 acronyms in this thread; the most compressed thread commented on today has 9 acronyms.

    [Thread #265 for this sub, first seen 7th Nov 2023, 01:40] [FAQ] [Full list] [Contact] [Source code]