What is the purpose of having your own server?
This is one of the projects I have dedicated more time and what taught me the most. It is ultimately what started everything and led me to always keep learning. Having my own servers has allowed me to have hands-on experience on a lot of things and be able to understand how they work more in depth.
It started with a little Raspberry PI 4B, at first I used it as a regular computer, then I started learning to use the command line and started seeing what other people did with them and how much you could do without any user interface, just the command line.
That was when I learned how useful is having a small server working 24/7. I proceeded to erase the microSD card and went through the process of install a headless operating system, in this case Debian Linux. Then I learned how docker works and how easy and fast it was to install almost anything on it and I was hooked. Every time I found something that could be useful for me I had to try it. Some of the services I have used in my servers have been:
- Authelia - For authentification to all my services.
- Plex - Media server.
- Vaultwarden - Password Manager.
- Outline - Documentation and project collaboration.
- Calibre-Web - Book Library.
- Portainer - Web UI for docker container management.
- AdGuard Home - DNS filtering for ads filtering.
- Wireguard - VPN to connect back to my house and access the server remotely.
- Homebridge - To make smart devices compatible with Apple’s Homekit app.
- Home Assistant - To control and automate smart devices from a dashboard.
- Among a lot of other things I wanted to try but I only used them temporarily.
How I access the server from the internet?
With all those containers already setup I still needed one thing, an easier way of accessing everything from whenever I went in a secure way. My first option was the Wireguard VPN but I meant that I needed to have the VPN client installed in every one of my devices and that is not always possible, for example if I wanted to access a movie on my server from a chromecast in a hotel, that just wasn’t possible. That’s when I started to learn how domains and SSL certificates work, how I could buy a domain (rent it really) and setup a reverse proxy on my server to make my applications accessible through that domain securely with SSL certificates. It took a lot of hours of learning but in a few days I had my server how I wanted it and had access to it from anywhere with my own domain name.
Server Architecture
Throughout the years my home lab has evolved greatly, what started with a single Raspberry Pi became two or three and now is composed of the following:
- Two ARM based cloud VPS for the things I need on all the time.
- Two Raspberry Pi 4B active in two different locations and an extra one as a backup.
- Two Raspberry Pi Zero for testing and lightweight programs.
You can see part of my server infrastructure in the following diagram: