News for hackers. Stuff that matters.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by kaycebasques on Sunday October 24, 2021 @01:41PM (#28980190)
I'm ashamed that I was so naïve about this, but I was disappointed to realize that hosting a website to the entire public internet on my Pi was non-trivial. Of course once I dug into the idea it was obvious why it was difficult and furthermore that it would be a dangerous thing to do. Just sharing and curious if anyone has done it or knows useful documentation on the topic.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by dividuum on Sunday October 24, 2021 @01:50PM (#28980274)
It sounds like you Pi doesn't have a public IP address. So you need some way to tunnel requests to it. On solution would to be SSH into one of your own public boxes somewhere and use reverse port forwarding (-R). Although that's probably not very reliabile on its own as you have to make sure the connection stays alive. More professional solutions are probably ngrok or cloudflare tunnel. The latter is meant exactly for what you describe: expose a service on a private machine as a public facing web site.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by capableweb on Sunday October 24, 2021 @01:59PM (#28980362)
Port forwarding from your router is another option, redirect all 443/80 traffic from the public interface of the router to your Raspberry, preferably on a separate VLAN and also firewalls on both your router and Raspberry before enabling that.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by patrakov on Monday October 25, 2021 @02:38AM (#28985023)
Some VPNs offer public IPs, too (and from some, even static IPs can be bought). E.g. PureVPN.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by 13415 on Sunday October 24, 2021 @01:47PM (#28980240)
Why was is complicated? I'm hosting https://talumriel.de for my German novels on a Rapberry Pi 3b, using Nginx and Letsencrypt with cryptbot. It's probably not super-secure, but the setup was very easy. I basically just followed one of the tutorials on the Net.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by miyuru on Sunday October 24, 2021 @02:31PM (#28980661)
Just FYI, your server is not reachable with the IPv6 address.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by 13415 on Sunday October 24, 2021 @03:00PM (#28980884)
Thanks. I think it's because of my router.
Re:Setting up a static HTTPS website on your Raspberry Pi us... by oblak on Sunday October 24, 2021 @02:06PM (#28980421)
I've been hosting my application on a 3B+ for years. What makes the Pi different to any other machine that you have on your home network? Assuming you have a static IP, all you have to do is forward ports 80/443 (or whatever) to the right machine/ports.

They're great little machines for this exact purpose. No need to have a full blown PC serving trivial stuff. Only problem is, they use SD cards and eventually. I've had a quality 128GB card in mine that has died/been corrupted about 3 times in 4 years. That's my biggest issue with these amazing little machines

Re:Setting up a static HTTPS website on your Raspberry Pi us... by rain1 on Sunday October 24, 2021 @01:56PM (#28980325)
This guide is just for hosting locally. If you want to host to the outside internet you also need to do port forwarding on your router. So that when someone connects to your outside IP your router relays that to the pi specifically.

It's not super dangerous, just make sure you keep everything updated (your linux OS, your server software). And make sure that you only open the ports you need to.

Re:Setting up a static HTTPS website on your Raspberry Pi us... by chuchichaestli on Sunday October 24, 2021 @05:46PM (#28982235)
Instead of opening ports on your firewall, you could introduce a mesh. I'm using nebula by slack, rest is 90's style with apache /nginx, lego for le dns-challenged certs, and the nebula lighthouse as a proxy. Works fine, is secure and does not bind 443 on your router to.a specific pi.