Imagine this but instead of needing any CLI skills, you just install a "blog" app on the phone, do a quick OAuth2 flow with your domain provider[0] to connect a domain through a tunnel, and you're ready to start posting. This is essentially my vision of the future of selfhosting. We have a lot of work to do, but the technology is all there.
Also, if you're looking for similar tools to pinggy, I maintain a list here[1].
With android termux you can install e.g. django/wagtail and take it from there.
In a sense these projects prove the obvious yet hidden-in-plain-sight: the vast numbers of mobile computing devices that have circulated since the "iPhone moment" could be reconfigured in all sort of ways to be more than a dumb touch screen client for scrolling down social media pages.
If we ever get to see a true open mobile OS there might be a Cambrian explosion of new applications and use cases. Not holding my breath though. The failure of open source mobile to reach a workable stage is now pretty clear. It seems this domain is TITO (too important to open).
Lots of phones are open enough to install lots of things on. My daily phone has lineageos (I'm using it), which is an existence proof that you can run a kernel of your choice and userland of your choice, and my previous one had something called treble, which I didn't look into but also involved supplying your own kernel and userland.
If you have the ability to run a kernel and userland of your choice, what can't you do? I know something you can't do: applications that require much electric power. And something else: applications that require many people (or even everyone) to run the same software. But really, if there were to be some sort of cambrian explosion it ought to show up on my daily phone or one of the many similar ones.
It's actually a great idea in some ways to use a phone instead of a Raspberry Pi, since it has a battery in case your electricity goes unstable, you can add LTE as a backup internet, and it has a screen to bootstrap it without an external monitor which not all of us have. I only wish Android phones would be more open to put a full Linux distro on them.
Ubuntu touch supports some old phones you can buy used. It's technically not a android phone anymore, but it's possible. I tried it on my oneplus 6 and I worked, I'm just not ready for the ecosystem yet
>Android phones would be more open to put a full Linux distro on them
Honest question. Why? How is Android not fulfilling your needs as a full Linux distro? Are there any features that you would like to see added, or do you feel that apps for what you want are not currently available?
I think the idea of using cheap/old Android phones as home servers is exciting, actually. If you compare the hardware with a raspberry pi, the results turn out pretty good:
- like a raspi, phones are optimized for "always-on" operation, which means they are energy efficient and completely quiet.
- compute power is probably larger than a raspi, or at least comparable, depending how old the phone is.
- unlike a raspi, phones come with lots of additional hardware, such as a battery, touchscreen, microphones, camera, wifi, bluetooth, a cellular modem and various sensors. More modern phones might even come with TPUs or other accelerators.
- there are also a few GB of flash storage.
I think hardware-wise, that's already more than enough for some basic "tinker" usecases, where you mostly need an always-on device with basic LAN and internet connectivity: i.e. IRC bots or servers, webhook targets, pihole, (small) media or Owncloud servers, etc.
Projects which require a camera, microphone, display or bluetooth connectivity might even be a lot cheaper because you don't need any additional hardware.
Things are getting less advantageous when you need additional ports or peripherals, i.e. Ethernet, HDMI/DisplayPort or GPIO pins. You can sort of solve this by using an USB-OTG cable and then connecting various USB peripherals to provide the missing ports. (You could even connect an Arduino to get GPIO pins).
It'll probably not work well with high-bandwidth use cases if everything has to be relayed through a single USB2 port though. That makes it hard for usecases such as router, NAS or media player. Maybe newer phones with USBC would work here though.
The other drawback is that you'll invariably end up with all kinds of proprietary and opaque firmware blobs. I think the best option here would be Fairphone, but even there I'm not sure if they are entirely blob-free.
Nevertheless, I think it's an interesting avenue. Termux seems like a good start, but it's still just a VM in an app. Does anyone know if there are actual AOSP or Lineage distributions for something like this?
> Termux seems like a good start, but it's still just a VM in an app.
Termux is surprisingly native. The thing holding your back is mostly SELinux sandboxing. Termux compiles most of the normal Linux userland, but adapted to use bionic libc and with /data/data/com.termux/files/ as $PREFIX.
If you really want you can run "normal applications/normal distros" that depend on a "normal libc" by using proot, but even thought the performance is bad, it's still not a VM.
You are only stuck with VMs if you want to run, say, x86_64 with qemu or JVM bytecode.
Note: For USB-C, there already are a number of cheap docks which provide HDMI and Ethernet and can also power the host. The keyword seems to be "USB-C PD hub".
Not sure though if those actually let you route the phone's GPU to a second screen or if they just have a cheap additional GPU built-in.
Definitely neat for a small personal or community site where you don't expect any kind of public traffic.
Not so useful for something that might end up on HN and go down.
Could also put a CDN infront to lighten the load on the upstream but guess what, now you're not just hosting on your phone anymore and might as well use other cloud services where often you can host more for free than a phone can handle
Some telecom providers actually provide a public IP address that maps directly to your phone. You might have to change your APN settings to get one, and it might be dynamic.
It's a spectacularly bad idea that lets you serve HTTP (and any other port) directly from your phone without a SSH tunnel. You can also debug your Android with ADB... over the internet.
> You are a web DevOps expert. Provide a list of ten concise combinations of software stack and hardware, starting from "budget hosted VPS website, heavy caching, and dynamic DNS with outside cache" and ending with "Android phone at home on standard connection using third party dynamic DNS and basic web server". Each combination should get more homebrew until that final Android one.
There's some room for prompt improvement but the ideas in the result were an interesting read (In place of the linked website which I couldn't read of course).
For one, the list seemed way more fun, or the projects easier to maintain for a single person, when I specified "web hobbyist" as compared to DevOps expert... though I know there really are people out there who are _definitely_ looking forward to maintaining enterprise software on the weekends...
If we were using HTTP and not HTTPS, I think this would have survived the HN death hug. It's great in many ways, but it sadly puts a wet blanket on the whole low-powered server thing :-/
I have a music server(Navidrone) running on a similar setup (https://davidhampgonsalves.com/junk-drawer-phone-as-a-music-...) but preventing Termux from being killed is a persistent issue. PostmarketOS seems like the best option but its device support is quite limited.
I like the idea of using a phone for a web server. There could be an app, a simple CMS, a simple CDN. Not much different from social media websites, but maybe more decentralised.
Then again, actual servers seem more reliable in practice; and decentralised platforms like e.g. pixelfed [1] work well for me for this kind of usage.
Android does not allow running server on port below 1000 so with dyndns your URL will look funny which is okay for HN crowd but not for people you want to share your blog with.
[+] [-] anderspitman|2 years ago|reply
Also, if you're looking for similar tools to pinggy, I maintain a list here[1].
[0]: https://takingnames.io/blog/introducing-takingnames-io
[1]: https://github.com/anderspitman/awesome-tunneling/
[+] [-] nologic01|2 years ago|reply
In a sense these projects prove the obvious yet hidden-in-plain-sight: the vast numbers of mobile computing devices that have circulated since the "iPhone moment" could be reconfigured in all sort of ways to be more than a dumb touch screen client for scrolling down social media pages.
If we ever get to see a true open mobile OS there might be a Cambrian explosion of new applications and use cases. Not holding my breath though. The failure of open source mobile to reach a workable stage is now pretty clear. It seems this domain is TITO (too important to open).
[+] [-] chillaranand|2 years ago|reply
https://avilpage.com/2018/02/deploy-django-web-app-android.h...
[+] [-] fsflover|2 years ago|reply
PinePhone and Librem 5 are already here, both running various GNU/Linux flavors.
[+] [-] Arnt|2 years ago|reply
Lots of phones are open enough to install lots of things on. My daily phone has lineageos (I'm using it), which is an existence proof that you can run a kernel of your choice and userland of your choice, and my previous one had something called treble, which I didn't look into but also involved supplying your own kernel and userland.
If you have the ability to run a kernel and userland of your choice, what can't you do? I know something you can't do: applications that require much electric power. And something else: applications that require many people (or even everyone) to run the same software. But really, if there were to be some sort of cambrian explosion it ought to show up on my daily phone or one of the many similar ones.
[+] [-] invig|2 years ago|reply
So many possibilities have been crushed.
[+] [-] k_bx|2 years ago|reply
[+] [-] unstuck3958|2 years ago|reply
You can: https://userland.tech/
[+] [-] kwonkicker|2 years ago|reply
[+] [-] VanTodi|2 years ago|reply
[+] [-] pmlnr|2 years ago|reply
[+] [-] unknown|2 years ago|reply
[deleted]
[+] [-] spidersouris|2 years ago|reply
[+] [-] charcircuit|2 years ago|reply
Honest question. Why? How is Android not fulfilling your needs as a full Linux distro? Are there any features that you would like to see added, or do you feel that apps for what you want are not currently available?
[+] [-] gbraad|2 years ago|reply
[+] [-] xg15|2 years ago|reply
- like a raspi, phones are optimized for "always-on" operation, which means they are energy efficient and completely quiet.
- compute power is probably larger than a raspi, or at least comparable, depending how old the phone is.
- unlike a raspi, phones come with lots of additional hardware, such as a battery, touchscreen, microphones, camera, wifi, bluetooth, a cellular modem and various sensors. More modern phones might even come with TPUs or other accelerators.
- there are also a few GB of flash storage.
I think hardware-wise, that's already more than enough for some basic "tinker" usecases, where you mostly need an always-on device with basic LAN and internet connectivity: i.e. IRC bots or servers, webhook targets, pihole, (small) media or Owncloud servers, etc.
Projects which require a camera, microphone, display or bluetooth connectivity might even be a lot cheaper because you don't need any additional hardware.
Things are getting less advantageous when you need additional ports or peripherals, i.e. Ethernet, HDMI/DisplayPort or GPIO pins. You can sort of solve this by using an USB-OTG cable and then connecting various USB peripherals to provide the missing ports. (You could even connect an Arduino to get GPIO pins).
It'll probably not work well with high-bandwidth use cases if everything has to be relayed through a single USB2 port though. That makes it hard for usecases such as router, NAS or media player. Maybe newer phones with USBC would work here though.
The other drawback is that you'll invariably end up with all kinds of proprietary and opaque firmware blobs. I think the best option here would be Fairphone, but even there I'm not sure if they are entirely blob-free.
Nevertheless, I think it's an interesting avenue. Termux seems like a good start, but it's still just a VM in an app. Does anyone know if there are actual AOSP or Lineage distributions for something like this?
[+] [-] ElectricalUnion|2 years ago|reply
Termux is surprisingly native. The thing holding your back is mostly SELinux sandboxing. Termux compiles most of the normal Linux userland, but adapted to use bionic libc and with /data/data/com.termux/files/ as $PREFIX.
If you really want you can run "normal applications/normal distros" that depend on a "normal libc" by using proot, but even thought the performance is bad, it's still not a VM.
You are only stuck with VMs if you want to run, say, x86_64 with qemu or JVM bytecode.
[+] [-] edude03|2 years ago|reply
[+] [-] xg15|2 years ago|reply
Not sure though if those actually let you route the phone's GPU to a second screen or if they just have a cheap additional GPU built-in.
[+] [-] jmkni|2 years ago|reply
[+] [-] mfeldheim|2 years ago|reply
[+] [-] stareatgoats|2 years ago|reply
[+] [-] ghoshbishakh|2 years ago|reply
https://pinggy.io/blog/host_website_on_android/
[+] [-] hakube|2 years ago|reply
[+] [-] bostonsre|2 years ago|reply
[+] [-] axelthegerman|2 years ago|reply
Not so useful for something that might end up on HN and go down.
Could also put a CDN infront to lighten the load on the upstream but guess what, now you're not just hosting on your phone anymore and might as well use other cloud services where often you can host more for free than a phone can handle
[+] [-] roessland|2 years ago|reply
It's a spectacularly bad idea that lets you serve HTTP (and any other port) directly from your phone without a SSH tunnel. You can also debug your Android with ADB... over the internet.
[+] [-] grose|2 years ago|reply
[+] [-] lanewinfield|2 years ago|reply
[+] [-] retube|2 years ago|reply
[+] [-] darkstar_16|2 years ago|reply
[+] [-] themodelplumber|2 years ago|reply
> You are a web DevOps expert. Provide a list of ten concise combinations of software stack and hardware, starting from "budget hosted VPS website, heavy caching, and dynamic DNS with outside cache" and ending with "Android phone at home on standard connection using third party dynamic DNS and basic web server". Each combination should get more homebrew until that final Android one.
There's some room for prompt improvement but the ideas in the result were an interesting read (In place of the linked website which I couldn't read of course).
For one, the list seemed way more fun, or the projects easier to maintain for a single person, when I specified "web hobbyist" as compared to DevOps expert... though I know there really are people out there who are _definitely_ looking forward to maintaining enterprise software on the weekends...
[+] [-] jraph|2 years ago|reply
[+] [-] dt3ft|2 years ago|reply
Is this an ad?
[+] [-] edent|2 years ago|reply
https://mobiforge.com/design-development/pamp-personal-apach...
Same issues as faced here, of course.
[+] [-] ghoshbishakh|2 years ago|reply
[+] [-] xx_ns|2 years ago|reply
[+] [-] hk1337|2 years ago|reply
[+] [-] marginalia_nu|2 years ago|reply
[+] [-] chrismorgan|2 years ago|reply
[+] [-] arp242|2 years ago|reply
[+] [-] dh-g|2 years ago|reply
[+] [-] thih9|2 years ago|reply
Then again, actual servers seem more reliable in practice; and decentralised platforms like e.g. pixelfed [1] work well for me for this kind of usage.
[1]: https://pixelfed.org
[+] [-] janandonly|2 years ago|reply
Is it a self-hosted Mastodon instance, with the sole purpose of hosting your photos (and videos)?
Why is there a reference to AWS, to do the heavy lifting instead of rely on your own server?
[+] [-] lionkor|2 years ago|reply
[+] [-] quaintdev|2 years ago|reply