Installs Proxmox Virtual Environment (Proxmox VE) with root filesystem on ZFS with native encryption.
This is a more automated way of following these guides:
- Debian Bookworm Root on ZFS (via OpenZFS Documentation)
- Install Proxmox VE on Debian 12 Bookworm (via Proxmox VE official wiki)
For details and choices made, see Opinionated: Specifics below.
See the above guides for Caution and System Requirements.
Download and boot the recommended Debian ISO. See Step 1: Prepare The Install Environment.
Only do the first item in the list (until Open a terminal).
Tip!
If you want to boot much faster, and get dropped into a shell immediately, you may want to use
debian-live-12.*-amd64-standard.iso! Download it from the same place as the other ISO:https://cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/
Log in as
user, with passwordlive, if asked.
Instead of editing files etc. manually, launch this automated script from the terminal:
curl -fsSL https://raw.githubusercontent.com/hugojosefson/proxmox-root-on-encrypted-zfs/main/src/cli.ts | sudo sh -s --Note: You may suffix any environment variable with
_FILEor_URLto load its contents from that file or url, respectively.
curl -fsSL https://raw.githubusercontent.com/hugojosefson/proxmox-root-on-encrypted-zfs/main/src/cli.ts | sh -s --
sudo NON_INTERACTIVE=true \
VERBOSE=true \
IP=192.168.122.253/24 \
FQDN=pve1.example.com \
DISKS=/dev/vda,/dev/vdb \
DISK_ENCRYPTION_PASSWORD="I can't believe it's not as secure as it should be" \
ROOT_PASSWORD="iamroot" \
ROOT_AUTHORIZED_KEYS_URL=https://github.com/hugojosefson.keys \
/tmp/deno-range*/bin/deno run --reload=https://raw.githubusercontent.com --unstable --allow-all \
https://raw.githubusercontent.com/hugojosefson/proxmox-root-on-encrypted-zfs/main/src/cli.ts \
debianIf you want to inspect the chroot:
sudo chroot /mnt /usr/bin/env bash --login
Reboot into the installed OS.
When you get to the initramfs prompt, run these two commands:
zpool import -fa
zpool export -aThen press CTRL+ALT+DELETE to reboot again, and you will be prompted for the zfs encryption key.
Login as root.
Continue manually at Install Proxmox VE Kernel etc in the Install Proxmox VE on Debian 12 Bookworm guide.
This is how this installer is more specific and/or different, compared to the guides linked above.
- Use src/commands/files/etc/apt/sources.list.
- Skip installing
openssh-serverin live boot environment during installation.
- Use environment variable
DISKSto specify which disks to use. - Optionally clear any existing ZFS pools and disks with the command
destroy-all-pools-and-disks. Make sure nothing is connected that you wish to keep! - No LUKS. ZFS native encryption. EFI 1GB partition, on all disks.
- Mirror over all disks. If only one disk, using
copies=2instead. zstdcompression for the root pool. ZFS native encryption. No LUKS. Mirror over all disks (orcopies=2if single disk).
- Skip separate dataset for
rpool/var/{games,mail,snap,www,lib/AccountsService},rpool/tmp. Set up tmpfs later.
- Configure hostname from first part of environment variable
FQDN. - Configure network via environment variable
IP. - Comment out
deb-srclines. - Pre-answer install questions with contents of src/commands/files/debconf-selections.
- No LUKS.
- Only install GRUB for UEFI, not for legacy (BIOS) booting.
- Set
rootpassword via environment variableROOT_PASSWORD. - Mount a tmpfs to
/tmp. - No
PermitRootLogin yes, but leave/etc/ssh/sshd_configdefault configured asPermitRootLogin prohibit-password. Pre-populate/root/.ssh/authorized_keysfrom environment variableROOT_AUTHORIZED_KEYS. - Install Dropbear for remote unlocking, but let it generate its own server keys. Useful to access it using a different hostname, so that the ssh client keeps track of the two different sets of host keys at different hostnames.
- Skip installing
popularity-contest.
- Make debugging GRUB easier.
- No BIOS, only UEFI booting.
- No snapshot. It's easy enough to re-run this installer :)
- Rebooting and re-running the installer, usually works to resolve any partition or pool mounting/unmounting issues.
- Create no extra user account.
- No BIOS, only UEFI booting. Mirror over all disks.
No swap.
- Skip
tasksel. - Disable log compression.
- No need to reboot here. Move on to installing Proxmox VE.
Skip the rest;
- We're not rebooting, and only
rootexists. - No snapshots to delete.
- Keep
rootpassword for now. - Keep ssh login as configured before.
- Leave GRUB config at full text.
- No LUKS.
- 1 IPv4 address, configured via environment variable
IP. - Hostname and FQDN from environment variable
FQDN.
- Put the
pve-no-subscriptionrepo in/etc/apt/sources.list.
-
Pre-answer install questions with contents of src/commands/files/debconf-selections.
-
Not installing the
proxmox-default-kernel,proxmox-vepackages, but leaving it up to manual installation and configuration.
See Install Proxmox VE Kernel and the following sections in the Install Proxmox VE on Debian 12 Bookworm guide.