this post was submitted on 22 Oct 2023
90 points (73.7% liked)

Selfhosted

40382 readers
395 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 2 years ago
MODERATORS
 

The future of selfhosted services is going to be... Android?

Wait, what?

Think about it. At some point everyone has had an old phone lying around. They are designed to be constantly connected, constantly on... and even have a battery and potentially still a SIM card to survive power outages.

We just need to make it easy to create APK packaged servers that can avoid battery-optimization kills and automatically configure an outbound tunnel like ngrok, zerotrust, etc...

The goal: hosting services like #nextcloud, #syncthing, #mastodon!? should be as easy as installing an APK and leaving an old phone connected to a spare charger / outlet.

It would be tempting to have an optimized ROM, but if self-hosting is meant to become more commonplace, installing an APK should be all that's needed. #Android can do SSH, VPN and other tunnels without the need for root, so there should be no problem in using tunnels to publicly expose a phone/server in a secure manner.

In regards to the suitability of home-grade broadband, I believe that it should not be a huge problem at least in Europe where home connections are most often unmetered: "At the end of June 2021, 70.2% of EU homes were passed by either FTTP or cable DOCSIS
3.1 networks, i.e. those technologies currently capable of supporting gigabit speeds."

Source: https://digital-strategy.ec.europa.eu/en/library/broadband-coverage-europe-2021

PS. syncthing actually already has an APK and is easy to use. Although I had to sort out some battery optimization stuff, it's a good example of what should become much more commonplace.

cc: @selfhosted
#selfhosted #selfhosting

top 50 comments
sorted by: hot top controversial new old
[–] MigratingtoLemmy@lemmy.world 28 points 1 year ago (1 children)

Upvoted, but I feel horrified by the notion. I'd much rather have a headless server

[–] Wander@packmates.org 13 points 1 year ago (1 children)

@MigratingtoLemmy use a hammer to break the screen, control via adb :vlpn_happy_blep:

[–] Omniraptor@lemm.ee 4 points 1 year ago (1 children)

Wait are you messaging from mastodon?? Is that why the emoji won't render

[–] Wander@packmates.org 4 points 1 year ago* (last edited 1 year ago) (1 children)

@Omniraptor ah yes! Probably that's why.
Actually the whole original post was sent via Mastodon.

I tend to write posts that I share to my Mastodon followers and then at the end I mention a Lemmy community if I believe the community would also find it interesting.

[–] Omniraptor@lemm.ee 4 points 1 year ago* (last edited 1 year ago) (2 children)

That is so cool I didn't realize lemmy and mastodon were different views into the same database, assumed they were different services with no overlap except some underlying tech (I don't know much about fediverse structure). But how does that work with like, character limits? Iirc lemmy can have much longer comments

[–] madargon@is-a.cat 3 points 1 year ago

@Omniraptor @Wander Probably user is limited during writing by own instance limit and longer posts of others could be displayed. I saw this between mastodon/misskey instances with various limits, probably it could be similar for lemmy/kbin federation. Currently I am writing this on small mastodon server with 20k limit (never used this fully yet....)

load more comments (1 replies)
[–] southsamurai@sh.itjust.works 22 points 1 year ago (1 children)

I mean, android is fine I guess, but it's being pushed to be less and less able to be separated from Google. I think for a lot of people interested in self hosting, there's a low amount of interest in it because of that.

[–] Wander@packmates.org 5 points 1 year ago* (last edited 1 year ago)

@southsamurai Oh that's definitely a huge concern, but not just for self-hosting but for privacy in general.

But still, if the average joe wants to self-host something using an old phone is probably the easiest way to get them to try self-hosted alternatives and drop corporate / commercial services.

Maybe not the 'average average joe' such as my parents, but anyone who is minimally curious enough to do stuff such as registering a domain, setting up a game server for friends and maybe has opened the CMD windows console once or twice in the past following a tutorial. That kind of demographic (IDK if it has a name) might be much more inclined to self-host if it was as easy as installing an APK and letting your phone one somewhere at home.

Overall as long as Android doesn't become straight out malicious spyware itself, the benefit of dropping commercial alternatives might very well be a net positive. In a worst-case scenario, any tunnel / vpn configuration necessary to expose a service to the internet could also add an automated step to blackhole requests to google's tracking servers.

[–] onlinepersona@programming.dev 21 points 1 year ago (2 children)

IMO, more like Linux. Android for such old devices is unmaintained, but if you're able to run Linux on it you'll still be able to apply kernel updates and security updates for software will continue to exist. Many things are opensource too and you should be able to recompile them on the android device to make it run.

[–] AbidanYre@lemmy.world 2 points 1 year ago

PostMarketOS or UBPorts are basically that, but have limited functionality and few hardware options.

load more comments (1 replies)
[–] awooo@pawb.social 18 points 1 year ago

Hmm I think my main concern would be lack of kernel/firmware updates, running something like postmarketOS could partly solve that and still be nearly as easy to set up (just unlock and flash a prebuilt image)

