33

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!

top 30 comments
sorted by: hot top controversial new old
[-] notfromhere@lemmy.one 14 points 1 year 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.ee 3 points 1 year 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!

[-] r3df0x@7.62x54r.ru 7 points 1 year 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.

For this I would have a plug with timer activated. Just monitor how long it will take to run with one charge and set the timer accordingly.

[-] density@kbin.social 1 points 1 year 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.

don't get the analogue ones, they ticktickticktick.

I agree, in-house/ living room applications NEED silent timers.

[-] bartolomeo@suppo.fi 1 points 1 year ago

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

[-] r3df0x@7.62x54r.ru 1 points 1 year ago

That could work but you're still doing full cycles on the battery all the time. In the end, it might be less then daily use.

[-] perishthethought@lemm.ee 1 points 1 year 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.

[-] r3df0x@7.62x54r.ru 1 points 1 year ago

Based on experience, possibly not more then a few months.

[-] knF@lemmy.world 1 points 1 year 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.ee 1 points 1 year 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 1 points 1 year 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.

[-] elbarto777@lemmy.world -1 points 1 year ago* (last edited 1 year ago)

Got a source on this?

Are UPS batteries not li-ion ones?

[-] Rootiest@lemmy.world 6 points 1 year ago* (last edited 1 year ago)

I usually recommend against this particularly if you intend to have the display or camera kept on.

The issue is that modern mobile devices cannot bypass the battery.

This means that when the device draws power it does so from the battery, even if the battery is fully charged and the charger is plugged in.

In that case the device will draw from the battery and the charger will top up the battery. This process, particularly with higher draw or increased heat from the display/camera/etc will cause the battery to wear at a much higher rate than normal use.

If left unchecked in this scenario for long enough this can become a fire hazard as the battery will eventually pillow or puff up. When this happens it makes it very easy to cause a short that will result in a fire. This can even happen on its own if the battery pillowing damages the screen or some other sharp component that then punctures the battery.

Virtually all mobile devices you can still get your hands on will be vulnerable to this issue unless you open them up, remove the battery, and then solder/wire a bypass. There is no way to bypass this behavior in software. Even with the battery bypassed you may experience issues with some devices refusing to boot in that configuration.

For that reason it's generally a better decision to get an SBC or an old laptop/mini-pc instead and if your needs call for it: a touchscreen to go along with it.

Laptops are typically not as susceptible to this. Many relatively new laptops still had removable batteries and will therefore generally work with the battery removed and only a charger attached.

And of course this is not an issue that will occur overnight.

If you want to use a phone temporarily as a touch panel/camera/server then by all means go for it! But I would suggest finding a safer solution if you intend something long-term as any mobile device will eventually become a fire hazard

[-] elbarto777@lemmy.world 1 points 1 year ago

Thank you for the explanation.

[-] rar@discuss.online 1 points 1 year ago

So the question is: why was it designed this way? Why can't we bypass the battery to power up the device from the charging cable alone?

[-] r3df0x@7.62x54r.ru 3 points 1 year ago
[-] elbarto777@lemmy.world -3 points 1 year ago

No kidding!

And a UPS is not just its battery.

Now, can you answer the question or not?

[-] spudwart@spudwart.com 3 points 1 year ago

No, a UPS uses at least 1 Lead-Acid battery, not LI-ION.

[-] elbarto777@lemmy.world 0 points 1 year ago
[-] knF@lemmy.world 7 points 1 year 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!

[-] MostlyGibberish@lemm.ee 5 points 1 year ago* (last edited 1 year 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 5 points 1 year 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 4 points 1 year 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.

[-] perishthethought@lemm.ee 1 points 1 year ago

Thank you, this is all solid advice.

[-] Decronym@lemmy.decronym.xyz 3 points 1 year ago* (last edited 1 year 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]

[-] Arrayrepairman@lemmy.world 3 points 1 year ago

Check out servers ultimate on the app store. They have over 60 services that you can host.

[-] perishthethought@lemm.ee 1 points 1 year ago

Interesting! Thanks

[-] 3arn0wl@lemmy.world 1 points 1 year ago

OnionShare is available for Android.

this post was submitted on 06 Nov 2023
33 points (86.7% liked)

Selfhosted

40330 readers
256 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS