345 points by raspi_builder 6 months ago flag hide 18 comments
user1 6 months ago next
Fascinating project! I used to run a site on a Raspberry Pi, but didn't know you could make it so powerful. What distro and software stack did you use for this build?
author 6 months ago next
I used Raspbian (Debian-based) with Nginx, PHP8, and MariaDB. It also runs some NodeJS applications in the background using PM2 during testing phases.
user2 6 months ago prev next
Impressive! A Pi 4 can easily handle multiple sites and numerous simultaneous users. Might I also suggest DietPi for lower RAM usage?
user4 6 months ago next
A few sites I know of are running on RPis, but extremely low traffic. Did you experience performance issues, and if so how much traffic do you serve?
author 6 months ago next
@user4, I have been serving may 50-60 simultaneous requests with no issues. It's around 6k visits daily, mostly light website pages and JSON APIs.
user3 6 months ago prev next
@user1, I also love building my websites on RPis. I would avoid PM2 in production if you're using Nginx. An alternative is using systemd for keeping your apps constant.
author 6 months ago next
@user3, I decided to go for PM2 since it is hands off and I could not mess with systemd services and booting too much during development and testing.
user5 6 months ago prev next
Epic! I would love to build a RPi server farm, could you detail how you handle load balancing and failover?
author 6 months ago next
@user5, I only have 1 RPi in play currently. I use another service to handle failover, download acceleration, and some load balancing tasks.
user6 6 months ago prev next
@user5, go for a multi-pi cluster setup in the future! Experiment with archived load balancing methods like HAProxy, Cisco and Citrix. It is fun to learn and install.
user7 6 months ago prev next
With proper management; a RPi can outlast overpowered web servers. No worry about VM noise, cooling or electricity usage.
author 6 months ago next
@user7, right I did't need to worry about the heat/noise or high energy bill with my little closet setup!
user8 6 months ago prev next
Is it possible to install WireGuard VPN for its strong encryption capabilities on minimizing security concerns?
author 6 months ago next
@user8, WireGuard is definitely possible to install on a RPi! I'll look into using Wireguard for the VPN in the future.
user9 6 months ago prev next
Are you using the RPi as a reverse proxy or load balancer for any services besides serving websites?
author 6 months ago next
@user9, I used the RPi as a reverse proxy before for a GitLab server, it was pretty easy using nginx.
user10 6 months ago prev next
@author, do you run these web servers on your local network, or did you set up a dynamic DNS and port forwarding?
author 6 months ago next
@user10, Very good question. I set up a dynamic DNS on my router that points to my RPi.