1

I just got a RPi as a gift and I was thinking of hosting a personal website with pictures/videos. I want to use my internet connection at home to allow access to my website creating a personal server.

  1. Is it worth it to host a website using a RPi?
  2. If so, is the RPi enough to host a web site/application with multiple pictures and videos?
  3. How much can the RPi handle before I would need to get a different server?

3 Answers 3

1
  1. Yes. It's even cheaper that shared hosting. It will cost you more time to setup, and maintain though. But you might consider that a learning experience.
  2. HD-video might be pushing it a bit, but normal images and other static files won't be a problem. But your uplink speed at home might also be to low to do HD video.
  3. Just a wild guess; 100 requests per second will be fine. But it might even be 1000 of 10000 before things start to break down.

Web servers don't need a lot of horsepower. Mostly it's disk-access that limits a webserver. And more memory will be needed if it's supposed to handle a lot of requests simultaneously.

2
  • Thanks for your reply! Do you know of a good tutorial that I could follow to setup a rails server on my RPi? I googled and found this one (elinux.org/RPi_Ruby_on_Rails) but it seems to be 2013. Is there a more current one or would this be fine.
    – stcho
    Jun 9, 2014 at 10:04
  • Better post that as a new question. Though the instructions also tell you that rasbian already has pre-compiled packages for Ruby on Rails. Just run sudo apt-get install ruby
    – Gerben
    Jun 9, 2014 at 12:30
0
  1. A Pi isn't a powerful web server, but many personal sites don't get that much traffic. A Pi can be viable as a home server

  2. I haven't tried serving video from a Pi server, but I suspect that would be quite slow, and you wouldn't be able to stream video to many people simultaneously. You might be better off uploading images to imgur, upload your videos to Youtube, and embed them in pages on your site. This will massively increase the amount of traffic your server can handle.

  3. If your site is made from static HTML pages you might be able to serve around 100 pages per second (based on these tests). If your site is built using a large CMS like Wordpress, your Pi will struggle to serve one page in around 6 seconds. If you use Wordpress, you can improve page load time using caching plugins, but it will still be much slower than using static HTML pages. You could use a CMS that generates static HTML files like Pyplate. Or you could use a Javascript solution like Ghost.

2
  • Thanks for your reply! Do you know of a good tutorial that I could follow to setup a rails server on my RPi? I googled and found this one (elinux.org/RPi_Ruby_on_Rails) but it seems to be 2013. Is there a more current one or would this be fine.
    – stcho
    Jun 9, 2014 at 10:05
  • I host a website using a RPi 3, and wrote about how I set it up in my blog. If you rent a Virtual Private Server (VPS), you often only get 1 single core CPU, while RPi has 4-core, with proper planning and tuning, it actually not worst than a VPS.
    – hcheung
    Mar 2, 2018 at 10:27
0

What I do is buy multiple rPi3s and use HaProxy to load balance the traffic between them in my cluster. This serves as an extremely cost-effective way to horizontally scale your webservers.

Furthermore, since RPis are limited to 100mbps ethernet since they run through the internal USB 2.0 controller that maxes out at 480mbps, I recommend buying a USB3.0 to gigabit ethernet adapter. Since USB3.0 is backward compatible with USB 2.0, it will be able to deliver gigabit speeds rate limited to the USB2.0 controller which is theoretically 480mbps but realistically 300-340mbps. Still, a 7 dollar adapter can triple your bandwidth.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.