- π§ System Configuration
- π SSH Key & Certificate Generation
- π Proxy Configuration (Traefik)
- π NFS Configuration
- π§± Base VMs with Packer
- π VM Deployment with Terraform
- βοΈ Configuration
- π References
This homelab infrastructure is centered on Proxmox VE using Terraform and Docker to provision VMs and Dockers (names based in the Angels from Neon Genesis Evangelion). Each VM serves a specific purpose like media, storage, or network automation.
Refer to the table below for an at-a-glance view of each configured and planned virtual machine and its corresponding role.
These steps are tailored specifically to my homelab infrastructure. Some assumptions are made (like Proxmox being pre-installed), and tools are selected based on personal preference and workflow. Your configuration may vary depending on your hardware, network design, and requirements.
- Proxmox VE is already installed and fully configured in this environment.
- Create new SSH Key for setup conectivity.
- Use Proxmox VE Helper Scripts for community-contributed helper scripts for VM management, backups, and more.
- Setup Traefik as a reverse proxy to handle and redirect HTTP/S traffic.
Generate an SSH key for your vm's or other services:
ssh-keygen -t ed25519 -C "server"Use the generated public key in user-data for automatic authentication setup.
Using traefik-kop, each VM runs an agent that:
- Registers itself with the main Traefik instance
- Sends its routing configuration dynamically
This enables:
- Auto-discovery of services
- Clean URLs and HTTPS support
- Centralized control over routing logic
+-------------------------+ +---------------------0----+
| +---------------------+ | | +---------------------+ |
| | | | | | | |
+---------+ :443 | | +---------+ | | :8088 | | +------------+ | |
| WAN |--------------->| traefik |<-------------------->| | svc-nginx | | |
+---------+ | | +---------+ | | | | +------------+ | |
| | | | | | | | |
| | +---------+ | | | | +-------------+ | |
| | | redis |<-------------------->| | traefik-kop | | |
| | +---------+ | | | | +-------------+ | |
| | docker1 | | | | docker2 | |
| +---------------------+ | | +---------------------+ |
| vm1 | | vm2 |
+-------------------------+ +--------------------------+
Note
To consolidate data across VMs, I export a shared storage path via NFS, backed by an NTFS-formatted disk. While not typical in Linux-first setups, this suits my personal needs.
sudo apt install -y ntfs-3gList all the devices and select which one you need to mount.
sudo fdisk -l
sudo lsblk -f
ls -l /dev/disk/by-uuid/Copy the UUID in /etc/fstab
# edit fstab
vim /etc/fstab
UUID="" /mnt/storage ntfs-3g defaults,auto 0 0
mkdir /mnt/storage
# mount disc
mount -a- Add disk to VM.
ls -l /dev/disk/by-id/
qm set 103 -virtio2 /dev/disk/by-id/<disk-id>sudo apt install -y nfs-kernel-server
sudo vim /etc/exportsExample export entry:
/mnt/storage 192.168.1.0/24(rw,sync,no_subtree_check)
- Replace 192.168.1.0/24 with the subnet of your Proxmox server (e.g., 192.168.1.0/24 allows all IPs in the 192.168.1.x range).
- rw: Allows read and write access.
- sync: Ensures changes are written to disk before the client is notified.
- no_subtree_check: Prevents subtree checking for better performance.
-
Login to Proxmox Web UI
-
Navigate to
Datacenter > Storage > Add > NFS -
Fill in:
- ID: Enter a name for the storage (e.g., nfs-storage).
- Server: Enter the IP address of the NFS server (e.g., 192.168.1.111).
- Export: Click Query to list available NFS exports, and select /mnt/storage.
- Content: Select the types of content you want to store (e.g., Disk image, ISO image, Backup).
- Nodes: Select the Proxmox nodes that can access this storage.
Warning
All virtual machines are built from a cloud-init Ubuntu 24.04 image using Packer. This ensures consistency across deployments.
Configure variables.auto.pkrvars.hcl file for custom values.
cd packer
packer validate .
packer build .- The resulting image is uploaded to Proxmox as a VM template.
- Cloud-init is enabled in the build to support dynamic configuration.
- Include Docker installation an other tools.
- This template is later used by Terraform to deploy actual VMs.
Deploy or destroy VMs using Terraform's targeted apply.
Ensure that your terraform.tfvars and modules are configured per Proxmox Provider standards.
cd terraform
terraform plan
terraform apply
# or
terraform apply -target='module.vms["ramiel"]'
terraform destroy -target='module.vms["ramiel"]'[*]: Future changes or upgrades.
- For testing Transmission with OpenVPN add this torrent from TorGuard.
- Install Rclone
# Installing
winget install --id=Rclone.Rclone -e
# Setup new SFTP connection
rclone config
# Show all volumes
rclone listremotes
# Mount
rclone mount nas:/mnt/storage X: --vfs-cache-mode full --vfs-cache-max-size 2G --vfs-read-chunk-size 64M --vfs-read-chunk-size-limit 512M --buffer-size 32M --attr-timeout 1s --no-modtime --network-mode --dir-cache-time 5m --poll-interval 10s --log-level INFO- Copy files
rclone copy "F:/" nas:"/mnt/storage/backup/" --progress- Proxmox Packer Templates
- Terraform Cloud-Init VM
- Telmate Terraform Provider
- Proxmox Ubuntu Templates
- Proxmox-VM-Disk-and-NFS-Configuration-Guide
- Evangelion Angel Wiki