On January 9, 2025, I decided to start building a home server after failing with a VPS.
The failure was entirely my fault—I purchased a VPS with a data center located far from my country.
- I live in Jakarta, but the VPS data center was in India, causing terrible latency.
- Frustrated, I gave up on that VPS.
- Fortunately, the provider offered refunds, so I got my money back and learned a valuable lesson.
Even after that, I still wanted to:
- Deploy my projects and portfolio online.
- Understand how production environments work.
But instead of buying another VPS, I stumbled upon something more exciting.
While scrolling through YouTube, I found this video that showed how you could build a server at home using an old laptop.
- I immediately decided to try it.
- After spending a day understanding the video, I installed Proxmox on my laptop and turned it into a home server.
During that week, I dived into:
- Networking Basics: How to make my local server accessible to the internet.
- Computer Fundamentals: How computers were created and how they work.
- Internet Mechanics: How data travels and how everything connects.
One thing that stood out to me:
- Internet connections aren’t fully wireless!
- At least in my country, ISPs still rely on cables to deliver internet access.
Learning all of this completely changed the way I think about computers and the internet.
Hello, guys! Today, I’m excited to share how I managed to deploy my applications locally on my very own home server. It’s been a learning-packed journey, and here’s a detailed breakdown of what I’ve done so far:
I’m using virtualization technology to manage my applications effectively. Here’s how I set it up:
- Created 4 Virtual Machines (VMs) using Proxmox.
- Each VM runs my applications inside Docker containers.
Docker is amazing because it allows me to:
- Package my programs along with all their dependencies.
- Easily add essential services like:
- Databases (PostgreSQL, MySQL, etc.)
- Messaging servers (RabbitMQ, Kafka, etc.)
- Caching servers (Redis).
With Docker, everything is modular, portable, and easy to replicate! 💡
Managing multiple Docker environments across VMs can be challenging. To make this process easier, I decided to use Portainer, a lightweight and user-friendly tool for managing Docker containers. Here’s my setup:
- Installed the Portainer Agent on each VM to enable communication between the VMs and the main server.
- Installed the Portainer Server on my Proxmox node to centralize control and management.
With this setup, I can now monitor, deploy, and manage all Docker containers across my VMs from a single Portainer dashboard.
Here’s a visual representation of my current server architecture:
- Proxmox Node: Serves as the hypervisor managing all virtual machines.
- Virtual Machines (VMs): Each VM runs specific applications inside Docker containers. These applications might include services such as databases, message queues, or cache servers (e.g., Redis).
- Portainer Server: Installed on the Proxmox physical node to centralize Docker container management across all VMs.
- Portainer Agents: Installed on each VM to facilitate communication and management via the Portainer Server.
This architecture allows me to run isolated environments for different services while still managing everything efficiently through Portainer.
- Isolation: Each VM can host independent services without interference.
- Scalability: Adding more VMs or containers is straightforward as the Portainer setup supports multiple environments.
- Efficiency: With Portainer, I don’t need to manage each VM individually; all tasks can be centralized.
Here’s the diagram:
Stay tuned for next week’s update, where I’ll experiment with using LXC (Linux Containers) to compare performance and efficiency against VMs.
During the first week:
- I figured out how to set up a home server.
- Learned to deploy my applications inside the server using VMs.
- Integrated Portainer for centralized management of Docker environments.
Fun Fact: In Proxmox, there are two ways to deploy applications:
- Using VMs (Virtual Machines).
- Using LXC containers (Linux Containers).
For now, I chose VMs to deploy my projects. However, next week, I plan to explore LXC containers to compare their efficiency.
Currently, my old laptop (repurposed as a server) can handle 4 VMs, but that seems to be the maximum it can handle comfortably. I’m curious to see if LXC containers will:
- Be more efficient for my hardware.
- Allow me to run more containers compared to VMs.
Next week, I’ll:
- Deploy the same projects using LXC containers.
- Compare the performance of VMs vs. LXC to determine the best solution for my needs.
Stay tuned for the update! Let’s see if my old laptop server can handle the challenge. 😄
- 🖥️ Set up 4 VMs in Proxmox.
- 🐳 Deployed apps using Docker containers.
- 🛠️ Installed Portainer for centralized management.
- 🔍 Next step: Test LXC containers for better performance.
If you have any tips, tricks, or suggestions on deploying apps on a home server, feel free to share! This repo is as much about learning as it is about sharing. 😊
See you in the next update!