For performance per dollar nothing beats used enterprise gear due to how little you can pick it up for on eBay. Now if you live somewhere where electricity isn’t stupid cheap or you don’t have a good way to mask the sound of a 1000 angry hornets, then enterprise might not be the way to go. Dell SFF PCs can make good servers. You can also go a long ways with just humble raspberry pis, get a whole bunch of them and you can use that to learn K8s too
Electricity isn’t cheap at all here and I do live in a small apartment, unfortunately. It’s why I want to know if just making some changes to my main desktop PC would be better, as that would allow me to save on space, electricity, and heat.
I do have two Rasperry Pis right now. One of them I run Pihole on at the moment.
Much lower power-consumption and built in UPS. Usually also more quiet and since it has a built in screen and keyboard, it is easier to recover from user errors compared to RPIs for example. Disadvantages are mainly the limited storage expansion options, but that is unlikely to be a problem for a beginner.
If you can get a laptop with a few USB ports that can go a long way to helping with storage expansion. Try to avoid USB drives and SD cards, but attaching proper SSDs and HDDs with a USB caddy is a great option. Just don’t accidentally pass the boot drive USB controller to a vm like I did once.
For what you have going on, a used laptop would be great. Pick one up with a broken screen, and take out the magnet in the lid. Most laptops use a hall sensor or reed switch to tell when the lid is closed and send a sleep signal.
The one issue with pi is that you can’t use some x86 server software. I have a seafile instance for by NAS and that was a pain to get running on my pi4