Where Does LXC Store Containers?
Where LXC keeps container configs and root filesystems on Linux hosts, system-wide and per user.
Last updated
LXC splits containers by privilege. System containers live under /var/lib/lxc with one folder per name holding config and rootfs. Unprivileged containers live per user under ~/.local/share/lxc instead.
Config filenames are literal: each container dir holds a config file plus its rootfs tree. Snap installs remap the system root under ~/snap/lxd or /var/snap, so check packaging when the default path looks empty.
Where LXC stores this, by platform
/var/lib/lxc/
One folder per system container (config + rootfs/). Unprivileged containers use ~/.local/share/lxc/<name>/. Snap-based LXD remaps these roots; check snap paths then.
Frequently asked questions
How do I migrate a container?
Copy /var/lib/lxc/<name>/ (config plus rootfs) to the same path on the target host with matching LXC version. Unprivileged containers live under ~/.local/share/lxc/ instead; move those per user. Re-register networks if subnets collide.
System versus unprivileged paths?
System containers use /var/lib/lxc/<name>/config with rootfs beside it. Unprivileged ones use ~/.local/share/lxc/<name>/. Check lxc-ls and lxc-info to see which scope a container belongs to before digging.
Notice an outdated path? Let us know.