Android Self hosting
from Dust0741@lemmy.world to selfhosted@lemmy.world on 11 Mar 14:56
https://lemmy.world/post/26674596

With the latest release of android it now supports some Linux functionality. I got docker installed simply by following Docker’s docs.

Any thoughts or uses for a mobile homelab? What would be useful to have mobile?

#selfhosted

threaded - newest

ashaman2007@lemm.ee on 11 Mar 15:00 next collapse

Lmao this is amazing. The future is now…

tofu@lemmy.nocturnal.garden on 11 Mar 15:01 next collapse

That’s cool! I’ve always had the idea of a small k3s cluster on old phones with postmarketOS. I guess it doesn’t work with older phones which don’t have the latest Android Version but given the homelab trend generally goes towards small, low power devices, this could continue the trend with super small and low power phones. Probably in 2 years when current gen phones rotate out of company leasing contracts?

Dust0741@lemmy.world on 11 Mar 15:12 collapse

Oh man that’d be super cool. An ARM cluster of androids would be awesome. Battery backups built in!

lka1988@lemmy.dbzer0.com on 12 Mar 22:38 collapse

Make sure you utilize the 80% charge feature

mesamunefire@piefed.social on 11 Mar 15:14 next collapse

Debian is supposedly coming to android. That would be cool.

Dust0741@lemmy.world on 11 Mar 15:31 next collapse

That’s Debian in the screenshot

mesamunefire@piefed.social on 11 Mar 16:42 collapse

Oh nice! I can't see very well on phone.

sugar_in_your_tea@sh.itjust.works on 13 Mar 00:32 collapse

Um, what does that even mean?

Edit: Looks like it runs a VM. So some overhead, but still cool.

shyguyblue@lemmy.world on 11 Mar 15:19 next collapse

Oh nice! I’d love to run an ad blocker/dns/reverse proxy on something with a little more beef than the Pi zero I’ve got now.

Jellyfin and or Pi zero does not like streaming through the video.local address I’ve got setup, so i have to use IP address to get anything without stuttering.

lka1988@sh.itjust.works on 11 Mar 15:55 next collapse

The VM eats through the battery, that’s the only hangup I have with this. Otherwise that’s a fantastic idea.

shyguyblue@lemmy.world on 11 Mar 17:06 collapse

If I trusted the battery tech more, I would use an old phone. But I’ve had one of those white plastic Mac books hooked up to power so long, the battery swelled out of its enclosure :/

Maybe there’s a way to disconnect the battery, or an app that switches off charging, so it drains enough to keep that from happening

lka1988@sh.itjust.works on 11 Mar 17:48 collapse

There are root apps that can limit battery charge level. If you have an older phone that’s rootable, I would look into that.

merthyr1831@lemmy.ml on 11 Mar 20:16 collapse

pi zero for streaming is insane not gonna lie. What sort of resolution do you stream it at?

A decently newish phone would blow even a pi 5 out of the water I bet. Modern GPU drivers from snapdragon or mediatek plus core designs that arent 7 years old out of the factory would be a godsend for low-watt homelabbers

shyguyblue@lemmy.world on 11 Mar 21:42 collapse

Dang, I just realized I didn’t explain the setup well enough:

An old laptop runs the Jellyfin server, but the Pi runs the reverse proxy. For some reason, trying to use the reverse proxied address causes problems, but connecting directly to the laptop via IP address and port runs fine.

I tried a Jellyfin server with a pi 2 or 3 and it couldn’t serve more than one client at a time. So i imagine a zero wouldn’t even be able to load the app, much less serve anything :/

My main reason for running my DNS/ad block/nginx through the zero, sometimes the laptop goes down, freezes, or fails to clear the transcodes folder, so having that stuff separate keeps at least part of the network running.

macattack@lemmy.world on 21 Mar 16:24 collapse

Are you using DNS Rewrites for jellyfin? I am using that (via AdGuard Home) w/ my Reverse Proxy (Zoraxy) and most of the apps work outside of jellyfin. Wondering if I need to configure the domain in the compose/env file 🤔

Selfhoster1728@infosec.pub on 11 Mar 15:23 next collapse

Just installed arch with chroot on my old rooted phone a week ago.

Seeing this is great because it means there’s no need for complicated workarounds or even root access! Plus the distro runs natively and not with difficulties like with chroot :D

Tiuku@sopuli.xyz on 11 Mar 17:54 collapse

Native in what sense? As I understand it that uses a VM of some sort

Selfhoster1728@infosec.pub on 12 Mar 17:37 collapse

You’re right actually it’s not native I don’t know what I’m on about 😅 Still it’s much easier to have a baked in terminal app than having to install proot on top of termux, hopefully it will have less of a performance impact than proot as well.

knF@lemmy.world on 11 Mar 15:25 next collapse

