10 ms·
Please no. Phones go into tunnels, run out of battery, and go indoors where there's a poor signal or none at all. They make terribly unreliable servers. Not to
by crazygringo 3y ago
Please no. Phones go into tunnels, run out of battery, and go indoors where there's a poor signal or none at all. They make terribly unreliable servers. Not to mention how much faster this would chew up battery life.
If you want to keep a spare phone plugged in all the time in your closet, connected to Wifi/Ethernet, and hack it to be a webserver, then go ahead. But webservers on mobile devices, being used in a mobile way, are a terrible idea.
- LrnByTeach 3y agoTo account for the changing times, I believe a Personal LLM should be running on your phone (with a cloud data backup) with background AGENTS looking for shopping deals, working with your calendar and making appointments for all life chores such as your car oil change appointment bookings, recommending preventive maintenance repairs, answering on your demand questions on your your kids math/english report cards grade progress for last few semesters, and so on.
- jeroenhd 3y agoNobody is saying that everyone should host websites on your phone. The author is saying you should be able to, if you so choose. Android and iOS put restrictions on what applications on a phone are able to do, often for arbitrary reasons. You can't hack a web server in your closet to run on port 80 without jailbreaking your phone/unlocking the bootloader and rooting your phone, and I can't really think of a reason why that should be. It's not as it Android and iOS come with important http(s) servers out of the box, why shouldn't port 80/443 be available to apps?
- FireInsight 3y agoUnrestrained webservers on phones is an edge case that would certainly be abused by all sorts of crapware while being a very uncommon usecase for mobile devices at all.
- nulld3v 3y agoApps can already do this mostly and it's caused absolutely no issues. In fact, it's often used for ad-blocking. You just can't bind to port 80/443.
- MichaelZuo 3y agoIt's true that there will always be unscrupulous actors but there are many ways to restrict or punish them already, I don't see why they would necessarily overwhelm existing methods.
- jeroenhd 3y agoApps can already open ports and with the HTTP DNS record arbitrary ports can be used to serve http/3 content. Services like RDP and several types of VPN server all connect to unprivileged ports any app can listen on. There should be a separate permission for listening on standard, reserved ports (anything in the IANA docs for all I care) that should require manual consent, like with location access. In fact, I think there should be a retractable permission for any kind of remotely accessible port binding. The fact any calculator app can start a VPN server on my phone without my knowledge isn't good! That doesn't mean providing any type of service is inherently bad, though. For instance, there are tons of phone <=> desktop sync apps (My Phone on Windows, KDE Connect on Linux/Windows/Mac) that constantly communicate between each other. Why should your phone always be the one to initiate that direct connection? Why should we rely on cloud servers when mutually authenticated SSH is already doing every bit of protection we could possibly need? My phone is half a meter away from my computer, it shouldn't need to be this difficult!
- theamk 3y agoYou don't need reserved ports for the custom protocos.. And most of them, like sync apps, use high port anyway.
- kroltan 3y ago> HTTP DNS record Can you tell me more about that? I know about SRV records from Minecraft (of all things!) for a similar purpose, can you point me towards a reference of what is this about? Wikipedia fails me.
- extraduder_ire 3y ago> why shouldn't port 80/443 be available to apps Because they're < 1024, I guess. Anywhere I've seen besides windows needs you to be root, or have some other specific permission to listen on that port. Not that I agree with it, but it is the existing status quo.
- jeroenhd 3y agoI know about privileged ports, they just don't make sense anymore. They were a good idea on a timeshared system with groups of students logging into their own shells because equivalent personal computers were unaffordable. These days, computers are used by one, maybe two or three people. If I, the only user of my phone, decide I want to use port 80, why can't I? Put this stuff behind a special privilege for all I care.
- justsomeadvice0 3y agoIIRC macOS got rid of privileged ports for these reasons. Dunno about iOS... But in any case what cell provider is going to let you handle inbound traffic? Most of the wifi networks you are on are NAT'd, etc. At best you'd probably want an outbound persistent tunnel that is "terminated" by a relay elsewhere. At that point you might as well just have the relay host the thing.
- toast0 3y agoYou're not getting inbound connections on IPv4 without a fight, although, I remember when you used to be able to pay mobile carriers to get a public IPv4 address that might have also been static(!) for VPN purposes. But it's not uncommon for carriers to give you a whole /64 on IPv6, and for that to be full proper connectivity (maybe they block smtp and smb, that's very common). Yeah, IPv6 isn't everywhere, but if you have it on your phone and everywhere you want to access you phone from...
- maccard 3y agoThat's true even with a residential ISP though. It's no harder than serving off a laptop on android.
- tmpX7dMeXU 3y agoI chose to purchase a phone that can’t do this. I’m fine with that. I’d rather my phone be how it is. I don’t need some nerd fighting for me in some imagined battle. I am incredibly sick of this line of reasoning. Anyone who spends any time arguing this point quite clearly has too much time on their hands and no real problems. It’s utterly cringey. Leave me be.
- saagarjha 3y agoI fail to see how this has anything to do with what your personal preferences are?
- nulld3v 3y ago[flagged]
- smoldesu 3y agoI come baring bad news; your smartphone can host webpages whether you like it or not. Worse yet, it can use it's browser to render arbitrary pages of data (detestable feature) and even execute code when given permission by the kernel. Very scary stuff. Thankfully, nobody will be forcing you to use this feature; it shouldn't bother someone who ignores it. It is a feature of your phone though, unless you're daily-driving a pager or 2G Nokia. Hopefully this helps you make peace with the "utterly cringey" reality of modern computing.
- behringer 3y agoYou fail to see the irony that the only reason you have it so good with your phone software is because of the pushback of open source and open standards the nerds have had to always fight for.
- relativ575 3y agoThe only reason? Tech people here have some very self-flattery view. The main reason, and I wouldn't call it the only reason, the phone being an essential item is because it meets the needs of average consumers, not just for the tiny tech population. If a website is what everyone wants, then trust me it will be front and center in any phone ads, not the camera.
- seiferteric 3y agoActually I thought this was silly, but if your service provider provided and upstream cdn/cache, I think it could work pretty well. So when you are out of service area, they simply hit the cache.
- crazygringo 3y agoThen there's no reason to have it on your phone in the first place. There's no real difference between a site on a server and a cache on a server from any kind of philosophical decentralization point of view. Just put the thing on the server in the first place and forget about the phone entirely.
- dTal 3y agoThe argument is that control can't be taken away from you, I suppose. I argue in another comment[0] that peer-caching could mitigate unreliability, but that still leaves the question of how you maintain ownership if other entities are allowed to serve it on your behalf. Is it possible to make yourself reliably globally routable without trusting a third party, or needing their permission? [0] https://news.ycombinator.com/item?id=37103721 https://news.ycombinator.com/item?id=37103721
- 2OEH8eoCRo0 3y agoHot take: Android is not an operating system. Go install AOSP and see how useless your device becomes. An OS is more than a kernel and filesystem, it's also a basic set of userspace utilities and functionality. Last time I installed AOSP on a device- wifi wasn't even supported. And Google is removing messaging from AOSP. Phone OS my ass, it's useless without 3rd party cruft that isn't available to end users.
- yjftsjthsd-h 3y agoFor the longest time (maybe still but I'm out of that loop), installing Windows from a DVD left you without wifi, too; was it not an operating system?
- 2OEH8eoCRo0 3y agoThe drivers could be acquired and installed either via CD with the hardware or found on the web. Where are my provided wifi or cellular drivers for my phone?
- jeroenhd 3y agoAOSP contains a music player, a gallery, a camera app, a web browser, a calendar and some dev tools. Sure, they haven't been updated for a few years, but that doesn't mean they're not there. WiFi and LTE work just fine as long as your manufacturer uses hardware supported by normal drivers. That said, office supplies don't make something an operating system. If all it had was a launcher, it would still be an operating system, because you can install the apps you want onto it. I don't know why your device didn't have WiFi, ut it's not the norm. Standard AOSP images should use the vendor partition to load additional drivers if the ones built into the Android kernel don't suffice.
- petabytes 3y agoI remember running a web server on an old tablet several years ago. What changed? Is it not possible on newer devices?
- TZubiri 3y agoThe assumption that an operating system should allow the user to do everything is quite restricting. Under this view, every device should be a standard-issue military-grade turing-machine. There would be no individuality, every device would be the same GPL licensed Free Operating System.
- donkeybeer 3y agoIs it real individuality or fake individuality? All those devices are already general purpose Turing machines that the manufacturers go to great effort and lengths to restrict, writing millions of lines of code, developing cryptographic systems etc to lock them down. A turing machine can run anything, the 'individuality' is just a fake restriction. There is nothing stopping you from running a general piece of software or os on any hardware that meets some minimum requirements. No reason android couldn't run on an 'iphone hardware' or ios on an 'android hardware'. Not the quotes I used, the hardware is just some general purposes CPUs, RAMs etc there is nothing magically 'iPhone' or 'Android' about it. Almost all differences among the various modern phones, laptops are mere software, the software is where the individuality is. Hardware differences exist in degree rarely in kind (megapixels of cameras, gb of ram etc) and even if some new type of hardware or sensor comes out its just a matter of developing a proper interface for the cpu, os etc.
- donkeybeer 3y agoMy point could also be summarized as there is a difference between mere neglect and active effort to block the user from making use of the hardware.
- ehutch79 3y agoLiterally when the title indicates. Why would phones need to run a web server if that’s not the point?
- jeroenhd 3y agoThe point is not that everyone should, it's that some people who want to, should be able to. Phones are quite powerful and can be excellent web servers on a budget.
- ehutch79 3y agoBut now you’re talking about a niche enough audience, that existing ways of running a web server on your phone are fine, and they’ll jump over the proverbial hurdle. This still doesn’t remove the issue with running a server via mobile connectivity. Especially when there’s free options, or inexpensive options that won’t run up your mobile data bills.
- beebeepka 3y agoIt's clear you're against the very idea and you are just coming up with ways why it shouldn't be done. Do phones not have WiFi? Yeah, it's not ethernet but you intentionally made it sound like mobile data is the only option.
- paulcole 3y ago> some people who want to, should be able to And this is a terrible argument IMO. The idea of “It’s my device, it’s my right to do exactly what I want with it” is beyond dead and buried. There are lots of things people want to do with their devices that Apple doesn’t let them do. That’s literally been Apple’s philosophy for decades and at this point it shouldn’t be surprising. Buy the Pinephone if you absolutely have some arcane use-case you can’t live without.
- jeroenhd 3y agoWho said anything about Apple? Apple actually allows hosting content on port 80/443/22/whatever. Also, "I don't need this so nobody should have it" is a terrible take.
- dividuum 3y agoProbably terrible data point, but running "nc -l -p 80" within the iSH shell app on iOS opens port 80 and is reachable from a desktop machine in the local network. iSH has requested the "Local network" permission at some point.
- jeroenhd 3y agoThat's interesting, thanks for the information! Refreshing to see Apple provide to be the less restrictive app platform!
- LeoNatan25 3y agoEven if you run the server, it will die if the app goes to background or the screen turns off. Hardly practical. Just because a port is open does not mean it’s “less restrictive”.
- dividuum 3y agoI apologize in advance: 'cat /dev/location > /dev/null & python -m SimpleHTTPServer 80'. Totally crude but works, even when turning off the display.
- LeoNatan25 3y agoThis just slightly extends the background runtime, not allow indefinite background execution. I don't think ish has the navigation background mode (or audio for that matter) enabled, as it won't be allowed by Apple.
- NavinF 3y agoThere are workarounds for that: https://developer.apple.com/documentation/xcode/configuring-background-execution-modes https://developer.apple.com/documentation/xcode/configuring-... Eg if that terminal app is capable of playing audio, it can play silence to keep the app alive forever in the background. I don't mean to imply that this is practical. Any solution would still destroy battery life.
- skybrian 3y agoWhy run a website on your phone when you could get a Raspberry Pi instead? This idea that computing devices should be general-purpose is left over from when computers were expensive. Repurposing old hardware is cool too, but when you’re not using it as a phone anymore, you could run a different OS.
- Dalewyn 3y ago>Android and iOS put restrictions on what applications on a phone are able to do, often for arbitrary reasons. When people complain about how Windows (and for that matter also Linux and BSD, et al.) don't lock their environments down, they should remember it's because both devs and users alike appreciate and respect the freedom to do whatever the hell we want on our computers. Great power begets great responsibility. Android and iOS place next to no responsibility on the devs and users, but likewise also none of the power.
- lofaszvanitt 3y agoThe author is saying you should be able to, --- But why?
- mcpackieh 3y agoFor most people it doesn't really matter if their personal webpage of gundam facts and cat pictures only has one 9 of uptime.
- jareklupinski 3y ago> If you want to keep a spare phone plugged in all the time in your closet, connected to Wifi/Ethernet, and hack it to be a webserver, then go ahead even this low bar is (imo sadly) currently impossible for someone who just has a spare phone in their closet and a bit of html knowledge looking forward to the unicorn that makes wordpress for ios/android
- jeroenhd 3y agoIt's not exactly hard, you can download web servers from the Play Store. The problem is that you'll need to set up port forwards and such to get traffic to port 8080 or whatever your web server of choice offers. Termux can install nginx, PHP, and various SQL clients, so I'm sure someone can make a copy/paste script that'll set up a WordPress server on your phone.
- quaintdev 3y agoSomeone correct me if I'm wrong but I think this port issue will get solved with the introduction of new SVCB/HTTPS RR record types. Basically the dns server will include port info along with existing IP info in it's response.
- asplake 3y agoWaited a long time for this – didn't know it was on its way, thanks! https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https/ https://datatracker.ietf.org/doc/draft-ietf-dnsop-svcb-https...
- maccard 3y agoIs it? I installed https://play.google.com/store/apps/details?id=com.phlox.simpleserver https://play.google.com/store/apps/details?id=com.phlox.simp..., and https://play.google.com/store/apps/details?id=com.foxdebug.acodefree https://play.google.com/store/apps/details?id=com.foxdebug.a... (the first two apps I found) and had a http server with custom html in all of about 5 minutes.
- passion__desire 3y agoPersonal websites are info only. Don't change that much. Google can and should cache results. Once synced, the website could be behind Cloudflare to avoid DDoS.
- troupe 3y agoIf you are going to use cloudflare, you might as well just host the page with them. Maybe the value of running on your phone would be so people could see that your phone is up or something like that?
- passion__desire 3y agoIt would be textual version of public WhatsApp status ( or stories) connected to your mobile number. For those people who don't mind sharing information with the public.
- p1mrx 3y agoIgnoring the "Cloudflare is centralizing the internet" problem, I wonder if Cloudflare Tunnel / cloudflared could run as an unprivileged Android app?: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/ https://developers.cloudflare.com/cloudflare-one/connections... This might allow a smartphone to host a publicly-accessible website with caching and DDoS protection for free. You'd still have to buy a domain, but https://gen.xyz/number https://gen.xyz/number is $1/year. Though the keepalive traffic would eat your battery, unless cloudflared were integrated with Firebase Cloud Messaging somehow... seems easier to just put content on Neocities.
- quaintdev 3y agoAuthor here. I understand what you are saying but this is not supposed to be full fledged social media kind of websites we want to run on phone. The site could just be a simple way for your loved ones to check up on you without calling or messaging you. I remember the Nokia web server used to share battery and other vital info on website. There are lot many things that can be done with a tiny web server.
- zdragnar 3y ago"Why aren't you answering my calls? I can see you have battery left!" Sorry ma, I was in a meeting. Really, our proclivity for instant gratification over patience is unhealthy. I'm sure there's all sorts of neat ideas for what could go onto a phone's website, but I can't say that I see the appeal, personally.
- adrianmonk 3y agoI assume the intention was more like, "Oh, their battery is at 18%. Maybe I won't download 500 photos from their gallery at just this moment."
- Eumenes 3y agohow about some p2p web server when you go offline, another node picks it up?
- anderspitman 3y agoNot refuting your valid points but just another angle to consider, do all websites need to work all the time? If my family knows they can go to apitman.com to see my latest trip photos, if it's down occasionally that's not going to significantly impact their experience. They can just try again later. That said, when I imagine self hosting from a phone I definitely think the phone + USB drive in a closet approach makes more sense.
- itake 3y agoIt will hurt adoption if people can’t trust the website. In your photo example, my mom, the first time the website wouldn’t work, would demand I just email her the photos from the trip from then on.
- dTal 3y agoWe've had networks composed of unreliable nodes before - indeed, this assumption is baked into some of our oldest protocols, like email and usenet. All that is required is for at least 2 equally unreliable peers to act as temporary caching servers to bring the effective uptime up from 95% to 99.99% (provided everyone's downtime is uncorrelated).
- drdaeman 3y agoHTTP is different than SMTP or NNTP. A phone could work as a nice personal mailhost, if power management issues could be solved.
- dTal 3y agoIt's true, I was imagining some something more sophisticated than HTTP. But I guess the article wasn't.
- TZubiri 3y agoTrue. The SMTP has provisions that account for the host server being powered off, a personal computer was a reasonable host for this protocol. The sending client is supposed to retry if the receiving server is down.
- duskwuff 3y ago> The SMTP has provisions that account for the host server being powered off But it's still built with the expectation that the recipient host will usually be available, and that unavailability is a transient condition -- a failure to contact the recipient SMTP server is a noisy failure, and, after the first few retries, most servers back off to one attempt every 8 hours. Mail servers which are only sporadically available would require some fairly substantial rearchitecture.
- TZubiri 3y agoNope. It was written to account for personal computers to send mail to personal computers, which could be reasonably powered off nightly. The noisy failure is probably not a part of the standard, more likely a recent trend.
- throwaway894345 3y agoHas anyone managed to find a reasonable way to make an old android phone into a server in a reasonably practical/maintainable way? Even if it is plugged in all the time?
- TZubiri 3y agoProposal rejected. Websites run on web server. Phones are not servers.
- enos_feedler 3y agoIts almost like the real reason mobile web servers don’t exist is because its a terrible idea and not because companies secretly don’t want them to
- opportune 3y agoUnless you live in a tunnel, who cares? If you’re hosting a basic portfolio and personal site you don’t even need 2 9’s of reliability
- dieortin 3y agoEveryone being able to check whether you’re in an area without cell reception does not seem like the best of ideas.
- dredmorbius 3y agoThat's already reasonably testable by attempting to call the device via PSTN.
- devnullbrain 3y ago>Phones go into tunnels, run out of battery, and go indoors where there's a poor signal or none at all. i.e. when you can't take a call or a text or read a social media notification. Why does this need to be always-available if those don't?
- andrewmunsell 3y agoBecause you can't predict when someone will try and hit your site?
- bmitc 3y agoWhile less ideal than hosting it on an "always available" service, is that really enough to prevent the ability to do so? Phones are many people's only computers. Why not let them be actual computers since they're powerful enough to be? A typical smartphone is miles ahead of a Raspberry Pi and people do all sorts of things with Raspberry Pis. What about hosting a portfolio or blog on your phone where you can share it with someone in real-time, like a job interview or some presentation or just to show it? Also, I wonder what the actual "downtime" of a smartphone is. I doubt it's that much worse than a lot of websites. The downtime of a smartphone is also usually completely independent of the phone itself, as it's usually service and/or location related.
- devnullbrain 3y agoSo let them fail. It's not that urgent.
- deleted 3y ago[deleted]
- brutal_boi 3y agoI'm on the same boat with this. We already have crappy written apps waking up devices on OEM software, last we need is random agents on the internet waking up our phones.
- __MatrixMan__ 3y agoThat's what IPFS is for. The site might be out of date if the device with the IPNS private key goes into a tunnel for a while, but as long as someone somewhere (ideally several someones) has pinned it and their device is available then it's not "down". We just need a good algorithm for reciprocity-pinning.