Live data from Hacker News

Every phone should be able to run personal websites

rohanrd.xyz

61–70 of 432 posts

Re: Every phone should be able to run personal websites

#62

Earlier quoted context omitted.

I 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 car…

IIRC 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.

Sadly, cell provider puts me behind an IPv4 CGNAT, they didn't even bother to hand out IPv6 addresses at least. I picked them out because they were cheap more than anything, so I only have myself to blame.

I have previously used carriers that did expose (IPv6) addresses, though. Port 25/53/etc were blocked but I could host a web server on there if I wanted to drain the 2GB of mobile data I had at the time.

NAT isn't a problem with IPv6 support. Of course there's the network firewall, but adding a rule to accept ports 1714-1764 isn't that hard.

Right now I've solved the problem with a VPN tunnel, but that's not really that permanent a solution.

Re: Every phone should be able to run personal websites

#63
post #46

Earlier quoted context omitted.

It’s only doing that intermittently when you’re not interacting with the device.

If you’re getting more than a thousand requests a day you’re gonna move to a real web host anyway

It’s less about requests per day and more about my website going down if my phone is in my pocket.

Re: Every phone should be able to run personal websites

#64

Earlier quoted context omitted.

Nobody 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 wh…

I 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.

You 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.

Re: Every phone should be able to run personal websites

#65
post #36

> The reason I think this is needed is because a large percent of Internet users cannot afford hosting personal websites. I sympathize with this, but disagree. There are a lot a great free options for hosting a website. I personally use GitHub Pages, but Netlify, Vercel, and even Glitch offer excellent free tiers. Heck, if you just want to put some words on the web, WordPress.com offers free blog hosting. All of thes…

Why is phone battery going to die? Do a traffic dump and check how many thousands of requests its handling for all your personal data from every app installed.

Because phones have all-day battery life because they turn off the radios as often as possible, sending and receiving data in short bursts. Lingering sockets are shut down for non-system services and push messages are exchanged through dedicated messaging providers with power management planning built in.

It's one of the reasons running standard Linux, or even de-Googled Android, on a normal Android device can absolutely tank your battery life. Waking up the radio is expensive, and packets coming in at random moments means the work put into power saving scheduling goes down the drain.

Re: Every phone should be able to run personal websites

#66

I disagree with this, but it is possible with one of those Linux shell emulators for Android, I forget if I tried it on iOS, but I've managed to do it both via Python and Golang.

Without root access you're not going to be able to use port 80 or port 443 on Android.

I don't think iOS has the same restriction, but I can't find any documentation about it so I'm not sure.

Re: Every phone should be able to run personal websites

#67

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 mobil…

Author 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.

Re: Every phone should be able to run personal websites

#68

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 mobil…

> 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

It'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.

Re: Every phone should be able to run personal websites

#70
You really don't want your phone's radio activating to serve random http requests, most of which are probably going to be bots, and people loading websites really don't want to wait for the latency that would be involved with your phone serving web requests.
Post reply on HN