Container scripts automate the creation and configuration of LXC containers on Proxmox VE. These scripts handle everything from container creation to application installation.
Running Container Scripts
Access Proxmox Shell
Open the Proxmox VE web interface and navigate to your node’s Shell.
Execute the Script
Run the script using bash with the curl command: bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/adguard.sh)"
Or using the shorter helper.sh wrapper: bash -c "$( wget -qO - https://helper.sh)" -- -app adguard
Configure Container Options
The script will prompt you to configure:
Container ID
Hostname
Disk size
CPU cores
RAM allocation
Network settings (bridge, VLAN tag)
Privileged/Unprivileged mode
Wait for Completion
The script will automatically:
Download the container template
Create the LXC container
Install the application
Configure services
Display access information
Available Container Scripts
Container scripts are located in the ct/ directory. Popular examples include:
Docker
Home Assistant
Nginx Proxy Manager
Plex
bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
Customizing with Environment Variables
You can customize container creation by setting environment variables before running the script:
# Set custom resources and settings
export var_cpu = "4"
export var_ram = "4096"
export var_disk = "20"
export var_os = "debian"
export var_version = "13"
# Run the script
bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
Common Environment Variables
Variable Description Default Example var_cpuNumber of CPU cores 1, 2, 4var_ramRAM in MB 512, 2048, 4096var_diskDisk size in GB 2, 4, 10var_osOperating system debian, ubuntuvar_versionOS version 13, 24var_unprivilegedUnprivileged container 1 (yes), 0 (no)var_tagsContainer tags docker, media
Each script has different default values based on the application’s requirements. Check the script header for defaults.
Script Structure
All container scripts follow a standard structure:
#!/usr/bin/env bash
source <( curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Application metadata
APP = "Application Name"
var_tags = "${ var_tags :- tag }"
var_cpu = "${ var_cpu :- 2 }"
var_ram = "${ var_ram :- 2048 }"
var_disk = "${ var_disk :- 4 }"
var_os = "${ var_os :- debian }"
var_version = "${ var_version :- 13 }"
var_unprivileged = "${ var_unprivileged :- 1 }"
header_info " $APP "
variables
color
catch_errors
function update_script () {
# Update logic for the application
}
start
build_container
description
The build.func file provides common functions like build_container, header_info, and error handling.
Interactive vs Non-Interactive Mode
Interactive Mode (Default)
Run the script normally to be prompted for each configuration option:
bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
Non-Interactive Mode
Set VERBOSE="no" and provide all variables to run without prompts:
export VERBOSE = "no"
export var_cpu = "2"
export var_ram = "2048"
export var_disk = "10"
bash -c "$( wget -qLO - https://github.com/community-scripts/ProxmoxVE/raw/main/ct/docker.sh)"
Non-interactive mode requires all necessary variables to be set. Missing variables may cause the script to fail.
Finding Container Scripts
To see all available container scripts:
# List all container scripts
ls /path/to/ProxmoxVE/ct/
# Or browse on GitHub
# https://github.com/community-scripts/ProxmoxVE/tree/main/ct
Each script is named after the application it installs (e.g., docker.sh, adguard.sh, plex.sh).
Next Steps
After creating a container:
Access the application using the provided URL
Use the update script to keep the application updated
Add management tools like Netdata for monitoring
Configure backups in Proxmox VE