Skip to main content

Proxmox VE 9 & Debian 13 Air-Gapped Update Guide

This guide describes how to set up an intermediate APT cache on an internet-connected machine (via VirtualBox) and transfer that cache to an air-gapped environment to update Proxmox VE 9 installations.

Phase 1: VirtualBox Setup (Internet-Facing Host)

On your internet-connected machine, you need two virtual entities: the Cache Server and a Template Proxmox VM to "pull" the initial data.

1.1 Debian 13 (Trixie) Cache VM

  1. Create VM: 2 vCPUs, 2GB RAM, 50GB+ Disk (depending on how many packages you cache).
  2. Networking: Use Bridged Adapter to ensure it has its own IP on your local network.
  3. OS Installation: Install a minimal Debian 13 (Netinst). Ensure SSH server and Standard system utilities are selected.

I did set it up with the hostname prox-cache in my lan with the domain lan.zn80.net with the IP 192.168.0.240/24.

Install onlz WebServer, SSH Server and Standard System Utilities.

1.2 Proxmox VE 9 "Feeder" VM

To populate the cache, you need a machine that requests the specific Proxmox 9 packages.

  1. Create VM: 2 vCPUs, 4GB RAM, 20GB Disk.
  2. OS Installation: Install Proxmox VE 9 (or Debian 13 + PVE 9 packages).
  3. Networking: Ensure it can reach the Debian 13 Cache VM.

Id did set it up with the hostname prox-feeder in my lan with the domain lan.zn80.net with the IP 192.168.0.241/24.

After installing the proxmox feeder vm we need to configure the in the next steps. Do not update the initial installation yet.

1.3 Screenshots of settings


Phase 2: Setting up APT-Cacher-NG (Cache Server)

On the Debian 13 VM, install and configure the caching service.

### Install APT-Cacher-NG
```bash
sudo apt update
sudo apt install apt-cacher-ng -y
```

### Configuration
Edit the configuration to ensure it allows Proxmox repositories:
```bash
sudo nano /etc/apt-cacher-ng/acng.conf
```
Ensure the following line is active (usually default) to allow HTTPS tunneling if necessary, though standard HTTP remapping is preferred:
`PassThroughPattern: .*` (Use with caution in production, but necessary for complex repo structures).

### Restart Service
```bash
sudo systemctl restart apt-cacher-ng
```

Phase 3: Populating the Cache

On your Proxmox VE 9 "Feeder" VM, tell APT to use the Cache Server.

  1. Create a proxy configuration file:
echo 'Acquire::http::Proxy "http://<IP-OF-CACHE-SERVER>:3142";' | sudo tee /etc/apt/apt.conf.d/00proxy
  1. Run the updates to pull data into the cache:
apt update
apt dist-upgrade -y
```
Now, all downloaded `.deb` files are stored on the Debian 13 Cache VM in `/var/cache/apt-cacher-ng`.

Phase 4: Exporting the Cache to the Air-Gapped System

Since the target system is air-gapped, we must physically move the data.

4.1 On the Internet-Connected Cache VM:

Compress the cache data:

sudo tar -cvzf pve-cache-export.tar.gz /var/cache/apt-cacher-ng

Copy pve-cache-export.tar.gz to a USB drive or mobile storage.

4.2 On the Air-Gapped Target System:

You need a machine (or LXC container) in the air-gapped network to act as the Local Cache Server.

  1. Install a Debian 13 LXC or VM on your air-gapped Proxmox.
  2. Install apt-cacher-ng (you might need to install this manually via .deb files once if the container isn't prepared).
  3. Import the data:
# Extract the data to the correct location
sudo tar -xvzf /path/to/usb/pve-cache-export.tar.gz -C /
sudo chown -R apt-cacher-ng:apt-cacher-ng /var/cache/apt-cacher-ng
sudo systemctl restart apt-cacher-ng

Phase 5: Configuring Air-Gapped Proxmox Clients

Now, configure all your air-gapped Proxmox 9 nodes to use the internal cache server.

5.1 Set the Proxy

Edit /etc/apt/apt.conf.d/00proxy on every node:

```text
Acquire::http::Proxy "http://<INTERNAL-CACHE-LXC-IP>:3142";
```

5.2 Update Repository Sources

Ensure your /etc/apt/sources.list and /etc/apt/sources.list.d/pve-enterprise.list point to standard URLs. Even though there is no internet, apt-cacher-ng will trick APT into thinking it's talking to the real servers, while actually serving the files from the local disk.

Example for Proxmox 9 (No-Subscription):

deb [http://download.proxmox.com/debian/pve](http://download.proxmox.com/debian/pve) trixie pve-no-subscription

5.3 Run Update

apt update
apt dist-upgrade

Troubleshooting & Maintenance

  • Maintenance: To update the air-gapped system again, repeat Phase 3 (on the internet host) and Phase 4 (transfer).
  • Disk Space: Monitor /var/cache/apt-cacher-ng. You can use the web interface at http://<cache-ip>:3142/acng-report.html to manage the expiration of old packages.

Soll ich dir noch spezifische Konfigurationsparameter für die Proxmox Enterprise Repositories heraussuchen, falls du diese über den Cache spiegeln möchtest?