Impressive! Can you please link the instructions you followed?

Some time ago I was hosting the full ARR suite, bitwarden, AdGuard etc, but it was usually a mess with direct installs. With docker it might be worth revisiting it.

My only advice, buy a usb-ETH dongle, it will make a huge difference in stability

Dust0741@lemmy.world on 11 Mar 15:33 collapse

docs.docker.com/engine/install/debian/#install-us…

That’s it lol. To turn on the terminal, it’s a developer option for now, and is very alpha, just search for Linux in settings after turning on dev mode

shortrounddev@lemmy.world on 11 Mar 16:04 next collapse

I wish all the logs at my company were as beautiful as these terminal logs

catloaf@lemm.ee on 11 Mar 16:20 collapse

Please no. I can’t grep that. (Nor ingest it to splunk for more powerful searching.)

shortrounddev@lemmy.world on 11 Mar 16:35 collapse

If its an application I run locally, I rarely grep logs (they’re small enough that I can just ctrl+f). If it’s something running in production with millions of lines of logs, then I agree

confuser@lemmy.zip on 11 Mar 16:20 next collapse

How do we activate this feature? I have it enabled after going into the developer settings menu but nothing seems to happen, I see mentions of an app but idk what the app is. I am on grapheneOS though instead of normal android so there could be something with that here.

Oh nvm I figured it out, it just took a bit for me to realize there was a new terminal app on my phone

neatobuilds@lemmy.today on 11 Mar 18:18 next collapse

Get steam-headless running on there

shadowtofu@discuss.tchncs.de on 11 Mar 18:34 next collapse

While this is very exciting, I just tried it, and the network connectivity seems to be broken. No IPv6.

Dust0741@lemmy.world on 11 Mar 18:37 next collapse

Hmm I was messing with its networking. External vpns break stuff on GrapheneOS. Its internal IP was 192.168.0.2, and my network is different.

shadowtofu@discuss.tchncs.de on 11 Mar 20:11 next collapse

Yes, Linux is running in a VM, and the network interface is a virtualized veth interface connected to a host bridge. The host android system has IP address 192.168.0.1, and this network interface is called avf_tap_fixed (as seen from termux).

macattack@lemmy.world on 21 Mar 16:20 collapse

Any other tips for the VM and/or GrapheneOS compatibility? Ie: did you use a different profile? I run Debian throughout my house as is, but plan on integrating the VM for better integration but was a little hesitant to be an early adopter due to the potential nuances. (lemme know if you have a blog/gist/etc covering it too)

Dust0741@lemmy.world on 21 Mar 16:59 collapse

I used the owner profile. Idk much about it tbh, I have yet to do more in depth testing as my phone doesn’t have displayport functionality so I am a little discouraged to be an early adopter too. I couldn’t get SSH setup so typing a lot on the small keyboard wasn’t ideal.

I’d check Google/GOS docs for more info for now. I’ll bet there’ll be a lot in the coming years as fast as usecases

shadshack@sh.itjust.works on 12 Mar 13:32 collapse

I can’t get it to have network connection while my phone is on cellular data. On wifi it’s fine.

shadowtofu@discuss.tchncs.de on 12 Mar 16:24 collapse

I just checked, and I have connectivity while on cellular. Maybe (just wild speculation) your mobile network is IPv6-only? Android (not Linux) should list 192.0.0.4 as an IP address in that case.

shadshack@sh.itjust.works on 12 Mar 17:03 collapse

It’s probably that. While on cellular my IP isn’t 192.0.0.4 (but it is in 10. space), but there’s probably some v6 somewhere in the way.

solrize@lemmy.world on 11 Mar 19:39 next collapse

latest release of android

Does that mean 15?

Dust0741@lemmy.world on 11 Mar 20:16 collapse

Yea kinda. Android is switching to quarterly releases, so my phone now says “Android 15” but this was QPR2 specifically

solrize@lemmy.world on 11 Mar 20:37 next collapse

Thanks. My phone is on 14 and won’t get another update, oh well.

NeoNachtwaechter@lemmy.world on 12 Mar 03:05 collapse

“Android 15” but this was QPR2 specifically

How can we bring that to a real world (read: cheap Chinese) phone?

Dust0741@lemmy.world on 12 Mar 04:07 collapse

Not sure, but if LineageOS supports it, that should be all you need

OR3X@lemm.ee on 11 Mar 19:40 next collapse

That’s super cool! I’ve been wanting to setup an offsite backup rig at my parents place and using an old phone to run it would be super ideal but I just don’t have any hardware that’s compatible with postmarketOS. Maybe one day ill bite the bullet and just buy a compatible used phone to do it with.

merthyr1831@lemmy.ml on 11 Mar 20:11 next collapse

my friends complaining that my plex server because I left my phone on the bus and it ran out of charge

