Listen to this Post
In this article, Tejas Patil shares his journey of building a self-hosted private cloud using Proxmox, Terraform, and Docker. He explains how he transformed a Mini PC into a private cloud, running virtual machines, containers, and CI/CD pipelines, all without relying on expensive cloud providers like AWS or GCP.
Key Tools Used:
- Proxmox: For virtualization and managing virtual machines.
- Terraform: For Infrastructure as Code (IaC) to automate VM provisioning.
- Docker: For containerization and managing applications.
- Portainer: Simplifies Docker container management with an easy UI.
- Vaultwarden: A lightweight Bitwarden alternative for secure password management.
- Kavita: An eBook & manga server for managing digital libraries.
- Plex: A self-hosted media server for streaming movies & music.
- Cloudflare Zero Trust: For securing remote access to services.
Why Self-Hosting?
Self-hosting offers several benefits:
- Full Control: Avoid vendor lock-in and maintain complete control over your data.
- Cost-Effective: Reduces dependency on expensive cloud providers.
- Skill Development: Deepens understanding of cloud infrastructure and DevOps principles.
Practical Commands and Codes:
1. Install Proxmox:
wget https://download.proxmox.com/iso/proxmox-ve_7.3-1.iso sudo dd if=proxmox-ve_7.3-1.iso of=/dev/sdX bs=4M status=progress
2. Terraform Configuration for VM Provisioning:
[hcl]
provider “proxmox” {
pm_api_url = “https://your-proxmox-server:8006/api2/json”
pm_user = “root@pam”
pm_password = “yourpassword”
}
resource “proxmox_vm_qemu” “test_vm” {
name = “test-vm”
desc = “A test VM”
target_node = “pve”
clone = “ubuntu-template”
cores = 2
memory = 2048
network {
model = “virtio”
bridge = “vmbr0”
}
}
[/hcl]
3. Docker Compose for Portainer:
version: '3' services: portainer: image: portainer/portainer-ce:latest container_name: portainer restart: always ports: - "9000:9000" volumes: - /var/run/docker.sock:/var/run/docker.sock - portainer_data:/data volumes: portainer_data:
4. Cloudflare Tunnel Setup:
cloudflared tunnel create mytunnel cloudflared tunnel route dns mytunnel example.com cloudflared tunnel run mytunnel
What Undercode Say:
Building a self-hosted cloud is an excellent way to gain hands-on experience with cloud infrastructure, DevOps practices, and security. By using tools like Proxmox, Terraform, and Docker, you can create a robust, scalable, and secure environment that mirrors real-world cloud setups. This approach not only saves costs but also provides a deeper understanding of how cloud services operate under the hood.
For those interested in exploring further, consider diving into Kubernetes with K3s for lightweight cluster management or experimenting with Nextcloud for self-hosted storage solutions. The possibilities are endless, and the skills you gain will be invaluable in your career as a Cloud or DevOps engineer.
For more detailed steps, check out the full guide on Dev.to.
Additional Linux/IT Commands:
- Check System Resources:
top htop
- Network Configuration:
ifconfig ip addr show
- Firewall Management:
sudo ufw enable sudo ufw allow 22/tcp
- Disk Usage:
df -h du -sh *
- Service Management:
sudo systemctl start servicename sudo systemctl status servicename
By mastering these commands and tools, you can further enhance your self-hosted cloud environment and ensure it runs smoothly and securely.
References:
initially reported by: https://www.linkedin.com/posts/tejas2292_cloudcomputing-devops-selfhosting-activity-7299684520784461825-5aVW – Hackers Feeds
Extra Hub:
Undercode AI


