6 ms·
I can recommend the Rasperry Pi for self-hosting, if you pick one of the more recent models with more RAM (3 or 4 with 4GB of RAM at least). You just need to ke
by ocius 4y ago
I can recommend the Rasperry Pi for self-hosting, if you pick one of the more recent models with more RAM (3 or 4 with 4GB of RAM at least). You just need to keep in mind that the availability of your website is not quite as good as if you were hosting in a datacenter.
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
- tomekw 4y agoThanks. Fortunately I've a static IP.
- BlueTemplar 4y agoUsing a different IP than your home network might be a good idea ? ( Your ISP should give you at least a /56 : https://www.ripe.net/publications/docs/ripe-690 https://www.ripe.net/publications/docs/ripe-690 )
- aliqot 4y agoIt'd be helpful for others if you clarified whether you're asking a question or making a statement.
- BlueTemplar 4y agoLet's say that I am considering this too, have looked a bit into it, but I am not a network engineer, and haven't done it yet, so I am not sure how good that advice is ? 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.
- aliqot 4y agoI'm starting to notice you end statements with question marks, which solves my previous question.
- officialjunk 4y agoi concur it is unclear and hard to understand the intention.
- BlueTemplar 4y agoWhat is unclear about question marks indicating uncertainty, especially after I explained it ? (And to be extra clear, this question mark indicates a question, albeit a rhetorical one.)
- ilyt 4y agoFunny man thinking ISPs everywhere just give IPv6 willy-nilly. Even funnier that you think you'd even be accessible if you put your website on IPv6 only
- vel0city 4y agoI have a few personal things hosted on IPv6-only just for giggles. A few years ago those things would almost never be reachable. Now I can reach them at most places. I at least have IPv6 on cellular connectivity all the time.
- BlueTemplar 4y agoBefore long, not supporting IPv6 will make your website more unreachable than not supporting IPv4. (Already the case in Asia ?)
- WhiteBlueSkies 4y agoAren't there obvious dangers for example if I use my Macbook and host it a server?
- RossM 4y agoI did this for a bit. The main issue was that air intake on my older model was through the keyboard, so clamshell mode was inadvisable - not sure if that’s true of the newer models and M1 should run cooler. 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.
- rzzzt 4y agoConstantly keeping the battery at 100% can be an issue, but modern versions of macOS allow you to limit charging. There are also utilities that work on older OS versions (they just issue an SMC command to achieve the same thing), like this one: https://github.com/zackelia/bclm https://github.com/zackelia/bclm
- spansoa 4y ago> You might want to have a look at cloudflared 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.
- ocius 4y agoGood point. You are not dependent on Cloudflare, though, you can use other similar services or open the port on your router if it supports it. And if you pay for it, you can get an SLA so that they can't mess with you by terminating your project. 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.
- Hamuko 4y agoI'd rather have someone DDoS Cloudflare than my home IP. Or just host somewhere that is not my home without Cloudflare.
- seanw444 4y agoYeah for small services like game servers for my friends and I, I'll host on my home IP. But for large websites and services... no thanks.
- treesknees 4y agoAnother option is to use a VPS + nginx + a wireguard VPN. 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.
- feet 4y ago
- ocius 4y agoDepending on your write load, the SD card could become a problem, but you could mount a USB SSD. You can even boot from a USB SSD now (https://www.makeuseof.com/how-to-boot-raspberry-pi-ssd-permanent-storage/ https://www.makeuseof.com/how-to-boot-raspberry-pi-ssd-perma...)
- ls15 4y agoOr use tmpfs for things that get written, but actually don't need to be persisted.
- blacksmith_tb 4y agoThese days 'overlayfs' I think[1], though if you're running nginx on there to serve a site/app you might want logs? 1: https://forums.raspberrypi.com/viewtopic.php?f=63&t=253104&p=1549229#p1549117 https://forums.raspberrypi.com/viewtopic.php?f=63&t=253104&p...
- revicon 4y agoAnyone know what the best practice is to guard against corruption on your SD card or your SSD if your home power goes out and your Raspberry Pi power-cycles unexpectedly (outside of just getting a UPS?) 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.
- dicriseg 4y agoThe only things I can think of do involve a ups. There are battery banks that support pass through charging but I’m not sure if you’re supposed to use that constantly. A low capacity power strip style ups seems like the next best. Or don’t use a pi at all - if you have an old laptop that you don’t use, that could be the server and it has its own built in ups. 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.
- digitallyfree 4y agoI run much heavier networking equipment (enterprise routing/switching + rack server) but I also host at home using cloudflared on a slow DSL connection. It works very well and the CDN's caching helps with my low upstream bandwidth. 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.