---
title: Install | LXD
description: Install LXD on Ubuntu, Debian, or other Linux distributions. Run system
  containers and VMs in minutes.
url: https://canonical.com/lxd/install?format=md
---

# Install LXD

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?

[Get in touch](https://canonical.com/contact-us)

---

## Why choose LXD?

### 1. Install LXD as a snap

To install LXD as a snap, just run:

```
snap install lxd
```

---

### 2. Configure LXD

Run the following command and either accept the defaults or choose different options when prompted:

```
lxd init
```

---

### 3. Install the OS you'd like to use in your container or VM

Container

VM

Command:

```
lxc launch <image_server>:<image_name> <instance_name>
```

Example:

```
lxc launch ubuntu:24.04 ubuntu-container
```

Check the [image server](https://images.lxd.canonical.com/) for other Linux distributions.

Command:

```
lxc launch <image_server>:<image_name> <instance_name> --vm
```

Example:

```
lxc launch ubuntu:24.04 ubuntu-container --vm
```

Check the [community image server](https://images.linuxcontainers.org/) for other Linux distributions.

---

### 4. Run commands

You now have your instance up and running! You're all set to experiment with any
commands you need.

Command:

```
lxc exec <instance_name> -- <command />
```

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](https://canonical.com/lxd/docs/default/installing/).

---

## Firewall issues

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.

[Access documentation about how to resolve these issues ›](https://canonical.com/lxd/docs/default/howto/network_bridge_firewalld/#network-bridge-firewall)

---

## Familiarize yourself with the basics

### Instances

LXD supports two types of instances: system containers and virtual machines.

[Learn more about containers and VMs ›](https://canonical.com/lxd/docs/default/explanation/instances/)

---

### Security

Security is at the forefront of everything we do and there are various things to consider to keep your LXD installation secure.

[Learn more about LXD and security ›](https://canonical.com/lxd/docs/default/explanation/security/)

---

### Images

LXD uses an image-based workflow, providing images for a large number of Linux distributions.

[Learn more about common operations with images ›](https://canonical.com/lxd/docs/default/images/)

---

### Contribute

We welcome and value contributions from the community.

[How to contribute to LXD ›](https://canonical.com/lxd/docs/default/contributing/)

## [Talk to our LXD experts ›](https://canonical.com/contact-us)

Close

### Let's get in touch.
