title: Install LXD | Canonical
source: https://canonical.com/lxd/install
author:
- "[[Canonical Ltd]]"
published:
created: 2025-03-17
description: Run system containers with LXD
tags:
- Container
- Software
lxd init
Try LXD on your laptop, workstation or server. Set up a single instance LXD for testing and development, or run it in a clustering mode for highly-available production environments.
Looking for help running LXD?
To install LXD as a snap, just run:
snap install lxd
Run the following command and either accept the defaults or choose different options when prompted:
lxd init
Container
VM
Command:
lxc launch <image_server>:<image_name> <instance_name>
Example:
lxc launch ubuntu:22.04 ubuntu-container
Check the community image server for other Linux distributions.
You now have your instance up and running! You're all set to experiment with any commands you need.
Command:
lxc exec <instance_name> --
Example:
lxc exec ubuntu-container -- apt-get update
For a list of available commands and options, just run
lxc
For other installation options, please check our documentation.
You might see issues with your firewall blocking network access for your instances, or connectivity issues because you run LXD and Docker on the same host.
LXD supports two types of instances: system containers and virtual machines.
Security is at the forefront of everything we do and there are various things to consider to keep your LXD installation secure.
LXD uses an image-based workflow, providing images for a large number of Linux distributions.
We welcome and value contributions from the community.