by ocius · 3y ago · 0 comments
Regarding security: you might want to have a look at cloudflared. This is a (free for small projects) service by Cloudflare where your server (Raspberry Pi) connects to cloudflare, and all HTTP traffic is proxied through Cloudflare. This has multiple advantages:
- you don't need to open a port on your router that forwards to your Pi, which is good for security and simplicity (some routers don't even have this option)
- you get all the cloudflare protection with the click of a button, including HTTPS with automatic Cloudflare certificates, DDoS protection, etc
- you don't need DynDNS to point to your dynamically changing IP
I think people self-host with their ISP to get away from centralized choke-points such as Cloudflare. Unless you're fine with having Cloudflare have yet-another-datapoint.
Your home web server can establish a VPN connection to the public IP of your VPS, meaning you still don't need to worry about dynamic addresses changing or opening ports on your router. This is essentially what a Cloudflare tunnel is.
Granted a VPS isn't usually free. But some places like Oracle Cloud do offer free-tier compute, as well as fly.io.
So with your statement, "I still don't want to trust a VPS provider", is this more about having your secrets or file contents leaked? Because even in your design, if the VM is compromised, then so are your users. At some level you still have to trust that the provider isn't malicious or vulnerable.
I would still consider it very nice of them to offer this free service that let's you break free from your dynamic IP, crappy router and at the same time giving you protection that you couldn't set up yourself.
I think many people just want to be able to make their device available from the internet - this type of liberty is not really important for many people.
I've had a previous RPI SD card get corrupted this way and I've been hesitant to do anything useful with home-hosting on one since I had that problem.
Corruption has always been an issue with using standard SD cards as a boot system. It's just something these cards were never meant to do. I run multiple Pis at home, one of them as a scraper/site hosting/MariaDB/Wireguard. Power outages would almost always corrupt the file system, and a few times, damage the SD card. Once I switched to high endurance cards, I haven't had a problem.
Sorry I don’t know that I’m being helpful here. I had the same issue and just ended up with an ups - but I also ended up plugging my networking rack into it (router, cable modem, switch, nas) as well. We’ve only had one real outage since I set this up, but it kept my network alive for 90 minutes or so and then the power came back up.
There are some gotchas - everything you write after that goes to a tmpfs. Meaning it starts cutting into your available RAM. So this overlay is only really useful if you are using the high-memory variants like the 4GB/8GB RPI4. With the 1GB Pi variants, this gets painful.
Alternatively, You could setup a cron job to reboot every night thus clearing the tmpfs.
Do remember to disable the overlay (and make /boot rw) every few weeks to apply updates.
Also test your backups.
1: https://forums.raspberrypi.com/viewtopic.php?f=63&t=253104&p...
You aren't tied to Cloudflare in the sense that there are other CDN services to choose from, each with their own pros and cons. With the servers on your own infrastructure you can choose the provider you like and easily switch between them. I also have ports forwarded for services that I don't want to proxy.
( Your ISP should give you at least a /56 : https://www.ripe.net/publications/docs/ripe-690 )
Even funnier that you think you'd even be accessible if you put your website on IPv6 only
I guess this depends a LOT your ISP, and especially the router they gave you, how much IPv6-only friendly are they ?
Yes, you can buy your own router, but this come with even more complications and potentially negotiations with the ISP.
If you’re wiping it and installing Linux it’s like any other server, but if you’re running macOS you’re open to a wider spectrum of vulnerabilities that wouldn’t normally apply (desktop software). Your apps could also have vulnerabilities that expose access to personal credentials, etc (e.g. filesystems, apple id) depending on your setup.
You can insulate yourself a bit with tunnels/proxies to expose specific services (e.g. cloudflare, ngrok).
I had a lot more peace of mind buying an old, cheap computer, raspberry pis, and eventually NUCs.