Environment Variables

August 28, 2026 ยท View on GitHub

This page lists all the environment variables that can be used to configure the container.

An empty default means the variable is unset and its value is determined automatically when applicable.

๐Ÿ’ฟ Image

VariableDefaultDescription
BOOTalpineImage name, or a direct URL to an ISO or disk image.
CONNECTIONS4Number of connections used for image downloads.

๐Ÿง  CPU and Memory

VariableDefaultDescription
CPU_CORES2Number of virtual CPU cores, such as 4, half, or max.
CPU_MODELhostQEMU CPU model.
CPU_FLAGSAdditional QEMU CPU flags.
SMPCustom CPU topology. Determined from CPU_CORES when unset.
KVMYEnables KVM hardware acceleration.
VMXNExposes Intel VMX virtualization extensions to the guest.
HVYEnables Hyper-V enlightenments for Windows guests.
RAM_SIZE2GAmount of RAM assigned to the VM, such as 2G, 4G, half, or max.
RAM_BACKENDGuest RAM backing mechanism, set memfd for memfd-backed memory.
RAM_CHECKYChecks whether enough host memory is available before starting the VM.

๐Ÿ’พ Storage

VariableDefaultDescription
DISK_SIZE64GSize of the primary VM disk.
DISK_FMTrawDisk image format: raw or qcow2.
DISK_TYPEscsiDisk device type, such as ide, scsi, or blk.
DISK_CACHEnoneDisk cache mode, such as none or writeback.
DISK_IOnativeDisk I/O mode, such as native, threads, or io_uring.
DISK_DISCARDunmapDiscard/TRIM mode for the primary disk.
DISK_ROTATION1Rotation rate reported to the guest. Use 1 to identify the disk as an SSD.
DISK_FLAGSAdditional options used when creating qcow2 disks.
DISK_OPTIONSAdditional options appended to QEMU disk devices.
ALLOCATENPreallocates space for the primary disk.
STORAGE/storageStorage directory used for disks, firmware variables, and downloads.

๐ŸŒ Networking

VariableDefaultDescription
NETWORKNetwork mode, such as nat, user, or N to disable networking.
DHCPNEnables macvtap networking so the VM receives a DHCP address.
HOSTHostname assigned to the machine on the network.
IPOverrides the automatically selected guest IPv4 address.
MACGuest network adapter MAC address.
ADAPTERvirtio-net-pciQEMU network adapter model.
DEVeth0Container network interface used as the uplink.
MTUMTU assigned to the guest network interface.
MASK255.255.255.0IPv4 netmask for guest network.
TAPqemuTAP or macvtap interface name.
BRIDGEdockerBridge name used for NAT networking.
HOST_PORTSPorts excluded from guest forwarding.
USER_PORTSAdditional ports to forward to the VM when using user-mode networking.
DNSMASQ_OPTSAdditional options passed to dnsmasq.
DNSMASQ_DEBUGNEnables dnsmasq debug output.
DNSMASQ_DISABLENDisables the internal dnsmasq resolver.
PASST_OPTSAdditional options passed to passt.
PASST_DEBUGNEnables passt debug output.

๐Ÿ–ฅ๏ธ Display

VariableDefaultDescription
DISPLAYwebDisplay backend, such as web, vnc, disabled, or none.
VGAvirtioQEMU video adapter model.
GPUNEnables OpenGL/Vulkan GPU acceleration and DRM native context.
VRAM_SIZE4GVirtual GPU memory budget.
RENDERNODE/dev/dri/renderD128Render node used for GPU acceleration.

๐ŸŒ Web UI

VariableDefaultDescription
WEBYEnables the web interface.
WEB_PORT8006Port for the web interface.
VNC_PORT5900Port for the VNC server.
LOSSYNEnables lossy VNC compression to reduce bandwidth usage.
AUDIONStreams guest audio to the web viewer.
PROTECTNEnables password protection for the web interface.

โš™๏ธ System

VariableDefaultDescription
MACHINEq35QEMU machine type.
PCI_BUSpcie.0Overrides the PCI bus used for attached devices.
UUIDUUID assigned to the VM.
RNGYAdds the Virtio RNG device to the machine.
HPETNHPET timer setting.
VMPORTNVMware port setting.
MOUSEusb-tabletPointing device used by the machine.
SOUNDintel-hdaAudio device used when AUDIO=Y.
SM_BIOSAdditional arguments passed to QEMUโ€™s -smbios option.
ARGUMENTSAdditional raw arguments appended to the QEMU command line.

๐Ÿš€ Boot

VariableDefaultDescription
BOOT_MODEuefiBoot configuration, such as uefi, secure, or legacy.
BOOT_INDEX9Boot priority index for the installation media.
MEDIA_TYPEDevice type used for installation media.
USBqemu-xhciQEMU USB controller configuration.
BIOSCustom firmware file.
TPMNEnables the TPM emulator, usually set by BOOT_MODE.
SMMNEnables System Management Mode, usually set by BOOT_MODE.
LOGOYEnables the custom boot logo.
CLEARNResets the NVRAM variables on the next boot.

๐ŸŽˆ Memory Ballooning

Also see Dynamic memory allocation for usage instructions and important caveats.

VariableDefaultDescription
BALLOONINGNEnables dynamic memory ballooning.
BALLOONING_MIN_MEM33%Minimum amount of memory retained by the VM.
BALLOONING_RAM_THRESHOLD80.0Host RAM usage percentage at which ballooning begins adjusting memory.
BALLOONING_RAM_THRESHOLD_HARD90.0Host RAM usage percentage at which ballooning becomes more aggressive.
BALLOONING_PSI_PRESSURE10.0PSI memory pressure level at which ballooning becomes more aggressive.
BALLOONING_PSI_PRESSURE_MAX50.0PSI memory pressure level at which ballooning reaches its strongest response.
BALLOONING_HYSTERESIS128MMinimum memory change before the balloon target is updated.
BALLOONING_KP0.5Proportional gain used by the ballooning controller.
BALLOONING_KI0.05Integral gain used by the ballooning controller.
BALLOONING_INTERVAL5Polling interval in seconds.
BALLOONING_DEBUGNEnables debug output for the ballooning monitor.

๐Ÿ”Œ Shutdown

VariableDefaultDescription
SHUTDOWNYEnables graceful ACPI shutdown.
TIMEOUT13Maximum time, in seconds, to wait before forcing the VM to stop.

๐Ÿž Debugging

VariableDefaultDescription
DEBUGNEnables verbose debug output.
TRACENEnables shell command tracing.
SERIALmon:stdioQEMU serial device, such as /storage/serial.sock or 4444.
MONITORQEMU monitor, such as /storage/monitor.sock or 4444.
QMPQEMU Machine Protocol, such as /storage/qmp.sock or 4444.
QGAQEMU Guest Agent, such as /storage/qga.sock or 4444.