perishthethought@lemm.ee on 11 Mar 21:27 collapse

The lines between mobile device and server get blurred even more.

baatliwala@lemmy.world on 12 Mar 07:59 collapse

Tbh a laptop is a “mobile” device

towerful@programming.dev on 12 Mar 15:05 collapse

It’s a server with integrated UPS and KVM console.

valkyre09@lemmy.world on 12 Mar 21:10 next collapse

Except for that time I took out the battery because it was swollen and took the screen off to help with cooling. At least I still have my K and M

Andres4NY@social.ridetrans.it on 12 Mar 22:04 next collapse

@towerful @baatliwala For real though, I use old laptops for self-hosting so that I never have to dig up a monitor & keyboard.

lka1988@lemmy.dbzer0.com on 12 Mar 22:28 collapse

In all seriousness, I think a “mobile server” in laptop-like form would be pretty nice. Have a giant battery attached to the bottom and program the controller to run on AC as it’s primary power source while treating the battery as a secondary source. Definitely niche, but cool nonetheless.

domi@lemmy.secnd.me on 11 Mar 20:40 next collapse

With the latest release of android it now supports some Linux functionality.

Wait, it does? Gonna have to check that out.

Dust0741@lemmy.world on 11 Mar 21:03 collapse

Early alpha, but yea it’s full on Linux in Android. Quite slick

domi@lemmy.secnd.me on 11 Mar 21:16 next collapse

Dope, seems to not have landed yet in LineageOS but the Terminal app is already installed. Just missing the toggle in the developer options.

Appoxo@lemmy.dbzer0.com on 12 Mar 07:48 collapse

Is it an app I should be able to just find in my installed apps or do I need to enable it?
Because as of now (Pixel 7, Android 15) I can only find Termux.

SteveTech@programming.dev on 12 Mar 08:05 collapse

You have to be on the March update, then go to Developer options -> Linux environment, and enable it. Then ‘Terminal’ will appear in your apps drawer.

[deleted] on 12 Mar 15:26 collapse

.

muelltonne@feddit.org on 11 Mar 20:40 next collapse

What is the current wisdom about having an android device always plugged in? Some people say that it will kill and pillow the battery, but does it really?

Dust0741@lemmy.world on 11 Mar 21:02 next collapse

I don’t know. I think they are pretty good at managing battery, and have a new setting for maxing it out at 80% charge, but I don’t think I’d put it near anything expensive for years on end.

GrumpyDuckling@sh.itjust.works on 12 Mar 02:33 next collapse

In the past people used tasker to charge at a certain threshold. Check with homeassistant people to see what they do.

Lyra_Lycan@lemmy.blahaj.zone on 12 Mar 03:21 collapse

The trick of retrofitting any battery powered device into a wired one is to remove the battery. No matter what, Li-ion batteries cannot sustain permanent power. Expensive adapters and new Androids can regulate power well, as can automations, but the best worry-free option is battery removal.

Edit: I’ve just remembered Fairphone, they’re bossing the mobile repair ability front and have removable batteries like pre-2012. Could get one of those

kratoz29@lemm.ee on 11 Mar 21:59 next collapse

I can see my 5 year old android mobile struggling being a suitable self hosting machine… (Because of the battery).

But not gonna lie, having it working as a more advanced travel router connect to Tailscale sounds like a neat idea (which I think it is already possible? The other day I saw the client app that supports subnet routers? I just haven’t tried it, and it has a disclaimer that it drains the battery… So I didn’t end up doing that at that moment when I was away).

node815@lemmy.world on 12 Mar 00:53 next collapse

Maybe your own adblocker, I thought about doing that myself, I use the public one from adguard on my phone (dns.aguard-dns.com) but having it on your own device would be pretty slick perhaps. But thinking about it more, Google wouldn’t just let you use an internal IP for the private DNS. I have tried it with my locally hosted adblocker and it rejects it.

Or you could set up a dashboard like Homepage or Dashy, or Flame or ? Ultimately, your imagination would do! :)

trevor@lemmy.blahaj.zone on 12 Mar 07:18 next collapse

Unfortunately, from trying this myself, I don’t think you can forward port 53 to the Android host, so that won’t work (easily). It seems that privileged ports aren’t allowed to be forwarded.

lka1988@lemmy.dbzer0.com on 12 Mar 22:30 collapse

I’ll have to give this a shot with pi-hole later tonight.

Auli@lemmy.ca on 12 Mar 14:51 collapse

I do it. It has be DOT and you have to have a valid cert.

coffeetastesbadlikecoffee@sh.itjust.works on 12 Mar 08:40 next collapse

This is simultaneously cool and cursed af.

Akito@lemmy.zip on 12 Mar 08:56 next collapse

The day Docker works on Android, I’m settled.

