Skip to content

Instantly share code, notes, and snippets.

@aniongithub
Last active July 21, 2025 23:10
Show Gist options
  • Save aniongithub/9c437d81d8ac55982452fe8fcfaea662 to your computer and use it in GitHub Desktop.
Save aniongithub/9c437d81d8ac55982452fe8fcfaea662 to your computer and use it in GitHub Desktop.
Proxmox no subscription setup
#!/bin/bash
set -e
echo "πŸ”§ Disabling enterprise repo..."
if [ -f /etc/apt/sources.list.d/pve-enterprise.list ]; then
sed -i 's|^deb https://enterprise.proxmox.com|# deb https://enterprise.proxmox.com|' /etc/apt/sources.list.d/pve-enterprise.list
fi
echo "πŸ”§ Disabling Ceph enterprise repo (if exists)..."
if [ -f /etc/apt/sources.list.d/ceph.list ]; then
sed -i 's|^deb https://enterprise.proxmox.com|# deb https://enterprise.proxmox.com|' /etc/apt/sources.list.d/ceph.list
fi
echo "πŸ”§ Adding no-subscription repo..."
if ! grep -q "pve-no-subscription" /etc/apt/sources.list; then
echo "deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription" >> /etc/apt/sources.list
fi
echo "🧹 Cleaning APT cache..."
apt clean
rm -rf /var/lib/apt/lists/*
echo "πŸ”„ Updating package lists..."
apt update
echo "πŸ“‘ Installing avahi-daemon (optional for mDNS)..."
apt install -y avahi-daemon
echo "⚑ Setting CPU governor to powersave (if available)..."
for cpu_dir in /sys/devices/system/cpu/cpu[0-9]*; do
gov_file="$cpu_dir/cpufreq/scaling_governor"
if [ -f "$gov_file" ]; then
current=$(cat "$gov_file")
if [ "$current" != "powersave" ]; then
echo "powersave" > "$gov_file"
echo " βœ” Set $gov_file to powersave"
else
echo " βœ“ $gov_file already set to powersave"
fi
fi
done
echo "πŸŽ‰ Setup complete!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment