Home About Me

Switching Proxmox VE 8 to Faster USTC Mirrors

Proxmox VE 8.0 has just landed, and after upgrading a test server right away, one problem showed up immediately: the official Proxmox repositories are hosted overseas, so package updates can be painfully slow.

A practical workaround is to switch PVE 8 to the University of Science and Technology of China (USTC) mirrors, which already sync the Proxmox VE 8 packages. After replacing the default repositories, update speeds improve noticeably.

The following changes cover the Proxmox repository, the Debian base repositories, the Ceph repository, and the container template download source.

# 将此文件的中的所有内容注释掉
nano /etc/apt/sources.list.d/pve-enterprise.list

# 下载中科大的GPG KEY
wget https://mirrors.ustc.edu.cn/proxmox/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg

# 使用Proxmox非企业版源
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-no-subscription.list

# 将Debian官方源替换为中科大源
sed -i 's|^deb http://ftp.debian.org|deb https://mirrors.ustc.edu.cn|g' /etc/apt/sources.list
sed -i 's|^deb http://security.debian.org|deb https://mirrors.ustc.edu.cn/debian-security|g' /etc/apt/sources.list

# 替换Ceph源
echo "deb https://mirrors.ustc.edu.cn/proxmox/debian/ceph-quincy bookworm no-subscription" > /etc/apt/sources.list.d/ceph.list

# 替换CT镜像下载源
sed -i 's|http://download.proxmox.com|https://mirrors.ustc.edu.cn/proxmox|g' /usr/share/perl5/PVE/APLInfo.pm

In short, this setup does four things:

  • disables the enterprise repository entry
  • adds the USTC GPG key
  • switches Proxmox VE to the pve-no-subscription mirror
  • replaces the default Debian, Ceph, and CT template download sources with USTC mirrors

Once these changes are in place, PVE 8 updates should download much faster than with the default upstream repositories.