How I built this website on a Raspberry Pi
15 comments
·January 15, 2025rainonmoon
This is a wonderful project and an even more wonderful write-up, I wish I came across more in this tone! I'll just add to anyone following in these footsteps: be careful what type of website you host on your Pi. Self-hosting is great, but if you expose services on your home network to the internet, expect people to try to hack you. What type of site you host will either make this very hard or very easy. The difference between compromising a VPS and compromising your home web server is now they have access to your actual LAN. Cloudflare has a pretty good WAF on the free tier, look at it as another learning opportunity.
samsquire
I would like to benefit from big tech's security teams by hosting web forms and those various different kinds of site you suggest behind them and their teams! WAF + captchas + defence against bots I would rather not do the server handholding and hardening myself.
beeflet
I find that ufw is a pretty simple firewall interface for linux.
rainonmoon
UFW is great at what it does, but it's not going to save you from web application attacks.
tracker1
Curious how well Caddy would run on an RPi. Not sure if it would come out ahead of Apache in practice. It's been my goto choice for a few years.
Hamuko
I'm running a small Caddy + Rust (Actix Web) service on my Raspberry Pi 2B. Not the snappiest service ever but usable. Part of the slowness might also be the fact that it's online using Cloudflare Tunnels.
hsshhshshjk
Thank you, this is a wonderful step by step. Saved for the next time I get a chance to sit down and fiddle. Cheers!
null
xyst
Already hugged to death, rip
reader9274
It was 2am when you checked, and as mentioned in the article the Pi was rebooting after an update :)
onli
Loads fine for me, even very fast - maybe it is fixed?
yustreparting
[dead]
side note: why hide the ip, 50.221.225.238 and the google tag?