If you're working in software, don't waste time on the hardware. It's gonna be a pain in the ass just to deal with IPV4 and DNS behind your university network or your home router – and likely to be against the terms of service of either one.
For random websites, just use Vercel or Netlify for free. For the other lower-level stuff (k8s and random backends) sign up for free educational credit from the various big clouds (e.g. https://aws.amazon.com/education/awseducate/ or https://azure.microsoft.com/en-us/free/students or https://cloud.google.com/edu/students?hl=en). Maybe cycle through them once a year so you can keep using them for free and also get experience with several clouds.
After uni, unless you're working for very large companies with their own data centers or specific industries who have to colocate their own servers (usually for compliance), you'll never be working with hardware anyway. It's all in the cloud, so you might as well learn that (there's a lot of management and auth/permissions overhead) instead of dealing with x86 hardware.