But firmware is still almost entirely dependent on the vendor, since it's all signed and unpatchable.

Next issue would be lack of connectivity on a lot of phones, which have gone backwards and include USB 2.0 now. WiFi is an option, but less stable, I personally decided to just go 100Mbps and suffer.

As for the battery, it would help a lot if phones were designed to boot without one and they were removable, it all worked well for about half a year until I found out I had a spicy pillow and had to replace it with direct power to the board, which made the whole setup much less elegant and required soldering.

It all comes down to how devices are designed in the end. If someone took the time to make a computer instead of just a phone, and included features that make it useful past its initial life that aren't that popular (display output, microsd, headphone jack), mainlined all the drivers and maintained firmware, that would be a different story.

But that's not a very profitable model, because it's all about reducing waste and thus selling less. A lot needs to change.

[–] Moonrise2473@feddit.it 18 points 1 year ago

Big problem: updates for something that is directly exposed to internet

Some low end devices will stop getting security updates 6 months after launch because the OEM launches a new model every two weeks and obviously doesn't have resources to dedicate to it

In some cases, even high end devices don't get updates and are discontinued internally shortly after launch, for example the Xiaomi mix 3 5g

Yes, root and custom ROMs could solve the problem, but not as easy as regular Linux where you just use a package manager to update. First issue is needing to wipe after updates and you have to reinstall and reconfigure everything

[–] bjoern_tantau@swg-empire.de 17 points 1 year ago (3 children)

I feel like Android is adding some new power saving "feature" with every version to kill all the useful stuff I want to keep running in the background.

Last stupid thing I remember was when it removed my CalDAV synchronisation because I haven't been "using" the CalDAV app for some months.

Not to mention all the times it decides to kill something you want to use because it thinks the RAM would be more needed elsewhere. Honestly my 128 MB RAM Nokia N900 could run more apps at the same time than my 4 GB RAM Fairphone.

[–] Buddahriffic@lemmy.world 10 points 1 year ago

Yeah, android is a lot like Windows in that they make choices that might benefit users who don't know what's going on but interrupts or harms things power users are doing. They are just better at not being as annoying with it and don't beg people to use their default programs.

[–] trolololol@lemmy.world 6 points 1 year ago

You're right, that's a feature if you're a regular phone user and a bug if you want it as a server.

Also, even if the application is still running you can have the os almost fully shutdown even if it's charging. Again, it's a behavior tuned for a typical user.

[–] TeaEarlGrayHot@lemmy.ca 5 points 1 year ago

Thanks for the monthly reminder to open DavX5 🤣

[–] benjohn@todon.nl 17 points 1 year ago (2 children)

@Wander @selfhosted this whole “We are walking about with entirely reasonable servers in our pockets for reasonable scales - why doesn’t it feel like that?” thing is in my brain quite a bit.

[–] Wander@packmates.org 11 points 1 year ago

@benjohn @selfhosted 6-8 GB of RAM with powerful CPU and GPU that was designed to run games and can in some cases run small AI models is nothing to scoff at imho.

[–] benjohn@todon.nl 7 points 1 year ago

@Wander @selfhosted I have conversations with peers where they talk about “servers” and “computers” as if they figure them as quite distinct things.

[–] MonkCanatella@sh.itjust.works 16 points 1 year ago (1 children)

Pretty cool concept actually. upcycling old tech does seem to be a selfhosting hobby. I see a lot of criticism that I think doesn't really see the value proposition. You should be able to root the device and install a new OS. I wonder how limited the bandwidth would be though, and whether it'd be worth the cost to get adapters, if they exist, to allow more throughput. I do like the concept though.

[–] elscallr@lemmy.world 3 points 1 year ago (1 children)

If I'm just using them as a glorified small Linux box it could work pretty well. If you're going to host services that don't require a ton of bandwidth you don't need a hard line or anything. Hell my Plex server is using WiFi (802.11ax but still) and it delivers 4K just fine.

[–] MonkCanatella@sh.itjust.works 3 points 1 year ago (1 children)

Shit, I run plex of my synology ds1621+ and it chokes on 4k regularly. This is with a cabled connection. It's almost certainly the CPU though. These things are weak as hell. What're you running plex on ?

[–] elscallr@lemmy.world 3 points 1 year ago (3 children)

Admittedly the server on which it's running is pretty beefy and I don't let it transcode. I've got enough disk space that if something spends time transcoding I just optimize it to a new version of the file.

By bandwidth I was speaking in terms of network only, but if you were to run it on a simple server that didn't do any transcoding it might be ok.

load more comments (3 replies)
[–] PieMePlenty@lemmy.world 15 points 1 year ago

Android? No. It's not made for it. You are using a hammer to paint a wall.

Phones? With a different Linux based distro? I can see it happening. For a small niche at least.

[–] Appoxo@lemmy.dbzer0.com 14 points 1 year ago (1 children)

Who provides the software and firmware updates for my antique Samsung S4 and Galaxy young?
I hope you will give me some firmware for the old snapdragon.
Don't forget the loads of Exynos CPUs and loads of GPUs from different vendors.

