Preface
Maintenance status
Since 2024-03-01 this project has been in limited maintenance, focusing on core installation, uninstallation, IPv6, port mapping and unattended-mode issues. Existing Ubuntu hosts can continue using the scripts. For non-Ubuntu hosts, newer features or long-term maintenance, use oneclickvirt/incus. Background.
This page covers the standard (non-customized) workflow. Custom sections are documented separately.
If your host has no IPv6 subnet but you want to assign IPv6 addresses to containers, check the Customize section in the LXD module for Attach a free IPv6 address segment to the host, then attach an IPv6 subnet before installation.
Feel free to give the project a Star for free support!-->https://github.com/oneclickvirt/lxd
Requirements
Hardware requirements.
- System: Ubuntu 18+ (recommended), Debian 8+ (Incus more recommended)
- Virtualization: KVM, VMWARE recommended.
- Memory: At least 512MB of RAM
- Hard disk: hard disk (system disk) at least 10G
- Network: dedicated IPv4 address recommended; IPv6 optional; outbound Internet access required to download scripts.
PS: If the hardware is very good and has a lot of resources, you can use PVE to batch open KVM virtualized VMs Jump
PS: If the hardware resources are even worse, virtualization is not supported, you can use the docker version, the adaption surface is wider Jump
Project Features
This set of script development using Ubuntu20, Ubuntu other long-term maintenance version should also be no problem, automatically switch to another storage type if btrfs not supported
Set up both TCP and UDP forwarding, in addition to SSH ports, other mapping intranet and extranet ports are the same.
Support for docker nested virtualization of open LXC containers has been set up, and the default normal version and pure probe version use the debian12 system.
lxcfs has been set to be enabled by default, so that querying resources within a container uses the configured view rather than the host's view
Includes default restrictions for abuse-prone toolchains and TCP/UDP ports (3389, 8888, 54321, 65432) to reduce scanning/bruteforce misuse risk.
Supports one-click IPv6 configuration for LXC containers when the host has a valid IPv6 subnet; subnet size is auto-detected.
Ensure that the disk you want to open is the default system disk (sda or sda1) and not the mounted disk (sdb and so on), if you are not sure, use
fdisk -landdfto check.When using another disk, plan the LXD storage pool; see storage pools.
One-click scripts support custom restrictions on all content, the normal version supports multiple runs of the batch generation does not overwrite the previously generated configuration
Detecting the environment
Before running subsequent scripts, execute this check to confirm the host meets requirements.
Command:
bash <(curl -sSLk https://raw.githubusercontent.com/oneclickvirt/lxd/main/scripts/pre_check.sh)Documentation and images
Use this section's installation, container, VM and troubleshooting chapters for the full workflow. Project-maintained container images are in oneclickvirt/lxd_images. Changes are recorded in the changelog.
