//nbkelley /homelab

Web Server Architecture on Proxmox

Web Server Architecture on Proxmox#

What Was Established#

High-level architectural strategies for deploying web development environments on Proxmox, focusing on balancing isolation with resource efficiency.

Key Decisions#

  • LXC for Services: Use LXC containers for lightweight, single-purpose services (e.g., Nginx, Databases) to minimize overhead.
  • VM for Complex Workloads: Use full VMs when running Docker, Kubernetes, or when custom kernel modules are required.
  • Reverse Proxy Pattern: Always use a reverse proxy (Nginx Proxy Manager, Traefik, or C/Caddy) to handle SSL termination and route traffic to multiple internal services.
  • Database Isolation: Separate databases into their own containers/VMs to improve security and facilitate independent backups.

Current Configuration#

Networking Patterns#

  • Bridge Mode: Default vmbr0 for services requiring LAN access.
  • Internal Network: Use secondary bridges (e.g., vmbr1) for isolated communication between web servers and databases.

Storage Patterns#

  • Local-LVM: Preferred for high-performance VM/container disks.
  • Directory Storage: Suitable for container volumes and simpler storage needs.

Historical Notes#

This architecture plan was established in March 2025. The preference for LXCs over VMs for simple web services was a primary driver.

Proxmox Network Troubleshooting

Proxmox Network Troubleshooting#

What Was Established#

Troubleshooting steps for resolving connectivity loss to Proxmox nodes, specifically addressing IP conflicts and subnet mismatches.

Key Decisions#

  • Static IP Reservation: Proxmox nodes should always have a static IP (e.g., 192.168.0.69) that is excluded from the OPNsense DHCP pool.

Current Configuration#

Troubleshooting Workflow#

  1. Verify Connectivity: ping 192.168.0.69.
  2. Check Local Config: Log in via console and verify /etc/network/interfaces:
    auto vmbr0
    iface vmbr0 inet static
        address 192.168.0.69/24
        gateway 192.168.0.1
        bridge-ports enp3s0
  3. Check for IP Conflicts: Ensure no other device (via DHCP) has been assigned 192.168.0.69.
  4. ARP Cache: Clear local ARP cache if IP conflicts are suspected: arp -d 192.168.0.69.

Historical Notes#

Identified an issue where a DHCP client was assigned 192.168.0.69, conflicting with the Proxmox static IP.

Proxmox Network Configuration

Proxmox Network Configuration#

What Was Established#

Procedures for manually updating the IP address and network interface settings on a Proxmox VE host via the command line.

Key Decisions#

Network configuration is managed via the /etc/network/interfaces file. When changing network parameters, the Linux bridge (vmbr0) must be updated to point to the correct physical interface.

Current Configuration#

To modify the IP, gateway, or interface, edit the configuration file:

nano /etc/network/interfaces

Example of a static configuration for a bridge interface:

Proxmox ZFS Storage & Installation Patterns

Proxmox ZFS Storage & Installation Patterns#

What Was Established#

Procedures for managing ZFS rpool on single-disk Proxmox installations, including methods for limiting pool size and troubleshooting import failures.

Key Decisions#

  • Single Disk Size Limitation: When installing Proxmox on a large disk but wanting to limit the ZFS pool to a specific size (e.g., 64GB) to leave room for other partitions, use the hdsize parameter in the Proxmox installer’s Advanced Options.
  • Custom Partitioning Method: For complex layouts, it is possible to manually partition a drive in Debian and then upgrade the system to Proxmox VE.

Current Configuration#

ZFS Pool Creation (Manual)#

To create a ZFS pool with specific optimizations (ashift=12, compression=lz4) and a size limit:

Web Server Deployment Pattern (Beginner)

Web Server Deployment Pattern (Beginner)#

What Was Established#

For a beginner-friendly, lightweight, and scalable homelab setup, a stack consisting of Ubuntu Server LTS and Nginx is the recommended standard. This provides a balance of ease of use, extensive documentation, and low resource overhead.

Key Decisions#

  • Operating System: Ubuntu Server LTS (chosen for stability, community support, and ease of management).
  • Web Server: Nginx (chosen over Apache for being lightweight, faster for static content, and better suited for future use as a reverse proxy).
  • Resource Allocation (Small Site): 1-2 CPU cores, 1-2 GB RAM, 10-2/GB Disk.

Current Configuration#

Nginx Site Configuration#

Default root directory: /var/www/html