Raspberry Pi 4 server

Some may have noticed that my site was down for most of the day yesterday. This is because I was migrating my web site over to a new server. Originally, my web server was an old desktop HP that I repurposed for use as a web server by installing Ubuntu 18.04 LTS server edition. It came with an energy star compliant 240 watt power supply, but even at its most energy efficient, it cannot come close to the 3.5A 5 volt power supply for the Pi 4 which, with a maximum input current of 0.8 amps at 120 volts, won’t use more than 96 watts. Not to mention that the Pi 4, when running headless, takes up virtually no space at all. With 4GB of RAM and USB 3 support, I believe the Pi 4 is perfectly suitable for this task. Then there’s the fact that the HP is over a decade old, raising concerns about long term reliability with it being left on 24/7.

The old server

One of the biggest advantages I see with the Pi 4, besides the savings in power consumption and in the space it occupies, is the fact that any point of failure is easily mitigated. If the power supply fails, a new one can be bought anywhere. If anything fails on the main board, I simply plug the MicroSD card into a new board. If the SD card fails, I simply flash a new MicroSD card and things are up and running again. It’s all very low cost and easy to maintain. These are early days for me with the Raspberry Pi. It’s still plugged into the big UPS that the old desktop server was plugged into, but there are Pi-specific UPS power supplies which I would like to explore in the future, which may include making my server completely solar powered.

The new server

In case you’re interested, my Pi kit came with heat sinks and a cooling fan, and before I turned it into a server, I played around with the full Raspbian desktop with the recommended software, and can attest to the fact that this brings to the modern day the golden age that many of us enjoyed in the 1980’s when minimalist, inexpensive, and surprisingly powerful single board computers were meant for the end consumer to develop on. I loaded a 32GB card with Raspbian Buster Lite which weighed in at a mere 435MB, then installed the LAMP stack before migrating my web site files and database over from my old server using FTP and FileZilla. It’s all pretty basic for now and I’ve yet to install NextCloud (that’s today’s project), but from what I can tell, the Raspberry Pi 4 is the perfect personal web server for anyone wishing to liberate themselves from the centralized and oppressive big tech companies.

3 Replies to “Raspberry Pi 4 server”

  1. Cool to read! Make me curios to one day try myself for my site (won’t happen any day soon, but I put it on the list of interesting ideas)!
    You mentioned NextCloud – is that a separate project, not directly related to the web site (more than as a backup of the site), or?
    Also wondering, do you really need UPS for the site? I mean, isn’t power failure very rare? Or would the site not restart itself after power failure, I’m curious? Sure, UPS is better to have than not, but it’s a cost or another device that can be broken.
    Thanks for this inspiring post!

  2. Henrik, thanks for stopping by and leaving a comment! NextCloud is like Dropbox or Google drive, except it runs on my server. It’s so much more than Dropbox or Google drive; there are plugins that add all kinds of functionality, from federated social media to calendaring and even a phone tracking tool. I installed it as a subdomain on my old server at cloud.pquirk.com, but on the new server space is limited, so I plan on adding a traditional hard disk just for NextCloud. I really should write about it in a post, it really is fantastic, enterprise grade software.

    The purpose for a UPS is to prevent corruption of the system files. If my server is not shut down properly, it’s possible that the system files will become corrupt, and in the event of a power failure, the microSD card itself could be damaged. This happened to me in the early days of setting up the old HP desktop PC as a server. There are inexpensive UPS solutions for the Pi, which are able to communicate the battery status to the Pi so that it can safely shut itself down if the battery gets too low, but for now I have an ordinary UPS from the old server. With a big enough battery, I could potentially run my server from a solar panel.

Leave a Reply

Your email address will not be published. Required fields are marked *