Automated setup scripts for Proxmox VE with an interactive guided installer.
This project provides a collection of scripts to automate common Proxmox VE setup tasks, with a current focus on GPU-enabled LXC containers. The modular design makes it easy to add new automation scripts for any Proxmox setup scenario.
This collection of scripts currently focuses on GPU-enabled LXC containers, with plans to expand to other Proxmox automation tasks:
Host Setup (Proxmox)
- Installs and configures AMD ROCm or NVIDIA CUDA drivers
- Sets up persistent GPU device mapping using PCI paths
- Configures udev rules for proper device permissions
- Verifies driver installation and GPU accessibility
Container Setup (LXC)
- Creates unprivileged LXC containers with GPU passthrough
- Installs Docker with GPU runtime support
- Configures AMD ROCm or NVIDIA Container Toolkit
- Tests GPU accessibility with validation containers
- โ Interactive Guided Installer: Menu-driven setup with progress tracking
- โ Modular Scripts: Easy to add new automation tasks
- โ Progress Tracking: Resume setup where you left off
- โ Auto-Detection: Identifies completed steps and available hardware
- โ Persistent GPU Mapping: Uses PCI paths to ensure consistent GPU assignment across reboots
- โ Unprivileged Containers: Full GPU access without sacrificing container security
- โ Docker Integration: GPU-enabled Docker containers with proper runtime configuration
The guided installer provides an interactive menu with progress tracking and auto-detection:
cd /root
git clone https://github.com/jammsen/proxmox-setup-scripts.git
cd proxmox-setup-scripts
./guided-install.shWhat you get:
- ๐ Interactive menu showing all available scripts
- โ Green checkmarks for completed steps
- ๐ฏ Smart defaults (just press Enter to continue)
- ๐ Progress persistence (resume anytime)
- ๐ Detailed descriptions for each script
cd /root
git clone https://github.com/jammsen/proxmox-setup-scripts.git
cd proxmox-setup-scripts/host./001 - install-tools.shInstalls: curl, git, gpg, htop, iperf3, lshw, mc, s-tui, unzip, wget, plus power management tools.
For AMD GPUs:
./003 - install-amd-drivers.sh # Install AMD ROCm 7.1.X drivers
./005 - verify-amd-drivers.sh # Verify installationFor NVIDIA GPUs:
./004 - install-nvidia-drivers.sh # Install NVIDIA CUDA and kernel drivers
./006 - verify-nvidia-drivers.sh # Verify installationFor AMD Ryzen AI 300 Series iGPU (Optional):
./002 - setup-igpu-vram.sh # Allocate 96GB VRAM for integrated GPU./007 - setup-udev-gpu-rules.shCreates udev rules for consistent GPU device permissions and persistent PCI-based paths.
./031 - create-gpu-lxc.shThis interactive script will:
- Prompt you to select GPU type (AMD or NVIDIA)
- Auto-detect available GPUs with their PCI addresses
- Create an Ubuntu 24.04 LXC container with GPU passthrough
- Configure persistent PCI-based device mapping
- Mount the scripts directory at
/root/proxmox-setup-scriptsinside the container - Enable SSH access (default password:
testing) - Ask if you want to automatically install Docker and GPU drivers
Default answer is "Y" - just press Enter to run the installation automatically!
If you skipped the automatic installation, you can run it manually:
Option A: Run from Proxmox Host
# For NVIDIA:
pct exec <CONTAINER_ID> -- bash /root/proxmox-setup-scripts/lxc/install-docker-and-nvidia-drivers-in-lxc.sh
# For AMD:
pct exec <CONTAINER_ID> -- bash /root/proxmox-setup-scripts/lxc/install-docker-and-amd-drivers-in-lxc.shOption B: SSH into Container
ssh root@<CONTAINER_IP> # Default password: testing
cd /root/proxmox-setup-scripts/lxc
# For NVIDIA:
./install-docker-and-nvidia-drivers-in-lxc.sh
# For AMD:
./install-docker-and-amd-drivers-in-lxc.shNVIDIA:
docker run --rm --gpus all nvidia/cuda:13.0.1-base-ubuntu24.04 nvidia-smiAMD:
docker run --rm --name rcom-smi --device /dev/kfd --device /dev/dri -e HSA_OVERRIDE_GFX_VERSION=11.5.1 -e HSA_ENABLE_SDMA=0 --group-add video --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --ipc=host rocm/rocm-terminal bash -c "rocm-smi --showmemuse --showuse --showmeminfo all --showhw --showproductname && rocminfo | grep -i -A5 'Agent [0-9]'"proxmox-setup-scripts/
โโโ guided-install.sh # Interactive guided installer (START HERE!)
โ
โโโ host/ # Scripts to run on Proxmox host
โ โโโ 000 - list-gpus.sh # List all GPUs and PCI paths
โ โโโ 001 - install-tools.sh # Install essential utilities
โ โโโ 002 - setup-igpu-vram.sh # Configure AMD Ryzen AI iGPU VRAM
โ โโโ 003 - install-amd-drivers.sh # Install AMD ROCm 7.1.X drivers
โ โโโ 004 - install-nvidia-drivers.sh # Install NVIDIA CUDA drivers
โ โโโ 005 - verify-amd-drivers.sh # Verify AMD driver installation
โ โโโ 006 - verify-nvidia-drivers.sh # Verify NVIDIA driver installation
โ โโโ 007 - setup-udev-gpu-rules.sh # Setup GPU device permissions
โ โโโ 030 - create-amd-lxc.sh # (Legacy) AMD-only LXC creation
โ โโโ 031 - create-gpu-lxc.sh # Create GPU-enabled LXC (AMD/NVIDIA)
โ โโโ 999 - upgrade-proxmox.sh # Upgrade Proxmox to latest version
โ
โโโ lxc/ # Scripts to run inside LXC containers
โ โโโ install-docker-and-nvidia-drivers-in-lxc.sh # Docker + NVIDIA setup
โ โโโ install-docker-and-amd-drivers-in-lxc.sh # Docker + AMD setup
โ
โโโ includes/ # Shared libraries
โ โโโ colors.sh # Color definitions for terminal output
โ
โโโ README.md # This file
The guided-install.sh script provides an interactive, menu-driven experience:
- Progress Tracking: Automatically saves your progress and shows โ for completed steps
- Auto-Detection: Identifies completed steps by checking installed packages and loaded kernel modules
- Smart Defaults: Press Enter to accept defaults, or type custom values
- Flexible Execution: Run individual scripts, ranges, or all steps at once
- Always Ask Mode: When running "all", you're prompted before each script (never auto-skipped)
all - Run all Host Setup scripts (000-029) with confirmations [DEFAULT]
<number> - Run specific script by number (e.g., 004, 031)
<start-end> - Run range of scripts (not implemented yet)
r/reset - Clear progress tracking to start fresh
q/quit - Exit installer
./guided-install.sh
# Press Enter to accept default "all"
# You'll be prompted before each script:
# - See script description and completion status
# - Press Y to run, n to skip, q to return to menu./guided-install.sh
# Type: 004
# Runs NVIDIA driver installation directly========================================
Proxmox Setup Scripts - Guided Installer
========================================
Progress: 3 steps completed
=== Host Setup Scripts (000-029) ===
[000]: (Optional) List all available GPUs and their PCI paths
โ [001]: Install essential tools (curl, git, gpg, htop, iperf3, lshw, mc, s-tui, unzip, wget)
[002]: Setup AMD Ryzen AI 300 / AI PRO 300 Processors iGPU 96GB VRAM allocation
[003]: Install AMD ROCm 7.1.X drivers
โ [004]: Install NVIDIA Cuda and Kernel drivers
โ [005]: Verify AMD driver installation
[006]: Verify NVIDIA driver installation
[007]: Setup udev rules for GPU device permissions
=== LXC Container Scripts (030-099) ===
[030]: Create AMD GPU-enabled LXC container (old-only-amd-version)
[031]: Create GPU-enabled LXC container (AMD or NVIDIA or BOTH)
=== System Maintenance (999) ===
[999]: Upgrade Proxmox to latest version (15 packages, 3 PVE-related)
Options:
all - Run all Host Setup scripts (000-029) with confirmations [DEFAULT]
<number> - Run specific script by number (e.g., 004, 031)
r/reset - Clear progress tracking
q/quit - Exit installer
Enter your choice [all]:
| Script | Description | When to Use |
|---|---|---|
| 000 | List all GPUs and PCI paths | Optional - useful for identifying GPU addresses before setup |
| 001 | Install essential tools | Recommended - installs utilities and power management |
| 002 | Setup AMD Ryzen AI iGPU VRAM | Only for AMD Ryzen AI 300/AI PRO 300 series with integrated GPU |
| 003 | Install AMD ROCm 7.1.X drivers | Required for AMD GPU support |
| 004 | Install NVIDIA CUDA drivers | Required for NVIDIA GPU support |
| 005 | Verify AMD driver installation | After installing AMD drivers |
| 006 | Verify NVIDIA driver installation | After installing NVIDIA drivers |
| 007 | Setup udev GPU rules | Required - ensures persistent device permissions |
| 030 | Create AMD-only LXC container | Legacy - use script 031 instead |
| 031 | Create GPU-enabled LXC container | Main script - supports AMD and NVIDIA |
| 999 | Upgrade Proxmox to latest version | Maintenance - keeps system up to date |
| Script | Description | GPU Type |
|---|---|---|
install-docker-and-nvidia-drivers-in-lxc.sh |
Installs Docker, NVIDIA libraries, and NVIDIA Container Toolkit | NVIDIA |
install-docker-and-amd-drivers-in-lxc.sh |
Installs Docker and AMD ROCm libraries | AMD |
Note: These scripts are automatically available at /root/proxmox-setup-scripts/lxc/ inside containers created with script 031.
Run inference containers (Ollama, Stable Diffusion, etc.) with GPU acceleration in isolated LXC environments.
Use hardware-accelerated transcoding in Plex, Jellyfin, or FFmpeg containers.
Create isolated GPU-enabled development containers for CUDA/ROCm programming.
Assign different GPUs to different LXC containers for isolation and resource management.
Traditional GPU passthrough uses /dev/dri/card0, /dev/dri/card1, etc. These names can change between reboots depending on driver load order.
This project uses PCI paths like /dev/dri/by-path/pci-0000:c7:00.0-card which:
- โ Always point to the same physical GPU
- โ Survive reboots and driver updates
- โ Prevent GPU assignment conflicts
- โ Enable predictable multi-GPU setups
All containers created by these scripts are unprivileged (safer than privileged containers) but still have full GPU access through:
- Proper cgroup device permissions
- Bind-mounted GPU devices
- AppArmor profile adjustments
NVIDIA:
Uses NVIDIA Container Toolkit with --gpus all flag. Requires special runtime configuration for LXC environments (cgroup management disabled).
AMD:
Uses standard Docker device passthrough with --device=/dev/kfd --device=/dev/dri. No special toolkit required.
# Check devices from host:
pct exec <CONTAINER_ID> -- ls -la /dev/nvidia* # NVIDIA
pct exec <CONTAINER_ID> -- ls -la /dev/dri/ # Both
pct exec <CONTAINER_ID> -- ls -la /dev/kfd # AMDNVIDIA:
# Check NVIDIA runtime config:
pct exec <CONTAINER_ID> -- cat /etc/nvidia-container-runtime/config.toml | grep no-cgroups
# Should show: no-cgroups = true
# Check Docker daemon:
pct exec <CONTAINER_ID> -- cat /etc/docker/daemon.json
# Restart Docker:
pct exec <CONTAINER_ID> -- systemctl restart dockerAMD:
# Verify group membership:
pct exec <CONTAINER_ID> -- groups root
# Should include: video render
# Check ROCm installation:
pct exec <CONTAINER_ID> -- rocminfo
# May fail in LXC (this is normal), but Docker should still workRe-verify drivers:
cd /root/proxmox-setup-scripts/host
# NVIDIA:
./006 - verify-nvidia-drivers.sh
# AMD:
./005 - verify-amd-drivers.shCheck kernel modules:
lsmod | grep nvidia # NVIDIA
lsmod | grep amdgpu # AMDAll containers have the scripts directory mounted from the host at /root/proxmox-setup-scripts.
To update scripts in all containers at once:
cd /root/proxmox-setup-scripts
git pull
# All containers immediately see the updated scripts!This project builds upon knowledge from the community:
- Jocke's Blog: Plex GPU Transcoding in Docker on LXC on Proxmox
- Proxmox VE documentation
- NVIDIA Container Toolkit documentation
- AMD ROCm documentation
This project is provided as-is for educational and automation purposes. Use at your own risk.
Found a bug or have a suggestion? Please open an issue or submit a pull request on GitHub!
Repository: https://github.com/jammsen/proxmox-setup-scripts