Skip to main content
Community Scripts logo
Skip to Content
Tools & Add-onsAdd-ons

All Templates

Create an LXC container from any template that pveam offers, with fixed default settings.

all-templates.sh lists the templates from pveam available, downloads the one you pick and creates a container from it. It installs nothing into an existing container; it lives in tools/addon/ but works like a small container creator.

Run itOn the Proxmox VE host. require_pve_host exits with code 232 anywhere else
TargetA new container with the next free ID
TemplatesEverything in pveam available that matches the host architecture (dpkg --print-architecture)
Sourcetools/addon/all-templates.sh

Run

bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/addon/all-templates.sh)"

Prompts

DialogAnswer
This will allow for the creation of one of the many Template LXC Containers. Proceed?Yes continues, No exits
Select a Template LXC to create:Pick one template. Cancel exits; confirming without a selection shows No Template LXC Selected and exits
Which storage pool would you like to use for the container template?Shown only when more than one storage accepts vztmpl. With exactly one, it is used without asking
Which storage pool would you like to use for the container?Same rule for rootdir storage. Cancelling either storage dialog exits with code 254

What it creates

The container is created with these settings. None of them is asked for:

SettingValue
IDpvesh get /cluster/nextid, raised until no VM, container or LVM volume uses it
HostnameThe first two dash-separated parts of the template name
TypeUnprivileged, features keyctl=1,nesting=1
CPU / RAM / disk2 cores, 2048 MB, 8 GB root filesystem
Networketh0 on vmbr0, DHCP
Start on bootOff (-onboot 0)
Tagcommunity-script
Root passwordRandom, 16 characters

The password is printed at the end and appended to ~/<hostname>.creds on the Proxmox VE host. The container is started and its eth0 address is printed (five attempts, five seconds apart, otherwise NOT FOUND).

If the ping-instances.service unit is active, the script stops it during the run. At the end it starts the unit whenever /etc/systemd/system/ping-instances.service exists.

Update and remove

The script has neither. The result is a plain container: update it with its own package manager and remove it with pct destroy.

If a command fails after the ID was chosen, the script stops and destroys the half-created container before reporting the error.

Exit codes

CodeMeaning in this script
119 / 120No storage accepts container disks / container templates
222Template download failed
209pct create failed
254Storage dialog cancelled

Limits

  • No community-scripts application is installed, and no update command exists inside the container. You finish the setup in its console.
  • Bridge, resources and privilege level cannot be chosen in the script. Change them afterwards in the Proxmox VE interface.