pct-create
creates a new LXC container in Proxmox VE from a template image
TLDR
Create container with disk size
$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4
Create with memory limit$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --memory 8192
Create with hostname and password$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --hostname name --password pass
Create with network$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --net0 name=eth0,bridge=vmbr0,ip=dhcp
Create unprivileged container with CPU and swap limits$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --unprivileged 1 --cores 2 --swap 512
Create and start immediately$ pct create 100 local:vztmpl/distro.tar.zst --rootfs local-lvm:4 --start
SYNOPSIS
pct create vmid template [OPTIONS]
DESCRIPTION
pct create creates a new LXC container in Proxmox VE from a template image. It configures storage, networking, resources, and other container properties during creation.
PARAMETERS
vmid
The numeric ID for the new containertemplate
Path to the container template (e.g., local:vztmpl/distro.tar.zst)--rootfs storage:size
Root filesystem storage and size in GB--memory megabytes
Memory limit in MB--hostname name
Container hostname--password password
Root password for the container--netN config
Network interface configuration--cores number
Number of CPU cores assigned to the container--swap megabytes
Swap memory limit in MB (default: 512)--unprivileged 0|1
Create as unprivileged container (1, recommended for security)--ssh-public-keys filepath
SSH public keys for root user authentication--features list
Enable features like nesting, keyctl, fuse, mknod--start
Start container after creation
CAVEATS
Templates must be downloaded or uploaded to Proxmox storage first. The container ID must be unique across the cluster. Enable nesting for containers that run Docker or other containers inside.
HISTORY
pct create is part of the Proxmox VE virtualization platform for managing LXC containers.
SEE ALSO
pct(1), pct-clone(1), pct-enter(1), pct-destroy(1)