[–] AbidanYre@lemmy.world 3 points 1 year ago

Who provides the software and firmware updates

That's the fun part. Nobody does.

The future? No. A useful niche? Sure.

I run 4 mail servers, 2 game servers, 3 directory/auth servers, a firewall/router, a NAS, a security system server, a media server, a monitoring server, and a couple others. Android ain’t gonna cut it.

[–] Wander@packmates.org 9 points 1 year ago* (last edited 1 year ago) (2 children)

@selfhosted Update:

  1. Just to clarify, the the whole point is that Android makes it easy for less tech oriented people to host small single user / family services.

It does not need to be perfect, have massive throughput or allow for massive amounts of read/write cycles.

If people can host their own media server like Jellyfin or note taking apps like Joplin instead of using commercial services by simply installing an APK on an old phone they can leave connected at home, that's already a big win.

  1. Regarding device longevity, Android 13 apparently supports / will support full KVM emulation. Windows can be run if you have root while android based VMs are expected to be possible without the need for root. Since this type of virtualization allows VMs to run their own kernel, keeping the "server app" updated should allow the user to be protected even if the host OS is outdated as long as these server-app-VMs are trustworthy themselves.
load more comments (1 replies)
[–] bustrpoindextr@lemmy.world 8 points 1 year ago (1 children)

Just use raspberry pis and Linux. You'll have better support.

[–] AbidanYre@lemmy.world 11 points 1 year ago (21 children)

Then ditch the raspberry pi and get an sff PC that has an x86 processor in it.

load more comments (21 replies)
[–] eskuero@lemmy.fromshado.ws 7 points 1 year ago

It has an UPS builtin 😇

Jokes aside I used to run a few python bots inside termux on my very old S3 Mini a few years ago. It did the job at least.

[–] NeoNachtwaechter@lemmy.world 7 points 1 year ago* (last edited 1 year ago)

You absolutely want to remove the batteries. Otherwise they would die of old age pretty soon and then it creates danger of fire. Either a new battery for your 'server' every 5 years, or some tinkering solution, maybe supercapacitors.

Then you need an OS with long term support/maintenance. Not stock Android, because it evolves away from old hardware too fast. Maybe something like Lineage.

One problem remains: I have serious doubts about the network interface, if it can handle high throughput or many connections, like a webserver for several users, or even torrenting. A NAS for 1 person seems very possible, though.

[–] andreluis034@lm.put.tf 6 points 1 year ago (1 children)

The latest pixel devices (since 6 I think?) already provide accees to a /dev/kvm device, so maybe you could even run a normal Ubuntu server VM on your phone for hosting these services.

[–] hexagonwin@lemmy.sdf.org 3 points 1 year ago

10 years ago I ran a Debian chroot inside my Android after rooting and that still works, no need to run a KVM (mostly).

[–] BearOfaTime@lemm.ee 5 points 1 year ago* (last edited 1 year ago)

I'd be more inclined to say Raspberry Pi. Low power, small, scalable.

And if you want Android, there's a Lineage build for BananaPi. https://wiki.lineageos.org/devices/#banana-pi

I'm currently designing a sync/backup/mesh network device for family/friends. Something they can simply plugin, and I can manage remotely.

[–] muzzle@freeradical.zone 4 points 1 year ago

@Wander @selfhosted Sounds like a great way to kill you phone's battery. But maybe if you created an ad-hoc stack... Have you ever heard of @veilidnetwork ?

[–] herzenschein@furry.engineer 4 points 1 year ago* (last edited 1 year ago) (2 children)

@Wander @selfhosted This sort of setup is very attractive IMO because of the low power usage. Android phones use much less power than old PCs.

The main con I see is not having ethernet (maybe there's some sort of MicroUSB/USB-C to ethernet adapter, but I didn't look into it yet). That, and there being only one port.

load more comments (2 replies)
[–] Decronym@lemmy.decronym.xyz 4 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
PCIe Peripheral Component Interconnect Express
Plex Brand of media server package
RPi Raspberry Pi brand of SBC
SBC Single-Board Computer
SSD Solid State Drive mass storage
SSL Secure Sockets Layer, for transparent encryption

6 acronyms in this thread; the most compressed thread commented on today has 5 acronyms.

[Thread #231 for this sub, first seen 22nd Oct 2023, 22:25] [FAQ] [Full list] [Contact] [Source code]

[–] simple@lemm.ee 3 points 1 year ago

I've already heard of people using Termux to host services on their old phones. Seems to work well.

[–] z00s@lemmy.world 3 points 1 year ago

Counterpoint: spicy pillows

I was going to host pihole on an old android until I noticed it getting quite warm while continuously connected to power. Realised I didn't know the lifespan of the battery and didn't want it tp start a fire.

[–] beirdobaggins@lemmy.world 3 points 1 year ago* (last edited 1 year ago)

Just for shiggles, I setup and ran a minecraft Java server on an old phone for a little while. I did this through Termux.

It was surprisingly good.

load more comments
view more: next ›