Building a Home Server with Proxmox

Building a Home Server with Proxmox

I’m running a few personal websites for writing and doing random research related to SEO, or running AI models to experiment with new open source applications mainly for learning and study purposes. The monthly cost of renting a VPS isn’t that high, but it still feels wasteful because I barely use up the minimum hardware capacity. Thinking about it, I also have a spare PC at home — so what if I turn it into a VPS?

Why I want to build a home server

Right now I mostly use a laptop, so over an entire month I might only turn on the PC a few times. I calculated the cost of running the PC 24/7 by plugging in a power meter to measure electricity consumption, and also by limiting the hardware to see whether I could increase or decrease the actual power draw according to operating needs. I realized that virtualizing the hardware and configuring limits for CPU, RAM, and GPU usage can significantly reduce the watts consumed during operation. On top of that, I’m also installing solar panels and already paying for 2 internet lines, so it’s pretty much perfect to turn my home into a server.

Okay, so now let’s get started on building a self-hosted cloud server/web server at home. What’s the most optimal way to do it? I consider this a hands-on exercise for myself to learn more about networking and computer hardware.

Project goals

  1. How to make the most of the hardware capacity of the server machine
  2. Be able to control services running on this server independently, avoiding one service overloading the entire system
  3. How to safely move data and maintain servers with zero downtime
  4. Easily back up and restore the server, and quickly recover the operating system when a failure occurs across the entire system

With those goals in mind, at first I tried installing Linux, fake Synology, etc. However, the problem was always that resources were being consumed uncontrollably, so sometimes even when I wasn’t using anything it would still run at full load.

Of course, there’s still the option of setting limits on each container, but that’s hard to scale up when needed.

Option to limit hardware resources in Docker Compose

Add the following limits to the stack when deploying the container to set hardware limitsservice:mem_limit: 512mmem_reservation: 128Mcpus: 1

The final approach I found was to choose a virtualization platform to emulate different operating systems on top of a single hardware system. This makes it easy to replace and expand hardware without causing downtime.

Exploring virtualization technology - [Part 1] Hardware virtualization: Hyper-V vs KVM vs VMware vSphere vs Xen
While tinkering and researching Hyper-V, I started diving deeper into other virtualization technologies used around the world. In this article, I’ll summarize the knowledge I’ve gathered…
Learn more about hardware virtualization options

Introduction to Proxmox

Proxmox is an open-source platform that integrates virtualization and container management tools, designed to provide a comprehensive solution for managing complex IT environments. Developed by Proxmox Server Solutions GmbH, Proxmox supports KVM virtualization and LXC containers, allowing users to run virtual machines and containers on the same platform. With an intuitive web interface and many powerful features such as clustering, high availability, and backup, Proxmox helps optimize resources and simplify system management workflows. It is especially suitable for businesses and organizations that need a powerful, flexible virtualization solution with low cost thanks to its open-source nature.

Implementation guide

Start by installing the operating system to set up the virtualization environment.

Proxmox installation guide
Turn an old computer into a server that can run all kinds of things, easily install multiple operating systems on the same hardware, operating completely independently

Issues will definitely arise when you host a web server at home

Reverse proxy - Accessing multiple servers from a domain via a single public IP
Access the same port 80 from a domain to two different servers within a single public IP at home
Unable to access the home server via public IP when connected to home Wi-Fi
Annoyances when self-hosting a web server at home
Bạn đã đăng ký thành công vào Geek Playground
Tuyệt vời! Tiếp theo, hoàn tất thanh toán để có quyền truy cập đầy đủ vào Geek Playground
Chào mừng trở lại! Bạn đã đăng nhập thành công.
Thành công! Tài khoản của bạn đã được kích hoạt đầy đủ, bạn hiện có quyền truy cập vào tất cả nội dung.
Thành công! Thông tin thanh toán của bạn đã được cập nhật.
Cập nhật thông tin thanh toán không thành công.