Your submission was sent successfully! Close

You have successfully unsubscribed! Close

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

Get started with LXD in 4 easy steps

  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



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


    lxc launch ubuntu:22.04 ubuntu-container



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


    lxc launch ubuntu:22.04 ubuntu-vm --vm

    Check the community image server 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.


    lxc exec <instance_name> -- <command>


    lxc exec ubuntu-container -- apt-get update

    For a list of available commands and options, just run


For other installation options, please check our documentation.

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.

See How to configure your firewall for information on how to resolve such issues.

Familiarise yourself with the basics


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

Learn more


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

Learn more


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

Learn more


We welcome and value contributions from the community.

Learn more

Need more help with LXD?

Let our LXD experts help you take the next step.

Get in touch