Skip to main content
Community Scripts logo
Guides

Configuration reference

Every var_* setting a container script accepts, its values, its default, and where it may be set.

A container script is configured through var_* shell variables and one selector, mode. This page lists all of them as the engine reads them in ui/defaults.func, ui/menu.func and pve/backend.func.

VM scripts do not read var_* or mode; they take VM_* variables. See Virtual machines.

Where a value can come from

SourceHowRead when
Command linevar_cpu=2 bash -c "$(curl ...)", or export before the commandAlways
default.varsOne var_name=value per line, for every script on the hostUser Defaults (mode=mydefaults)
defaults/<app>.varsSame format, for one appApp Defaults (mode=appdefaults)
The scriptvar_cpu="${var_cpu:-2}" at the top of ct/<app>.shAlways, when nothing set it earlier

Paths, precedence and the file format are described in Defaults and install modes.

The engine sorts var_* names into four groups, and the group decides which files may hold them:

GroupIn default.varsIn defaults/<app>.varsCommand line
VAR_WHITELIST (engine settings)yesyesyes
VAR_RESERVEDno, skipped with a warningno, skipped with a warningyes
VAR_PER_RUNno, skipped silentlyyes, when written by handyes
Any other var_ name in lower case, digits and _ (an app's own setting)no, skipped silentlyyesyes

mode

install_script takes the menu choice from mode. Without it the menu opens. The values are matched exactly as written here; Default or Advanced in mixed case is an Invalid option and exits 1.

mode=Same as menu entryWhat it does
default, DEFAULT, 1Default InstallScript defaults plus var_* from the command line. No file is loaded.
advanced, ADVANCED, 2Advanced InstallOpens the wizard.
mydefaults, MYDEFAULTS, userdefaults, USERDEFAULTS, 3User DefaultsLoads default.vars.
appdefaults, APPDEFAULTSApp Defaults for the appLoads defaults/<app>.vars. Exits 1 with No App Defaults available when the file is missing.
settings, SETTINGSSettingsOpens the settings menu, then the main menu.
generated, GENERATEDnoneLike default, but skips the storage step that reads default.vars. This is what the generator emits.

The numbers 4 and 5 depend on the host: with an app defaults file present 4 is App Defaults and 5 is Settings, without one 4 is Settings. Use the names.

Engine settings (VAR_WHITELIST)

Accepted on the command line, in default.vars and in an app file. The "checked in files" column is what load_vars_file enforces; a value that fails is skipped with a warning and the run continues. Values from the command line are not checked there. Before pct create, validate_ct_settings checks the final values from every source and exits 208 with a list of what is wrong.

Container

VariableMeaningChecked in filesDefault
var_unprivileged1 unprivileged, 0 privileged0 or 11
var_osTemplate family, e.g. debian, ubuntu, alpine. Upper case and spaces are removed with a warning.not checkedset by the script; debian if empty
var_versionOS release, e.g. 13, 24.04, 3.24. A release the host cannot provide is replaced by the nearest one, after a dialog when a terminal is attached.not checkedset by the script; 12 if empty
var_hostnameHostname or FQDN. Lower-cased, spaces removed. An invalid name falls back to the app name with a warning.labels of a-z, 0-9, -, max 63 each, 253 totalapp name in lower case without spaces
var_tagsTags separated by ;. community-script is always added.letters, digits, -, _, ;set by the script
var_protectionProxmox protection flag against removalyes or nono
var_timezoneContainer timezone. host and every Etc/* zone mean the host's zone.empty, host, UTC, or a zone or alias known to the host's zoneinfohost timezone
var_cmodeConsole mode passed to pct as -cmodeshell, console or ttyempty (Proxmox default, tty)
var_verboseShow full command output during the installyes or nono

Resources

VariableMeaningChecked in filesDefault
var_cpuCPU coreswhole number 1-128set by the script; 1 if empty
var_ramMemory in MiBwhole number, at least 256set by the script; 1024 if empty
var_diskRoot disk in GBwhole number, at least 1set by the script; 4 if empty

From a file these three can only raise what the script asks for. On the command line they replace the script's value, also downwards: ct/jellyfin.sh declares var_ram="${var_ram:-2048}", so var_ram=1024 gives the container 1024 MiB. For every source validate_ct_settings refuses less than 128 MiB of RAM.

Network

VariableMeaningChecked in filesDefault
var_brgBridge for net0. A bridge that does not exist on the node ends the run with exit 208.must exist (ip link show)vmbr0
var_sdn_vnetSDN vnet to attach instead of the bridgemust be a configured vnetempty
var_netdhcp, an address with prefix (192.168.1.50/24), or a range (192.168.1.100/24-192.168.1.200/24). From a range the first address that does not answer a ping is used; with none free the container falls back to DHCP.one of the three formsdhcp
var_gatewayIPv4 gateway. Dropped with a warning when var_net is dhcp or the gateway is outside the subnet.IPv4 address without prefixempty
var_ipv6_methodauto (SLAAC), dhcp, static or none. With static on the command line the address comes from IPV6_ADDR and the gateway from IPV6_GATE.auto, dhcp, static, nonenone
var_macMAC addressXX:XX:XX:XX:XX:XXempty (generated by Proxmox)
var_mtuInterface MTU576-65520empty
var_vlanVLAN tag1-4094empty
var_nsDNS servers, IP addresses separated by spaces or commasnot checked in files; checked before pct createempty (host setting)
var_searchdomainDNS search domainsnot checked in files; checked before pct createempty (host setting)

Storage

VariableMeaningChecked in filesDefault
var_container_storageStorage for the root disk. Must hold content rootdir.not checkednone; chosen or asked, see Unattended deployments
var_template_storageStorage for the template. Must hold content vztmpl. Not used on Incus.not checkednone; chosen or asked

A name that no longer holds the content is not fatal: the storage dialog opens instead.

Access

VariableMeaningChecked in filesDefault
var_pwRoot password. Leading - characters are removed. Empty means no password: the installer deletes it and logs root in automatically on the console. A password shorter than 5 characters exits 208.not checkedempty
var_sshAllow root login over SSHyes or nono
var_ssh_authorized_keyOne public key line, installed into /root/.ssh/authorized_keys when var_ssh=yesnot checkedempty
var_github_tokenExported as GITHUB_TOKEN when that is not already set, to avoid GitHub API rate limitsnot checkedempty

Features

VariableMeaningChecked in filesDefault
var_nestingnesting=1 feature0 or 11
var_keyctlRecorded and shown in the summary. On Proxmox VE build_container adds keyctl=1 to every unprivileged container and does not read this value.0 or 10
var_mknodmknod=1 feature0 or 10
var_mount_fsFilesystem types the container may mount, e.g. nfs,cifs. Not paths.comma-separated names of letters and digitsempty
var_fusefuse=1 featureyes or nono
var_tunPass /dev/net/tun into the containeryes or nono
var_gpuDetect and pass through GPUsyes or nono; media scripts such as ct/jellyfin.sh set yes

Proxy, cache and hooks

VariableMeaningChecked in filesDefault
var_apt_cacheryes to use an apt-cacher-ng proxynot checkedempty
var_apt_cacher_ipHost, host:port or URL of the cache. Port 3142 is assumed for a bare host. An unreachable cache is switched off for the run.host or http(s):// URLempty
var_http_proxyHTTP/HTTPS proxy for the installhttp:// or https:// URLempty
var_http_no_proxyNO_PROXY listcomma-separated hostsempty
var_inherit_host_caCopy the host's /usr/local/share/ca-certificates/*.crt into the container. yes copies; no and auto do not.yes, no or autono
var_post_installAbsolute path of a script on the host. Runs as root on the host after the install, with APP, NSAPP, CTID, IP, HN, STORAGE, BRG in its environment. Output goes to /var/log/community-scripts/post-install-<CTID>.log.absolute path without ;, $(, backtick, &&, ||empty

Command line only (VAR_RESERVED)

A line for one of these in any .vars file is skipped with <name> in <file> is ignored: set it on the command line of the run that needs it.

VariableMeaningValues
var_ctidContainer ID. An ID already in use is replaced by the next free one with a warning.number from 100 up, no leading zero; default is the next free ID
var_arm64Whether the script runs on arm64 hosts. Declared by each script; on the command line it overrides the script. Unset on an arm64 host the script asks, and without a terminal exits 106.yes, no
var_external_installerAnswers the confirmation before a third-party installer runs (confirm_external_installer, e.g. install/casaos-install.sh). Any other value declines and exits 254.yes, y, true
var_ignore_disableInstall or update a script that is marked disabled1, yes, true, on
var_ignore_os_mismatchUpdate although the container OS differs from the script's1, yes, true, on
var_ignore_breaking_changesSkip the breaking-change check on update1, yes, true, on
var_force_breaking_updateContinue an update past an advisory that blocks it1, yes, true, on
var_ipv6_staticCopied to IPV6_STATIC by base_settings. build_container builds a static IPv6 from IPV6_ADDR and IPV6_GATE, so set those.address with prefix
var_testurlFeedback link of a script under test. Declared by the script.plain https:// URL, at most 200 characters
var_installName of the install script. variables always sets it to the app name plus -install.not user-settable
var_bridgeNetwork of an Incus VM (incus/vm-core.func). Container scripts use var_brg.network name

Per run (VAR_PER_RUN)

Not read from default.vars, and never written when the wizard saves app defaults. An app file loads them only if you add the line yourself.

VariableMeaningValues
var_unattendedMakes prompt_confirm and the other prompt helpers take their default instead of asking. See Unattended deployments.yes, true, 1
var_full_verbosePrint debug messages with timestamps1
var_appversionInstall this release of the script's own app instead of the latest (lib/forge.func)a release tag of the app

An app's own settings

Any other var_ name belongs to one script, which declares and exports it. ct/docker.sh has var_docker_socket, var_docker_compose and var_docker_lxcfs; the installer asks only when they are empty:

var_docker_socket=n var_docker_compose=y \
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/docker.sh)"

These load from defaults/<app>.vars and from the command line, not from default.vars. The script page and the generator list the ones a script has.

On Incus the container path additionally reads var_profile (Incus profile, default default), var_extra_disk (source of an extra disk device) and var_extra_disk_path (its mount point, default /mnt/extra).

Examples

Override a few values for one run and keep the menu:

var_cpu=2 var_ram=2048 var_disk=12 \
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"

Choose Default Install to use them as they are, or Advanced Install to start the wizard from them.

The same without the menu:

mode=default var_cpu=2 var_ram=2048 var_disk=12 \
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"

A static address and a fixed ID:

mode=default var_ctid=120 var_hostname=debian-test \
var_net=192.168.1.50/24 var_gateway=192.168.1.1 var_ns=192.168.1.1 \
  bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/debian.sh)"

A misspelled variable name is not an error: nothing reads it, and the script default applies. Compare the summary the script prints before it creates the container with what you set.