In recent time, I went through the process of completely revamping my home-lab from scratch. I ditched the old Dell PowerEdge R720xd and settled for an R720 just because I didn’t need all those 2.5 inch drive slots that the R720xd had to offer.
I also, with the help of my father, managed to pull an ethernet cable across the house – from my router to my server. This way I now get a nice speed of 900mbps
Now here is where the fun part comes in.
IT Mode Crossflashing
I started off with having to flash my new perc card to IT mode. Already getting thrown into the deep end. This process took me several tries because in the first two attempts I ignored the instruction to ‘remove the raid battery’ from the perc card in the tutorial I was following.
Even after following the tutorial correctly, it took me multiple tries before it finally decided to work. I never changed my process in these attempts, it just worked eventually so I refuse to touch it any further.
This took me about two days. After this, I set up Proxmox booting off a 3TB HDD.
Setting up remote access
Since I’d want to spend time here and there whilst I’m away at school working on my home-lab projects, I started off my setting up my pfSense VM. This way all VMs I’d make from there on could be put on my pfSense network, and I could set up an OpenVPN server on pfSense to remotely access my Proxmox from anywhere when I feel the need to carry on with my projects.
One big long-lasting issue I came across was that my laptop and phone would randomly disconnect from my OpenVPN server. I started off convinced that the school Wi-Fi had somehow managed to block me from using OpenVPN to remote into my home network and access my home-lab, but it turned out to be a setting in the configuration. Apparently there are two separate settings for concurrent connections to the VPN server. One is how many concurrent connections to allow, and another is how many concurrent connections to allow from the same user. Unfortunately I had only configured concurrent connections overall, and not those from the same user, so whenever I’d turn on my laptop in school my VPN would go ham because there were two concurrent connections from the same user.
That part took me about a week to figure out because I was so convinced that it was the school Wi-Fi, having only experienced the issue whilst I was in school because that’s where I use my laptop. Before finding the actual fix, I even changed my subnet from 10.1.1.0/24 to 10.1.7.0/24 thinking that conflicting subnets with the school’s may be an issue (it was a stupid blog post I read online and I decided to give it a try). At the end of the day, I made the change in the configuration and have not had issues since.
My pfSense now runs stable on 2 CPUs, with 4GB of RAM and a 32GB boot disk size.
MySQL
I decided that this time, instead of having a MySQL host for each app I host, I will have one database host to manage all of my databases on. What I mean by this is that, before I made this restart in my home-lab, I used to have docker containers from stacks like ‘wordpress-wordpress’, accompanied with ‘wordpress-db’, and I’d also have a separate database host for my pterodactyl panel. This time I decided to make a separate Proxmox VM dedicated to MySQL. This way I can have all my databases in one spot.
This came with huge advantages.
- I no longer had to make loads of separate SQL databases.
- and best of all, I could use HeidiSQL to access all my databases within one spot with ease.
I run this VM with the same allocated hardware as pfSense, that being on 2 CPUs, with 4GB of RAM and a 32GB boot disk size. Looking at how the usage has been so far, I would likely be able to lower this to 1 CPU, but I will not for now just because I still have a lot of spare logical processors and don’t feel the need to.
Docker
As I had done before, I made a Proxmox VM on which I primarily run docker. This way I host all my lightweight apps in quick succession. With docker, I can just find a container with the app I want, and deploy it immediately.
I installed docker through a couple of quick commands, and then immediately deployed Portainer through another quick command.
The commands; these can be copy and pasted into ubuntu from a fresh VM creation and it will get you Docker with Portainer installed.
sudo apt update
sudo apt install docker.io
sudo systemctl enable docker
sudo systemctl start docker
Paste this all at once:
sudo docker run -d \
--name="portainer" \
--restart on-failure \
-p 9000:9000 \
-p 8000:8000 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v portainer_data:/data \
portainer/portainer-ce:latest
Now, I have a sleek UI through which I can quickly deploy containers.
SWAG
The first docker container I deployed was SWAG, which is an easy-to-use reverse-proxying image which consists of an nginx webserver, reverse-proxy, and Let’s-Encrypt client. In summary, all information received to my domain, for example, a person simply visiting www.dsla.co.uk, will go through SWAG, which will then decide where to send the information to depending on the subdomain (e.g. www.). Hence, everytime somebody visits www.dsla.co.uk, this goes through SWAG which then sees that the subdomain chosen (www.) is associated with WordPress, and forwards the information to there.
Cloudflare-DDNS
The next docker container I set up was Cloudflare-DDNS, because I have a Dynamic IP. What this container does is monitor whenever my IP address changes, and updates it on Cloudflare through their API.
WordPress
WordPress is what you are seeing now. This is the software I use to run my blog website. In the documentation, this typically comes as a stack on docker, meaning that it deploys with a MySQL container to accompany it. This is how I ran WordPress on my last server. However, this time I have already made my own separate MySQL dedicated VM, so I just typed the IP of that database host in the “DB_HOST” environment variable whilst setting up WordPress. I did also have to create a WordPress user and WordPress database on the MySQL host, which WordPress could log into in order to access its own database. I use SWAG to reverse-proxy to WordPress recognising (www.) as its subdomain.
VaultWarden
Vaultwarden has by far been one of my most convenient docker containers. It is a substitute for Dashlane, which is a password manager that I used to pay for. What it does is securely store all my passwords, as well as generate random secure passwords for most websites I use, and auto-fills them when I visit a login page on that website.
Flame
On my last server, I used to use Heimdall as a customised home page for all my applications, however as of now I’ve started using Flame as it looks so much more sleek and has other features such as weather. Although the container hasn’t been updated for almost a year, it is still very good, and certainly better than Heimdall.
In my Google Chrome, I also went to “Settings > Appearance > Home Button” and setup a Home button in the top left of my Chrome which leads to my Flame. Here is what that looks like:
That is all there is to show for docker so far. The VM consisting of docker runs on 8 CPUs with 48GB of RAM and a bootdisk size of 384GB (Pretty overkill, but I have a lot to spare so why not).
Mailcow
The final VM I set up for now is Mailcow.
Mailcow is a software used for self-hosting a mail server. This is what I use to self-host my personal mailbox at [email protected]. It takes a while to setup, I couldn’t tell you how I got it running as I just partially followed a tutorial whilst having to improvise. It was a long process, but it works really well now, it comes with a neat UI, and integration with the Mail app on the IPhone.
I can also filter E-Mails to specific folders depending on keywords. Junk filtering is more difficult, I still haven’t fully figured out that part.
I run this on a Proxmox VM with 4 CPUs and 8GB of RAM.
Conclusion and Next Steps
That pretty much sums up my new server setup so far, I have all but one main part set up. I’m still waiting on getting two more 3TB Hard Drives before I can get my TrueNAS setup. After I setup TrueNAS, I’m looking to setup a Pterodactyl Panel like I had done before, for whenever I want to run and game servers.