This review was written and recorded by NosillaCastaway and personal friend of Steve and mine, Ed Tobias. We met him for coffee this week and he showed off his website www.edtobias.com, which was awesome, but how he built it was even cooler!
I want to describe how I used a Raspberry pi as my web server.
First, why did I need a web server to start with? Well, we take a lot of family vacations, and our extended family back home likes to stay in touch while we’re gone and share in our experiences. Originally we just took pictures and shared them via email. Then I started using the Photos app’s sharing feature to share our pictures. As time went on I also started a journal of our travels and wanted to share that as well.
It finally occurred to me that writing a travel blog seemed the easy solution for sharing both the journal and photos with family members. It also served as sort of a memory book for those of us that were on the vacation – years later we could go back and remember the fun we had during a previous adventure. So to create a travel blog I would have to have a web page. I have written web pages before so I was somewhat familiar with writing the html.
I didn’t want to pay for a web service however, so I created a web server on my iMac and registered a domain with Hover. I used the MAMP web server construct (Mac, Apache, MySQL, and PHP) I think Allison has talked about that in the past. I could have also added WordPress to this mix, but I wanted to do it on my own from scratch.
It took a little doing, but I finally got my web server up and running – and I was quite proud of it. Then I started thinking – What would happen if my server got compromised? I learned how to set up a secure web site using https, but I still wasn’t all that comfortable with running the server connected to the outside world on the same machine that I do my banking.
I wanted to move my server to separate machine, but didn’t want to by a mac just for that one small job – enter the Raspberry pi.
Also famous as a delicious dessert, this Raspberry pi is a small circuit board about the size of a deck of playing cards. It costs $35 and contains a powerful CPU, four USB ports, bluetooth, wifi, a HDMI output, and is powered by a micro USB plug that you could connect to any charger strong enough to charge an iPad.
It was created long ago as an educational tool for kids – It also has a general purpose I/O port so it can be programmed to drive servos for building a robot army that you’ve always wanted.
It runs on a version of Linux called Raspbian. I have connected it up to a TV via the HDMI and plugged in a mouse, keyboard and external hard drive. The operating system even comes with a very useable office suite as well which is pretty powerful. It really is like a $35 Mac mini.
It seemed the perfect solution to my cheap web server needs. Unfortunately no one has come up with “RAMP” package for Raspbian for use as a web server construct, so I had to install Apache, MySQL, and PHP separately – but there is lots of help on the web and it wasn’t particularly difficult. When I initially got it running, I used a USB thumb drive to store all the server software, the OS, and my web pages, photos and videos. It worked fairly well but was a little glitchy on serving up the videos, so I switched it out for a old SSD that I plugged into a drive toaster I had lying around.
So now I have my own web server and it is isolated from my personal data and it is inexpensive. And if it gets hacked or damaged, I can just throw it away and buy a new one, after all it’s only $35. I want to thank Bart and Allison for the Programming by Stealth series – that has really helped me improve my family web site.
There are so many other things you can do with the Raspberry Pi and I encourage you to find out more about them at their web site at raspberrypi.org.