lka1988@lemmy.dbzer0.com on 12 Mar 17:56 collapse

Docker does work on Android. That’s what OP is showing off.

yarr@feddit.nl on 12 Mar 21:32 collapse

Well, if they manage to get it working on Android I’ll be really impressed.

dan@upvote.au on 12 Mar 23:55 collapse

Maybe one day it’ll even work on Android!

yarr@feddit.nl on 13 Mar 04:06 collapse

Even better, maybe it will support Docker.

mrhenry77@lemmy.world on 12 Mar 18:18 next collapse

these are the times when I get jealous, as an iOS user

turnip@sh.itjust.works on 12 Mar 18:36 next collapse

I dont know how you can stand using iOS. Its just so unintuitive, theres no back button and I can’t even figure out copy/paste.

valkyre09@lemmy.world on 12 Mar 21:08 collapse

Copy paste is easy. You just tap on the, no wait you tap on the, fuck hold on. You tap, there we are, on the word and hold until it highlights. No wait hold on. Fuck. There we are. Ok now you tap on the highlighted word to copy, fuck wait Ah fuck it just type it again yourself

turnip@sh.itjust.works on 12 Mar 22:52 next collapse

Haha my feelings exactly, I can work in Linux cli and program rust with ease, but I can’t copy and paste on an iPhone.

lka1988@lemmy.dbzer0.com on 12 Mar 23:02 collapse

I feel this. My work phone is an iPhone 12, and typing is a pain compared to Android.

MaggiWuerze@feddit.org on 12 Mar 19:20 collapse

You’re free to join us

javilopezg@lemmy.world on 12 Mar 22:22 next collapse

The change maker feature would be to arrive home and plug your phone in a dock station and have a desktop to use as a pc

Brickhead92@lemmy.world on 12 Mar 22:35 next collapse

But then how would I look at my phone while using my Desktop.

I’ll need a dummy phone to doom scroll on.

lka1988@lemmy.dbzer0.com on 12 Mar 22:39 next collapse

I have a Steam Deck dock specifically for this. Except the mouse comes up on the phone screen instead of the monitor. Weird bug.

dan@upvote.au on 12 Mar 23:50 next collapse

This has been supported on Samsung devices for years - it was first added to the Galaxy S8 (2017). It’s called Samsung DeX. You can plug a phone or tablet into a monitor, keyboard, and mouse, and it gives you a full screen experience.

They have docking stations, but you can also just use a USB C hub.

Lv_InSaNe_vL@lemmy.world on 13 Mar 00:02 collapse

I’ve been talking about this for years! I got the idea from razer but I’m imagining the laptop chassis adds a nice screen, enormous battery, better IO, and then it just uses the touch screen as the track pad.

It could be so cool

Toribor@corndog.social on 12 Mar 23:37 next collapse

I’m assuming your phone has to be rooted for this right? Or is docker running without root? I didn’t realize anything like this was possible. This is interesting.

dan@upvote.au on 12 Mar 23:48 next collapse

I’ve never tried it on Android, but running Docker in rootless mode is doable, and is encouraged for security reasons. docs.docker.com/engine/security/rootless/

Dust0741@lemmy.world on 12 Mar 23:58 collapse

Nipe! Not rooted. In a VM though

padook@feddit.nl on 12 Mar 23:58 collapse

I dont think I so much want this for my phone as for my homemade AndroidTV boxes. Losing the Linux functionality after switching from Kodi/libreelec had been my biggest pain point.

Can’t wait to see my TV boxes show up in my Beszel dashboard!

Lv_InSaNe_vL@lemmy.world on 13 Mar 00:00 collapse

Can you tell me more about these homemade android TV boxes? I built a really shitty front end to “turn” my Linux based mini PCs into a media streamer but it lacks things like Chromecast and reliability haha

padook@feddit.nl on 14 Mar 00:42 collapse

I have two TV boxes, one is a Raspberry pi 4, the other is a pi 5. I installed KonstaKANG’s android port for the Pi’s. Depending on your familiarity with flashing the Pi’s this video from Explaining Computers offers a way to get Konsta installed through PINN. Once they’re up and running they act just like a cellphone. This remote works really well.

Install f-droid, and/or obtainium, and/or Aurora Store and you can install whatever apps you want on the box.

I don’t personally use Chromecast, so I can’t vouch for that working. Mine is more centered around consuming Jellyfin (jellyfin android tv app), youtube (newpipe), podverse, and Radiodroid

I really liked Kodi, but could never get it to correctly sync across devices so I finally went the android route. I’ve been pretty happy

Feel free to pick my brain if you have more questions

Lv_InSaNe_vL@lemmy.world on 14 Mar 00:52 collapse

Ah okay. The Chromecast thing is a killer feature I’ve been looking for, my media PC that I have now is pretty good, just doesn’t have that one thing.