What is LXD?¶
LXD is a next generation system container and virtual machine manager. It offers a unified user experience around full Linux systems running inside containers or virtual machines.
LXD is image based and provides images for a wide number of Linux distributions. It provides flexibility and scalability for various use cases, with support for different storage backends and network types and the option to install on hardware ranging from an individual laptop or cloud instance to a full server rack.
When using LXD, you can manage your instances (containers and VMs) with a simple command line tool, directly through the REST API or by using third-party tools and integrations. LXD implements a single REST API for both local and remote access.
The LXD project was founded and is currently led by Canonical Ltd with contributions from a range of other companies and individual contributors.
To get a better idea of what LXD is and what it does, you can try it online!
Then if you want to run it locally, take a look at our getting started guide. The following clip gives a quick and easy introduction for standard use cases:
You can find a series of howtos and tutorials on YouTube:
Containers and virtual machines¶
LXD provides support for system containers and virtual machines.
When running a system container, LXD simulates a virtual version of a full operating system. To do this, it uses the functionality provided by the kernel running on the host system.
When running a virtual machine, LXD uses the hardware of the host system, but the kernel is provided by the virtual machine. Therefore, virtual machines can be used to run, for example, a different operating system.
Application containers vs. system containers¶
Application containers (as provided by, for example, Docker or Kubernetes) package a single process or application. System containers, on the other hand, simulate a full operating system and let you run multiple processes at the same time.
Therefore, application containers are suitable to provide separate components, while system containers provide a full solution of libraries, applications, databases and so on. In addition, you can use system containers to create different user spaces and isolate all processes belonging to each user space, which is not what application containers are intended for.
Virtual machines vs. system containers¶
Virtual machines emulate a physical machine, using the hardware of the host system from a full and completely isolated operating system. System containers, on the other hand, use the OS kernel of the host system instead of creating their own environment. If you run several system containers, they all share the same kernel, which makes them faster and more light-weight than virtual machines.
With LXD, you can create both system containers and virtual machines. You should use a system container to leverage the smaller size and increased performance if all functionality you require is compatible with the kernel of your host operating system. If you need functionality that is not supported by the OS kernel of your host system or you want to run a completely different OS, use a virtual machine.
Some of the biggest features of LXD are:
- Core API
- Secure by design (through unprivileged containers, resource restrictions, authentication, ...)
- Intuitive (with a simple, clear API and crisp command line experience)
- Scalable (from containers on your laptop to clusters of thousands of compute nodes)
- Event based (providing logging, operation, and lifecycle events)
- Remote usage (same API used for local and network access)
- Project support (as a way to compartmentalize sets of images and profiles)
- Instances and profiles
- Backup and export
- Multiple storage backends (with configurable storage pools and storage volumes)
- Network management (including bridge creation and configuration, cross-host tunnels, ...)
- Advanced resource control (CPU, memory, network I/O, block I/O, disk usage and kernel resources)
- Device passthrough (USB, GPU, unix character and block devices, NICs, disks and paths)
LXD works on any recent Linux distribution. LXD upstream directly maintains the Ubuntu packages and also publishes a snap package which can be used with most of the popular Linux distributions.
In addition, the LXD client is available for Windows and macOS. You can use the client to connect to a LXD server running on a Linux machine.
More details can be found on our getting started page.
LXD can also be used with other platforms and tools, like Ansible, Juju, Terraform and more.
See the Third-party integrations page for details.
LXD has two kind of releases:
- LTS releases
- Feature releases
The current LTS release is LXD 4.0, which is supported until June 2025 and gets frequent bugfix and security updates but does not receive any feature additions.
Feature releases are pushed out every month or so and contain new features as well as bugfixes. The normal support length for those releases is of about a month, or until the next release comes out. Some Linux distributions might offer longer support for particular feature releases that they decided to ship.
Commercial support for LXD on Ubuntu LTS releases can be obtained from Canonical Ltd.
Relationship with LXC¶
LXD isn't a rewrite of LXC, in fact it's building on top of LXC to provide a new, better user experience. Under the hood, LXD uses LXC through liblxc and its Go binding to create and manage the containers.
It's basically an alternative to LXC's tools and distribution template system with the added features that come from being controllable over the network.
Language, licensing and contributions¶
LXD is written in Go. It is free software and developed under the Apache 2 license.
The LXD source code is available on GitHub.
There are no CLA or similar legal agreements required to contribute to LXD. However, we require commits be signed-off (following the DCO - Developer Certificate of Ownership). See the Contribution guidelines for more information.