Home Server With Cockpit

This year’s tax refunds finally gave me the opportunity to buy a high(er-ish) end gaming PC. For the past few years, I’ve been using refurbished workstations, since they usually have decent processors; after adding some more RAM and an alright graphics card, they become good enough to play World of Warcraft on for hours. But I’ve always wanted a beast of a machine. Something more. Something better. The announcement, and now release, of Burning Crusade Classic may have had something to do with this decision.

My friend Julian got himself one of those Lenovo Legion gaming laptops. His machine did have an issue with some dead pixels in the screen, but the Laptop was in warranty, so Lenovo sent out a technician to fix it. And after having another tech come out and fix an overheating issue caused by the first tech’s work, he’s had nothing but good things to say about the laptop.

I found out they made a desktop version of it, and with my tax refund, I bought it. I also picked up 64GB of RAM, a 2TB PCIe SSD, and a 4TB HDD. This gave me a total of 7TB of storage on my new desktop, including the 1TB HDD the tower came with; the tower also came with a 256GB PCIe SSD, but I took that out and put it in an enclosure to work as a portable drive. I turned it on for the first time, and… nothing.

Sometimes open box deals sound better than they are in reality, but Lenovo sent a tech out, who replaced the defective motherboard.

And then I turned it on for the second time, and it was amazing. I have never had LEDs on my fans before.

Also, AMDs have been looking better than Intels for quite a while now. Besides a few bugs on some Windows only games I’m running through Steam’s Proton, there’s nothing (hardware-wise) to complain about.

My fiancee got my Nvidia GeForce GTX 1050 Ti since my new tower has a GeForce GTX 1660 Super, but I kept my old PC, as I could still make use of it as a home server. I threw in two older Nvidia graphics cards I had (a GeForce GT 720 and a Quadro K620), and installed CentOS Stream 8 on it. But I didn’t want a home server that did one thing only; I didn’t want it to just be a web server where I’d host a WordPress dev environment, or just a file server so I could load my movies on every TV, or just a gaming server to host LAN games. I wanted to be able to do it all and more, and I could, with Virtual Machines.

I found the Cockpit project, whose Cockpit software provides a web interface to manage servers; much like a non-web hosting oriented cPanel. And, among other things, it included a web interface to host virtual machines. I initially deployed it on a DigitalOcean VPS to test, and once I felt comfortable enough, I set it up on my new home server. After some initial bugs (related to networking), I put trying the software on hold for a bit, but I’ve returned to it over this past week. And in that time, I’ve figured how to do what I’ve been trying to do in regards to virtual machines from the start: assign real IPs on my network to them without needing to set up routing between subnets. Instead of setting up bridges and whatnot, a direct attachment using the server’s own Ethernet interface works.

Once the direct attach was made, I had to find the name of the interface (ip a), and add it to the VM’s /etc/networking/interfaces file (echo "iface enp1s0 inet dhcp" >> /etc/networking/interfaces). Afterwards, I added a cronjob to the root account to enable the interface on each reboot (@reboot /usr/sbin/ifup enp1s0), and added a static IP to its MAC address on my router. For any other VM, I probably wouldn’t set a static IP; however, this VM has a purpose. And that purpose is a secondary PiHole on my network.

When I first set up my network, I flashed my router with DD-WRT. Configuring the firmware has really given me some firsthand experience with networking; I’ve even set up multiple routers on my network to increase availability and create guest WiFi networks. Still, out of all the tweaks and additions I’ve made to my network, a PiHole to block ads was probably one of the best decisions. So why just have one PiHole? Redundancy is always a good thing when it comes to computers and networking, and with a VM, the secondary PiHole doesn’t even need to be on an actual Raspberry Pi.

Besides the aforementioned redundancy, setting up a secondary PiHole also let me do a low-stakes run-through of how setting up a VM that I could run a game server on would work; setting up the VM, attaching it to the network, assigning a static IP, installing the software, and so on. I’ve already got DDNS set up to point a subdomain to my home network, so If I want to run a Minecraft server for my friends, I’d just need to set up port forwarding on my router.

Although VMs were what I was most excited about with Cockpit, I’m still looking forward to exploring the other features of the software; in particular the Podman interface to run Podman and Docker containers. Depending on how comfortable and stable I find it, I may even suggest it as a web interface for internal/non-cPanel servers at work, since it provides a nice way to see server stats, perform upgrades, and so on. In any case, my next task for this home server is to figured out PCI passthrough to take advantage of the two GPUs I have installed. Maybe I can mine some Dogecoin.

3 thoughts on “Home Server With Cockpit”

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.