Building the Raspberry Pi Server

Intro

There are many tutorials online. I know because I’ve read through a few dozen and watched another few dozen videos on YouTube while setting up my Pi. That is also because I was (and still am) a beginner in Linux and was setting the Pi up from a computer running Pop! OS (a Linux distro – more on that in a future post). As the Pi itself is also running Linux, a lot of the instructions on the tutorials assume that you have some knowledge of how Linux works.

On the other end of the spectrum, the easy-to-follow tutorials for beginners gave me the codes directly to input into the terminal. However, these tutorials often have a singular purpose and take you from a brand new Pi to completing that one application install. Going through the install I would later find out that what I was trying to do or install conflicts with my configuration. For example, the application I was installing requires the same port as another application that I have already installed. Having the codes directly was great, but at the same time, if I run into an issue, I would like some hints on how things worked so I can know where to look to troubleshoot and fix the issue.

My approach in this tutorial is to take you to from a brand new Pi to the exact same configuration of my Pi. Every component after getting set up is optional, but more importantly, compatible. I will also define the technologies in basic terms, and assume you came from 1995. If there are terminologies above that have already lost you, don’t worry and read on because I will introduce them later on. If you are comfortable with computers, you may skip the parts labeled “optional read” but if you do and run into issues, those should be the first places to start when troubleshooting.

A tutorial with such scope will take some time to write, and more effort to upkeep as versions change. I will do my best to keep all information as up-to-date as I can or as necessary.

What you will end up with at the end of this tutorial is a Pi running:

  • LAMP (Linux – specifically Raspberry Pi OS, Apache, MariaDB, PHP)
  • Pi-Hole
  • Homebridge
  • PiVPN with WireGuard
  • WordPress
  • Kodi

This should be more than enough to keep one Pi busy and after this tutorial, you should be somewhat comfortable to venture on other Pi projects on your own.

Finally, a word of advice and to manage your expectations: the Pi is a server for hobbyists and a tool for learning purposes. It should be able to handle 25-100 concurrent visitors, depending on how large your web pages are but you should not use it to serve your website if you are selling goods and/or providing a service. Your customers expect and deserve a fast connection and 100% server up-time. A home server with a residential Internet connection and no redundancy is simply not a good way to conduct business. Don’t just take my word for it. Google “website speed revenue”.