How to install Charmcraft

See also:

This document shows you how to install Charmcraft.


Isolated development environment on Linux, macOS, or Windows

One way to install Charmcraft is via Multipass.

This is currently the only way to install it on macOS or Windows and also a good way to install it on Linux, as it will give you an isolated development environment.

The steps are as follows:

First, install Multipass.

Second, use Multipass to provision a virtual machine with the name charm-dev. By definition, a Multipass virtual machine with this name installs the latest Ubuntu LTS comes pre-equipped with Charmcraft.

# Launch a fresh new VM with 4 cores, 8GB RAM and a 20GB disk and the name 'charm-dev'.
$ multipass launch --cpus 4 --mem 8G --disk 20G --name charm-dev

Last, open a shell in your new Charmcraft-equipped Ubuntu virtual machine:

$ multipass shell charm-dev

That’s it. You can now start typing in Charmcraft commands.


The recommended way to install Charmcraft on Linux is from the stable channel via snap:

sudo snap install charmcraft --classic

There are multiple channels other than stable. See the full list with snap info charmcraft.

We recommend either latest/stable or latest/candidate for everyday charming. With the snap you will always be up to date as Charmhub services and APIs evolve. Charmcraft supports Kubernetes operator development.

On Linux, Charmcraft currently depends on LXD to build the charms in a container matching the target base(s). Charmcraft will offer to install LXD if required, but here are steps to set it up manually:

$ sudo snap install lxd
$ sudo adduser $USER lxd
$ newgrp lxd
$ lxd init --auto

Last updated 4 months ago.