Now here’s a technology that I’ve been heavily looking into the past few weeks/months/years. It’s not necessarily a new tech, but it’s something that has started to gain a little bit of traction, at least from what I can tell. I can’t really, or want to, pin down a time where the home server started to become a subject people started to think about more and making services for home servers/labs. I will say though, that the introduction of the Raspberry Pi to the market really catapulted this idea into the mainstream, or at least the more tech based mainstream. You probably have heard of it, especially if you are on a Computer Science capstone blog, but in case you haven’t, the Raspberry Pi is a single board computer that can be used to learn programming and have some practical uses, from monitoring internet speeds to hosting a file server. The uses for the Raspberry Pi are lengthy but one of the things many people use it for is for home servers.
While the first iterations of the Raspberry Pi weren’t that powerful (if I remember correctly, generally having less than 1GB of RAM), the newest Raspberry Pi 4 has RAM from 1GB to 8GB which means it can host a lot more. I don’t want to make this post only about the Pi, but you can see how this is such an incredible tool that many people use because of the power consumption (which is incredibly low) and small form factor. The biggest use of the Raspberry Pi that I have seen is definitely in what’s called a Pi-Hole. Pi-Hole is a network ad-blocking system which is insanely useful to have. If you have other people in your house and they aren’t necessarily tech literate or don’t want to spend the time adding an ad-blocker to their browser, then this is an easy fix. It allows people to browse the internet with minimal to no ads as well as saves bandwidth on the internet because you’re browser won’t start to even load the ads in the first place! It’s amazing that people were able to develop something like this and it technically can cost less than $100 total (not including power over months). But let’s look more at home servers in general.
Home servers can really be run on any computer. Take an old laptop that you have, that can be a server, albeit not the greatest, and you can start to use it for your needs, which I will get into soon. But the more common ways to have a server are either through an old desktop (which is what I have), buying a used server that’s in desktop form, or (probably the best, but can be expensive) is having a server rack. There are pros and cons to each, but I feel like having a server rack may be excessive for some people’s use cases thus an old desktop or a used server would be the way to go in my opinion.
Now, what do you want to do with that server? Well there’s a LOT you can do. Let’s start at the practical uses. You can have a file storage system, you can have a media server where you put your downloaded videos/music/photos on for use on a TV or other computer. You could also use it for hosting your personal wiki or even to develop code on. Take a look at this GitHub repo. It has a huge list of different free self-hosting network services and web applications that you can put on your server. Generally you would host your services on a Linux OS as many services may not work well on Windows or simply because you have to buy a license, while with Linux, the OS images are free and plentiful. Of course there are different ways of hosting (container services or just normal hosting on the computer) but in reality you can do whatever works best for your hardware and what you are willing to learn. In my opinion, Docker is the best current one as it allows you to have containers of the services and easily stop/run/restart them. I’m still learning about Docker, but personally its one of the better ways of hosting services
Now the only big question remaining about hosting is how to access the server and applications within the server. Every server has an IP address and you can easily access the apps within the server with a port that the application is using. For example, Portainer, a service to help with managing your Docker containers, uses the port 9000 so if you had a server running with Portainer all you would need to access the Portainer web GUI is <Server’s IP Address>:9000 in the address bar and bam you have reached the site. But say you want to access the server by typing in a name instead of only numbers, well then its gets a little bit trickier. You first would need to have a domain name (at least I think, but is how I will be setting it up myself) and then set up a reverse proxy in order to access those sites with subdomains (www. or wiki. are examples of subdomains). Now this is the part that I’m still a bit hazy on, but I just know that reverse proxies are important to accessing servers and their applications. Lastly, in regards to accessing the server/apps on it, is the question of do you want to access it outside of your home internet? Generally the answer may be sure, but also do keep in mind that it will expose your network to malicious attackers so you would have to use multiple safeguards through firewalls, fail2ban, or other ways to ensure that attackers do not get ways to your network. Another favorite option is using a VPN in order to access your sites/files which is also a secure way but you have to look at your needs and really see if you would like to and need to expose your apps to the wider internet.
And that concludes my little talk about home servers. There’s a lot of other things I could mention like which OS to use, VMs vs Containers, etc. but that would make the post too long since there is so much about home servers that you should know before delving into actually creating one for yourself. But if you do decide you want to have some sort of home server, I’d recommend reading a lot about how to secure your server and your network and just general knowledge things about servers like types of storage, what you would want to host, how to host and so on. There are so many resources out there that will clear up anything you have! So got out and enjoy the world of home servers, if you want to of course!