Build Your Own Pro VDI System with Proxmox and Apache Guacamole: Smooth Remote Desktop via Browser

Virtualization tutorial - IT technology blog
Virtualization tutorial - IT technology blog

Why Proxmox and Apache Guacamole are the perfect pair?

Carrying a 2.5kg gaming laptop just to fix a few lines of code at a coffee shop is a nightmare. Many IT pros choose to remote into their home machines, but client devices don’t always have specialized software available. This is where VDI (Virtual Desktop Infrastructure) shines.

Solutions from VMware or Citrix often come with high licensing costs, reaching thousands of dollars. For personal needs or small labs, the Proxmox VE and Apache Guacamole combo is the optimal choice. I am currently running a Homelab cluster with 12 VMs. Turning it into a VDI system allows me to work on any device, from an iPad to a public computer, as long as I have internet access.

Apache Guacamole acts as an intermediary gateway. It converts RDP, VNC, and SSH protocols into HTML5. As a result, your web browser becomes a remote control console without needing to install any additional plugins.

Step 1: Optimizing Virtual Machines (VMs) on Proxmox

Don’t rush into installation. For a smooth remote experience, the configuration of the target VM is the deciding factor. I usually prioritize Windows 11 for Office tasks and Ubuntu Desktop for coding.

Key Hardware Settings

  • For Windows: Be sure to install all VirtIO drivers. This helps double disk access speeds and significantly reduces network latency. Don’t forget to enable Remote Desktop in System Settings.
  • For Linux: Install xrdp to use a graphical interface. If you only need the command line, SSH is sufficient.
  • Virtual Graphics Card: In the VM Hardware section, set the Display to virtio-gpu. This setting ensures the web-streamed image is stable and reduces screen tearing.

Step 2: Deploying Apache Guacamole using Docker

Installing from source code is extremely time-consuming. Instead, I recommend using Docker Compose to deploy in just 3 minutes. You can run Docker directly on a Proxmox LXC Container to save resources (it only consumes about 512MB RAM).

Below is the docker-compose.yml file I have fine-tuned for maximum stability:

version: '3'
services:
  guacd:
    image: guacamole/guacd
    container_name: guacd
    restart: always

  guacamole:
    image: guacamole/guacamole
    container_name: guacamole
    restart: always
    ports:
      - "8080:8080"
    environment:
      GUACD_HOSTNAME: guacd
      MYSQL_HOSTNAME: mysql
      MYSQL_DATABASE: guacamole_db
      MYSQL_USER: guacamole_user
      MYSQL_PASSWORD: your_strong_password
    depends_on:
      - guacd
      - mysql

  mysql:
    image: mysql:8.0
    container_name: guacamole_mysql
    restart: always
    environment:
      MYSQL_DATABASE: guacamole_db
      MYSQL_USER: guacamole_user
      MYSQL_PASSWORD: your_strong_password
      MYSQL_ROOT_PASSWORD: root_password
    volumes:
      - ./db_data:/var/lib/mysql
      - ./init:/docker-entrypoint-initdb.d

After launching, access http://<Your-IP>:8080/guacamole. Log in with the default account guacadmin/guacadmin and change the password immediately.

Step 3: Fine-tuning for 60 FPS Performance

To achieve that “instant response” feel, you need to configure the Connection correctly. Go to Settings -> Connections -> New Connection.

Optimal RDP Parameters:

  • Hostname: The internal IP of the VM on Proxmox.
  • Color depth: Choose 16-bit if you are using a 4G connection. If you are on fiber optics, set it to 24-bit for accurate colors.
  • Display mode: Disable “Wallpaper” and “Themes” to reduce bandwidth. However, keep “Font smoothing” enabled so that reading code doesn’t strain your eyes.

Pro tip: If the ping from your device to the server is under 30ms, the experience will be almost indistinguishable from sitting at the actual machine.

Security: Don’t lock the barn door after the horse has bolted

Opening port 8080 to the internet is extremely dangerous. Hackers can scan and brute-force your system within minutes.

Reverse Proxy Solution: Use Nginx Proxy Manager to run Guacamole over HTTPS with a free SSL certificate. This method is professional and encrypts all transmitted data.

Multi-Factor Authentication (2FA): Guacamole has excellent support for apps like Google Authenticator. It only takes 5 extra minutes to configure, but it will protect all the data in your VMs completely.

Real-world Performance Testing

When the system is operational, open the Task Manager on Proxmox to monitor it. Typically, a smooth session only consumes between 1-3 Mbps of bandwidth. If you notice mouse delay, check your network latency. If the ping exceeds 100ms, you will be forced to reduce the Color Depth to the lowest level to maintain the connection.

My favorite feature is the Shared Drive. You can drag and drop files directly from your physical machine into the browser to upload them to the VM. Transfer speeds depend on your connection, but it is incredibly convenient for daily workflows.

Building your own VDI system not only helps you master the technology but is also extremely cost-effective. Instead of paying monthly fees for a Cloud Desktop, you only pay for the electricity for your home server. Good luck with your setup!

Share: