Raspberry Pi as a Web Server

Hi! I have just received a Raspberry Pi 3 as a very belated Christmas gift and was wondering if any of you have used one as a web server. I have previously used pay-per-use remote servers to host my personal website (I'm a CSC Student so I basically just use my site as a splash page / basic resume) and was wondering If I could save a few dollars by just hosting it on my Raspberry Pi. That said, I figured that I should ask around and see if anyone else is doing this and if its even worth my time.

P.S I'm relatively new to linux, and have never used a Raspberry Pi (if it wasn't already obvious) so if this is an atrocious idea I apologize.Please feel free to suggest projects or other uses for the pi as well!

Thanks in advance!

They are nice to use for internal web services (Nextcloud, TTRSS, Wallabag etc) But I would be hesitant to have it open to the outside internet for security reasons.

But .tk domains are free and lets encrypt gives free TLS/SSL certs. So it isn't too hard to do.

Pi's run Apache and NGNX just fine.

http://www.dot.tk/en/index.html?lang=en

5 Likes

A Raspberry pi is not a powerful machine. So for external hosting, I wouldn't use a Pi. But for development or testing some website concepts without ruining or bloating your public web server you can definitely use a Pi!

https://www.raspberrypi.org/learning/lamp-web-server-with-wordpress/

You can leave the WordPress part above, but it is a basic web server.

yes a PI will make a lovely web host - just don't try and do too much with it as it's processing is limited and Heavy DB writes will kill SD cards - but from my experience, the power/speed is about the same as a low end shared web hosting platform.

The Pi can do what you want, since you're personal site is not meant to have end users, and thus not many concurrent connections it will be able to host your website just as well as any hosting site with the same internet connection as you. If you think about it apache is never going to max out on the pi if you have a maximum of a handful of people viewing your page at the same time, and the internet is the real bottleneck here for your intended end use IMO.
So as long as you think your internet is good enough (upload speed more important than down in this case) and (more importantly) you have taken into consideration the security risks of hosting a server from your personal IP (and home network [which can be avoided if your willing to put more time and money into it]); then I say this is the perfect solution for you.
It will further your introduction into linux, as well as some other levels of technology that full stack developers (and CS students) need to know, and it will probably handle your needs without hitting your wallet as hard.

gLhf

4 Likes

Thanks a tonne! Had no idea .tk domains were free and I will definitely need to look into SSL as well. Security is definitely a priority for me and I've been looking around to try and find a good intro to web security and encryption.Thankfully, the site you've linked looks like a good place for me to start :)

1 Like

I did not know about the letsencrypt software. Thanks for showing me that!

Just remember once you open port 443 even with TLS people may find the site and sniff yout ports. Make sure you network is secure before you proceed.

3 Likes

Recently came across this and thought of OP

https://www.pidramble.com/


4 Likes

Pi 3 works fine with Apache, just keep it secure brah!

1 Like

Amazon Web Services has a free Tier where they have some stuff for free for a year after signup. They have a small linux vps instance that is plenty powerfull enough for your project.

AWS introduces some complexity (since it's very much the cloud) but that is manageable. You can use your Pi3 as local testserver if you like.

When you say this, do you mean they could pivot from the Pi and start sniffing ports of other devices on your NAT? Or just sniffing other open ports on the Pi's IP?

It works, and hosting a small static website doesn't take up a whole lot of resources. Get more than a handful of connections and it'll go to shit though. I'd honestly use something else. Old Server blades can be had on the cheap for $300 or so dollars.

Isn't Get.tech offering free domains for students (people with a .edu email...)? (Link here: http://get.tech/students/)